Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.2
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ACE
-
Assignee Priority:P2
Description
The ACE generator create special getter/setter methods for properties so that if a property is not bound via EL to a bean, it can still maintain distinct values for each row that the component is in. But if the component, or it's renderer, or app code via a component binding, call a property setter method during render, then that value will apply to all rows, since the generated setter method cannot differentiate between construction time during render phase, and rendering during render phase, and the code path treats the set as being for construction, so that it is applied to all rows.
Issue Links
- blocks
-
ICE-6728 Add client-side cache support for ace:tabPane within a 'clientSide=false'
-
- Closed
-
For testing, had this in ComponentArtifact, where it sets a property:
writer.append("\n\t\t\tPhaseId pi = getFacesContext().getCurrentPhaseId();");
writer.append("\n\t\t\tStateHelper sh = getStateHelper(); ");
writer.append("\n\t\t\tif (isDisconnected(this)) {");
writer.append("\nSystem.out.println(\"comp: \" + getClientId() + \" setter: "field.getName()" value: \" + "field.getName()" + \" phase: \" + pi + \" disconnected: \" + isDisconnected(this));");
Had this in CheckBoxRenderer.encodeBegin():
{ System.out.println("CheckBoxButton true for: " + checkbox.getClientId(facesContext)); checkbox.setStyle("background-color: red;"); }Object val = checkbox.getValue();
if (val != null && (val instanceof Boolean) && ((Boolean)val).booleanValue())
Had this in comp-suite:
src/main/webapp/resources/examples/compat/dataTable/dataTable.xhtml
{car.markBoolean}<ice:column>
<f:facet name="header">
ACE Button
</f:facet>
<ace:checkboxButton id="mark_cb" label="Mark CB" value="#
" singleSubmit="true"/>
</ice:column>
src/main/java/org/icefaces/samples/showcase/example/compat/dataTable/Car.java
{ return markBoolean; }protected boolean markBoolean;
public boolean isMarkBoolean()
public void setMarkBoolean(boolean mb)
{ this.markBoolean = mb; System.out.println("setMarkBoolean: " + mb); }