[JBoss JIRA] Created: (RF-8056) DragIndicator is shown below modal panel
by Nick Belaevski (JIRA)
DragIndicator is shown below modal panel
----------------------------------------
Key: RF-8056
URL: https://jira.jboss.org/jira/browse/RF-8056
Project: RichFaces
Issue Type: Bug
Components: component-drag/drop
Affects Versions: 3.3.2.SR1
Reporter: Nick Belaevski
Try the following code. Open modalPanel and try to drag any framework item - drag indicator is shown when cursor is out of panel and it's below it.
<rich:modalPanel id="mp" minHeight="200" minWidth="450"
height="400" width="600" zindex="2000">
<f:facet name="header">
<h:outputText value="Modal Panel Title" />
</f:facet>
<f:facet name="controls">
</f:facet>
<rich:dragIndicator id="indicator" />
<h:form id="form">
<h:panelGrid columnClasses="panelc" columns="4" width="100%">
<rich:panel style="width:133px">
<f:facet name="header">
<h:outputText value="Source List" />
</f:facet>
<h:dataTable id="src" columns="1" value="#{dndBean.frameworks}"
var="fm" footerClass="footerClass">
<h:column>
<a4j:outputPanel style="width:100px;border:1px solid gray;padding:2px"
layout="block">
<rich:dragSupport dragIndicator="indicator"
dragType="#{fm.family}" dragValue="#{fm}">
<rich:dndParam name="label" value="#{fm.name}" />
</rich:dragSupport>
<h:outputText value="#{fm.name}"></h:outputText>
</a4j:outputPanel>
</h:column>
<f:facet name="footer">
<a4j:commandButton action="#{dndBean.reset}" value="Start Over" reRender="src,phptable,cftable,dnettable"/>
</f:facet>
</h:dataTable>
</rich:panel>
<rich:panel styleClass="dropTargetPanel">
<f:facet name="header">
<h:outputText value="PHP Frameworks" />
</f:facet>
<rich:dropSupport id="php" acceptedTypes="PHP" dropValue="PHP"
dropListener="#{eventBean.processDrop}" reRender="phptable, src">
</rich:dropSupport>
<h:dataTable id="phptable" columns="1" value="#{dndBean.containerPHP}" var="fm">
<h:column>
<h:outputText value="#{fm.name}"></h:outputText>
</h:column>
</h:dataTable>
</rich:panel>
<rich:panel styleClass="dropTargetPanel">
<f:facet name="header">
<h:outputText value=".NET Frameworks" />
</f:facet>
<rich:dropSupport id="dnet" acceptedTypes="DNET" dropValue="DNET"
dropListener="#{eventBean.processDrop}" reRender="dnettable, src">
</rich:dropSupport>
<h:dataTable id="dnettable" columns="1" value="#{dndBean.containerDNET}" var="fm">
<h:column>
<h:outputText value="#{fm.name}"></h:outputText>
</h:column>
</h:dataTable>
</rich:panel>
<rich:panel styleClass="dropTargetPanel">
<f:facet name="header">
<h:outputText value="ColdFusion Frameworks" />
</f:facet>
<rich:dropSupport id="cf" acceptedTypes="CF" dropValue="CF"
dropListener="#{eventBean.processDrop}" reRender="cftable, src">
</rich:dropSupport>
<h:dataTable id="cftable" columns="1" value="#{dndBean.containerCF}" var="fm">
<h:column>
<h:outputText value="#{fm.name}"></h:outputText>
</h:column>
</h:dataTable>
</rich:panel>
</h:panelGrid>
</h:form>
<p>Any JSF content might be inside the panel. In case of using
Facelets or JSF 1.2, it might be any mixed content.</p>
<p>The RichFaces modal panel is good with <a4j:include> to create
a wizard like behavior.</p>
<p>The model panel is open and closed from the javascript function
on <i>Richfaces</i> object. The following code
<a href="#" onclick="#{rich:component('mp')}.hide()">hide this panel</a>:
<f:verbatim>#</f:verbatim>{rich:component('mp')}.hide()</p>
</rich:modalPanel>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (RF-7922) RenderPhaseDataScrollerVisitor does not work with Tomahawk AliasBean Component
by Mirko Sertic (JIRA)
RenderPhaseDataScrollerVisitor does not work with Tomahawk AliasBean Component
------------------------------------------------------------------------------
Key: RF-7922
URL: https://jira.jboss.org/jira/browse/RF-7922
Project: RichFaces
Issue Type: Bug
Components: component-tables
Affects Versions: 3.3.1
Reporter: Mirko Sertic
The default RenderPhaseDataScrollerVisitor does not work with the Tomahawk AliasBean Component.
Basically, it is invoked by a PhaseListener. It recomputes the model size of the bound UIData and does some other stuff. And here starts the problem. When i use a t:aliasBean to define the datamodel for the UIData, it does not work, as the aliasBean component sets and unsets the alias during its lifecycle processing.
Now, the RenderPhaseDataScrollerVisitor is invoked before the aliasBean can do its job. An empty DataModel is created and put to the modelmap. Later, aliasBean does it work, and the UIData tries to render. Instead of asking again for the datamodel, it uses the empty model from the modelmap, and thus the table is empty.
I know that it is somehow difficult to support every component, but at least it should be supported to disable the RenderPhaseDataScrollerVisitor in some way, or provide my own implementation for it
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (RF-7986) inplaceSelect: allows String value only without specifying converter.
by Ilya Shaikovsky (JIRA)
inplaceSelect: allows String value only without specifying converter.
---------------------------------------------------------------------
Key: RF-7986
URL: https://jira.jboss.org/jira/browse/RF-7986
Project: RichFaces
Issue Type: Bug
Components: component-input
Affects Versions: 3.3.2.GA
Reporter: Ilya Shaikovsky
Assignee: Nick Belaevski
Fix For: Future
should allow the same value bindings as standard selectOne.
<rich:inplaceSelect value="#{inplaceComponentsBean.inputValue}"
defaultLabel="Click here to edit">
<f:selectItem itemValue="0" itemLabel="Option 1" />
<f:selectItem itemValue="1" itemLabel="Option 2" />
<f:selectItem itemValue="2" itemLabel="Option 3" />
<f:selectItem itemValue="3" itemLabel="Option 4" />
<f:selectItem itemValue="4" itemLabel="Option 5" />
</rich:inplaceSelect>
<h:selectOneMenu value="#{inplaceComponentsBean.inputValue}"
>
<f:selectItem itemValue="0" itemLabel="Option 1" />
<f:selectItem itemValue="1" itemLabel="Option 2" />
<f:selectItem itemValue="2" itemLabel="Option 3" />
<f:selectItem itemValue="3" itemLabel="Option 4" />
<f:selectItem itemValue="4" itemLabel="Option 5" />
</h:selectOneMenu>
where value - int works differently but should works int the same way.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (RF-7431) extendedDataTable: menu icon is displayed in wrong place in firefox, if header or caption facet is defined
by Vadim Mikovoz (JIRA)
extendedDataTable: menu icon is displayed in wrong place in firefox, if header or caption facet is defined
----------------------------------------------------------------------------------------------------------
Key: RF-7431
URL: https://jira.jboss.org/jira/browse/RF-7431
Project: RichFaces
Issue Type: Bug
Components: component-tables
Affects Versions: 3.3.2.CR1
Environment: v.3.3.2-SNAPSHOT
firefox 3.0
Reporter: Vadim Mikovoz
Assignee: Nick Belaevski
<rich:extendedDataTable id="myExtendedDataTableID"
value="#{dataScroller.dataTable}" var="dT">
<f:facet name="caption">
<h:outputText value="My caption" />
</f:facet>
<rich:column label="first column">
<f:facet name="header">
<h:outputText value="first" />
</f:facet>
<h:outputText value="#{dT.str0}" />
</rich:column>
<rich:column label="second column">
<f:facet name="header">
<h:outputText value="second" />
</f:facet>
<h:outputText value="#{dT.int0}" />
</rich:column>
</rich:extendedDataTable>
1. Open test page
2. Move mouse over any column header
-------------------------------------------------------
menu icon is appeared on caption (see attachment)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (RF-8262) Unnecessary filtering of fields in a Richfaces DataTable
by Sebastian Rueber (JIRA)
Unnecessary filtering of fields in a Richfaces DataTable
--------------------------------------------------------
Key: RF-8262
URL: https://jira.jboss.org/jira/browse/RF-8262
Project: RichFaces
Issue Type: Patch
Security Level: Public (Everyone can see)
Components: component, component-ScrollableDataTable, component-tables
Reporter: Sebastian Rueber
This patch is a solution for the DataTable problem, when using the internal filter.
e.g.:
<rich:dataTable value="${bean.listDataModel}" var="row">
<rich:column filterBy="row.name" />
reason for this problem is the class org.richfaces.model.ModifiableModel with its method filter(...)
the method filter(...) always calculates the filterBy value for all cells and rows in the table, which has the
filter expression.
example:
500 rows and 7 columns leads to 3500 calculations. it depends on how complex the expressions are, but it
may take a while.
in some cases the expressions are calculated unnecessary.
example 1: empty filter fields
if the user has not entered any filter expressions in fields with a filter attribute, for example if the table is rendered initialy.
calculated expressions 3500
needed expressions 0
example 2: shortcut evaluation
the filter fields are linked by an AND logical operator. that means, if you have 7 fields and the first does not match,
the remaining 6 field should not be evaluated.
calculated expressions 3500
needed expressions 3500 - x
in our application we are using our own table model, but i would like to contribute some code, which may give you
an idea, how to fix this quickly.
solution code for filter method
@Override
protected List<Object> filter(List<FilterField> aFilterFields) {
List<Object> filteredCollection = new ArrayList<Object>();
ExpressionFactory tempFactory = new ExpressionFactory(FacesContext.getCurrentInstance(), var, aFilterFields);
for (Object temp : rowKeys) {
Integer tempKey = (Integer) temp;
Sample tempSample = data.get(tempKey);
if (accept(tempSample, aFilterFields, tempFactory)) {
filteredCollection.add(tempKey);
}
}
rowKeys = filteredCollection;
return rowKeys;
}
public boolean accept(Sample aSample, List<FilterField> aFilterList, ExpressionFactory aFactory) {
for (FilterField filterField : aFilterList) {
if (filterField instanceof ExtendedFilterField) {
String filterValue = ((ExtendedFilterField) filterField).getFilterValue();
if (filterValue != null) {
filterValue = filterValue.trim().toUpperCase(locale);
if (filterValue.length() > 0) {
// delayed until here, were it is really needed
Object property = aFactory.eval(filterField.getExpression(), aSample);
if (property == null || !property.toString().trim().toUpperCase(locale).startsWith(filterValue)) {
return false;
}
}
}
} else {
Object property = aFactory.eval(filterField.getExpression(), aSample);
if (!((Boolean) property).booleanValue()) {
return false;
}
}
}
return true;
}
solution code for the ExpressionFactory
package org.richfaces.model.impl.expressive;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.el.ELContext;
import javax.el.ELResolver;
import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.application.Application;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import org.richfaces.model.Field;
public class ExpressionFactory {
private Map<javax.el.Expression, Expression> expressionMap;
public ExpressionFactory(FacesContext context, final String var, List<? extends Field> sortOrder) {
Application application = context.getApplication();
ELResolver resolver = application.getELResolver();
ELContext elContext = context.getELContext();
expressionMap = new HashMap<javax.el.Expression, Expression>();
for (Field field : sortOrder) {
javax.el.Expression elExpression = field.getExpression();
Expression expression;
if (elExpression instanceof ValueExpression) {
ValueExpression valueExpression = (ValueExpression) elExpression;
if (valueExpression.isLiteralText()) {
String expressionString = valueExpression.getExpressionString();
if (expressionString.startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) {
expression = new NullExpression(expressionString);
} else {
expression = new SimplePropertyExpression(expressionString, elContext, resolver);
}
} else {
expression = new ValueBindingExpression(context, valueExpression, var);
}
} else if (elExpression instanceof MethodExpression) {
expression = new MethodBindingExpression(context, (MethodExpression) elExpression);
} else {
throw new IllegalArgumentException();
}
expressionMap.put(elExpression, expression);
}
}
public Object eval(javax.el.Expression anExpression, Object anObject) {
return expressionMap.get(anExpression).evaluate(anObject);
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months