Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 4.0
-
Fix Version/s: EE-4.0.0.GA, 4.1
-
Component/s: Framework
-
Labels:None
-
Environment:ICEfaces
-
Assignee Priority:P2
Description
When disabling partial state saving the components are not restored in the correct order. When h:head and h:body are used they are the first ones to be restored by the call to FaceletFullStateManagementStrategy.restoreTree(...). The UIInstructions that would render the markup for the 'html' tags are yet restored at this point because they are marked as transient.
When ComponentTagHandlerDelegateImpl.apply(...) runs later on the mentioned UIInstructions will be added to the component tree but they will follow the h:head and h:body components. It seems that this method will not rearrange the components that were added by FaceletFullStateManagementStrategy.restoreTree(...) while applying the tags.
The resulting component tree will look like this:
UIViewRoot
* HtmlHead
* HtmlBody
* UIInstructions "<html .... >"
* UIInstructions "</html>"
When ComponentTagHandlerDelegateImpl.apply(...) runs later on the mentioned UIInstructions will be added to the component tree but they will follow the h:head and h:body components. It seems that this method will not rearrange the components that were added by FaceletFullStateManagementStrategy.restoreTree(...) while applying the tags.
The resulting component tree will look like this:
UIViewRoot
* HtmlHead
* HtmlBody
* UIInstructions "<html .... >"
* UIInstructions "</html>"
Issue Links
- blocks
-
ICE-10214 showcase server errors if using PartialStateSavings=false and Mojarra JSF
-
- Closed
-
I can try but it's not easy in this moment.
As a workaround we currently use Icefaces from trunk without change 43885. Framework is Icefaces,Myfaces 2.2.7,Primefaces 4, jdk 1.6 & Tomcat 7.0.55
In short. Pushbuttons dynamically added by belowe code stop works with 43885 change.
// Context and Expression Factory
FacesContext fCtx = FacesContext.getCurrentInstance();
ELContext elCtx = fCtx.getELContext();
ExpressionFactory ef = fCtx.getApplication().getExpressionFactory();
ValueExpression ve = ef.createValueExpression(elCtx, "OK", String.class);
pb.setValueExpression("value", ve);
MethodExpression mthd = ef.createMethodExpression(elCtx, "#
{dynamicBeanName.buttonAction('ok')}", void.class, new Class[]
{ String.class });
pb.setActionExpression(mthd);
Necessary resources are added as org.icefaces.mandatoryResourceConfiguration equals dataTable tabSet panel pushButton comboBox textEntry dialog dateTimeEntry
Preferred setting org.icefaces.subtreeDiff=false but it doesn't matter.