Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.3.0.GA_P02, EE-4.0.0.GA
-
Fix Version/s: 4.1, EE-3.3.0.GA_P04
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ace tagHandler
-
Assignee Priority:P1
-
Support Case References:Support Case #13374 - https://icesoft.my.salesforce.com/50070000016KZZU
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
Description
<ace:panelStack selectedId="pane2">
<ace:stackPane id="pane1" client="true">
<!-- some content here-->
</ace:stackPane>
<ace:stackPane id="pane2" >
<!-- some content here but this content would be regular
jsf handled content and managed by domdiff algorithm
and rendered flag to either show the content or not-->
</ace:stackPane>
<ace:stackPane id="pane3" facelet="true">
<!-- some content here but this would NOT be part of the server side
component tree unless it were the selectedId of the parent-->
</ace:stackPane>
</ace:panelStack>
........
The panelStack would require a proxy so that each child could contain it's own form and the panelStack would always be updated as to which child is selected.
facelet="true" would act same as ui:include, but these components can be nested without worrying about the issues regarding ui:include and jstl tags since the div is always rendered, it's just the content of the divs which would be either included in the component tree (or not if facelet="true").
if you want other content to be rendered, you would nest your panelStacks:-
Modification to this could be having a list of selectedId's instead of a single selectedId, but easiest to implement a singleId to be included than a list of them. (take longer to implement).
for example:-
<ace:panelStack id="stack1" selectedId="pane1">
<ace:stackPane id="pane1" client="true">
<!-- some content here-->
</ace:stackPane>
<ace:stackPane id="pane2" >
<!-- some content here but this content would be regular
jsf handled content and managed by domdiff algorithm
and rendered flag to either show the content or not-->
</ace:stackPane>
<ace:stackPane id="pane3" facelet="true">
<ace:panelStack id="stack2" seletedId="pane5">
<ace:stackPane id="pane4" facelet="true">
<!-- note this panes content is not in the tree unless pane 3 and
pane4 are both selected -->
</ace:stackPane>
<ace:stackPane id="pane5" facelet="true">
<!-- note this panes content is not in the tree unless pane 3 and
pane5 are both selected -->
</ace:stackPane>
<ace:stackPane id="pane6">
<!-- note this panes content is not in the tree unless pane 3 and
is selected even if pane6 is not selected-->
</ace:stackPane>
</ace:panelStack>
</ace:stackPane>
</ace:panelStack>
The client="true" does not have to immediately be part of this component, but might be something to consider down the road....(?). Main difference between this component and ice:panelStack is that child pane's content can be removed from component tree unless it is "selected".
-
Hide
- iceMock2.zip
- 284 kB
- Judy Guglielmin
-
- iceMock2/.classpath 1 kB
- iceMock2/.DS_Store 6 kB
- __MACOSX/iceMock2/._.DS_Store 0.1 kB
- __MACOSX/iceMock2/.git/._branches 0.2 kB
- iceMock2/.git/COMMIT_EDITMSG 0.0 kB
- __MACOSX/iceMock2/.git/._COMMIT_EDITMSG 0.2 kB
- iceMock2/.git/config 0.3 kB
- __MACOSX/iceMock2/.git/._config 0.2 kB
- iceMock2/.git/description 0.1 kB
- __MACOSX/iceMock2/.git/._description 0.2 kB
- iceMock2/.git/FETCH_HEAD 0.1 kB
- __MACOSX/iceMock2/.git/._FETCH_HEAD 0.2 kB
- iceMock2/.git/HEAD 0.0 kB
- __MACOSX/iceMock2/.git/._HEAD 0.2 kB
- iceMock2/.git/.../applypatch-msg.sample 0.4 kB
- __MACOSX/.../._applypatch-msg.sample 0.2 kB
- iceMock2/.git/hooks/commit-msg.sample 0.9 kB
- __MACOSX/iceMock2/.../._commit-msg.sample 0.2 kB
- iceMock2/.git/hooks/post-update.sample 0.2 kB
- __MACOSX/iceMock2/.../._post-update.sample 0.2 kB
- iceMock2/.git/.../pre-applypatch.sample 0.4 kB
- __MACOSX/.../._pre-applypatch.sample 0.2 kB
- iceMock2/.git/hooks/pre-commit.sample 2 kB
- __MACOSX/iceMock2/.../._pre-commit.sample 0.2 kB
- iceMock2/.git/hooks/pre-push.sample 1 kB
- __MACOSX/iceMock2/.../._pre-push.sample 0.2 kB
- iceMock2/.git/hooks/pre-rebase.sample 5 kB
- __MACOSX/iceMock2/.../._pre-rebase.sample 0.2 kB
- iceMock2/.git/.../prepare-commit-msg.sample 1 kB
- __MACOSX/.../._prepare-commit-msg.sample 0.2 kB
-
Hide
- panelStack3.zip
- 26 kB
- Judy Guglielmin
-
- panelStack3/.classpath 4 kB
- panelStack3/.DS_Store 6 kB
- __MACOSX/panelStack3/._.DS_Store 0.1 kB
- panelStack3/.project 1.0 kB
- panelStack3/.settings/.jsdtscope 0.5 kB
- panelStack3/.../oracle.eclipse.tools.webtier.ui.prefs 0.6 kB
- panelStack3/.../org.eclipse.jdt.core.prefs 0.3 kB
- panelStack3/.../org.eclipse.wst.common.component 0.5 kB
- panelStack3/.../org.eclipse.wst.common.project.facet.core.prefs.xml 0.3 kB
- panelStack3/.../org.eclipse.wst.common.project.facet.core.xml 0.4 kB
- panelStack3/.../org.eclipse.wst.jsdt.ui.superType.container 0.0 kB
- panelStack3/.../org.eclipse.wst.jsdt.ui.superType.name 0.0 kB
- panelStack3/src/InputDefinitions.java 0.7 kB
- panelStack3/src/.../CompTreeMonitor.java 2 kB
- panelStack3/src/.../VisitTreeMonitor.java 5 kB
- panelStack3/src/SinglePane.java 1 kB
- panelStack3/src/TestBean.java 5 kB
- panelStack3/WebContent/cForEach.xhtml 2 kB
- __MACOSX/panelStack3/.../._cForEach.xhtml 0.2 kB
- panelStack3/WebContent/dataTable.xhtml 3 kB
- __MACOSX/panelStack3/.../._dataTable.xhtml 0.2 kB
- panelStack3/WebContent/.../stackSize.xhtml 2 kB
- __MACOSX/panelStack3/.../._stackSize.xhtml 0.2 kB
- panelStack3/WebContent/index.jsp 0.1 kB
- panelStack3/WebContent/index.xhtml 1 kB
- panelStack3/WebContent/.../MANIFEST.MF 0.0 kB
- panelStack3/WebContent/panelSeries.xhtml 4 kB
- panelStack3/WebContent/simple.xhtml 4 kB
- panelStack3/WebContent/simpleProxy.xhtml 5 kB
- panelStack3/WebContent/uiRepeat.xhtml 3 kB
Issue Links
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
initial eclipse project of tests for ace:panelStack. for 3.3 mtce branch, will also include panelStack inside of ice:panelSeries.
Verified ICEfaces EE-3.3.0 maintenance branch and ICEfaces 4 trunk r44781. Not yet committed to EE-3.3.0.GA_P03 tag.
Test applications added to:
http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Manual/panelStack
http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/panelStack
Refactored and simplified ace:panelStack and ace:stackPane components. Implemented lazy creation of stack pane children. The changes were applied only to maintenance branch for now.
The showcase panelStack demo is failing on the 3.3 maintenance branch with:
java.lang.NullPointerException com.sun.faces.facelets.tag.TagAttributeImpl.getBoolean(TagAttributeImpl.java:136) org.icefaces.ace.component.stackpane.StackPaneHandler.applyNextHandler(StackPaneHandler.java:44)
I cannot reproduce the NullPointerException. I can see this exception instead when selecting a different query in ace:panelStack demo from showcase:
javax.faces.FacesException: Cannot remove the same component twice: frm1:tbl1:0:stack1:out2 at com.sun.faces.context.StateContext$AddRemoveListener.handleAddRemoveWithAutoPrune(StateContext.java:523) at com.sun.faces.context.StateContext$AddRemoveListener.handleRemove(StateContext.java:392) at com.sun.faces.context.StateContext$AddRemoveListener.processEvent(StateContext.java:355) at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106) at com.sun.faces.application.ApplicationImpl.processListenersAccountingForAdds(ApplicationImpl.java:2212) at com.sun.faces.application.ApplicationImpl.invokeViewListenersFor(ApplicationImpl.java:2033) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:292) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247) at javax.faces.component.UIComponentBase.disconnectFromView(UIComponentBase.java:2230) at javax.faces.component.UIComponentBase.doPreRemoveProcessing(UIComponentBase.java:1894) at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:393) at javax.faces.component.UIComponentBase$ChildrenList.remove(UIComponentBase.java:2712) at org.icefaces.ace.component.stackpane.StackPane.createChildren(StackPane.java:65) at org.icefaces.ace.component.stackpane.StackPaneRenderer.encodeChildren(StackPaneRenderer.java:78) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847) at org.icefaces.ace.renderkit.CoreRenderer.renderChild(CoreRenderer.java:82) at org.icefaces.ace.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:70) at org.icefaces.ace.component.panelstack.PanelStackRenderer.encodeChildren(PanelStackRenderer.java:92) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
Fixed above exception by taking the pane out of the view while removing children to avoid having JSF replay the removal.
I noticed that on Tomcat 7 the showcase demo works fine, however, on Tomcat 8, it blows up with the following exception as soon as you select it from the left-side menu:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.NullPointerException
com.sun.faces.facelets.tag.TagAttributeImpl.getBoolean(TagAttributeImpl.java:136)
org.icefaces.ace.component.stackpane.StackPaneHandler.applyNextHandler(StackPaneHandler.java:44)
com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:187)
corrected a pre-existing problem with isSelected (still referring to currentId), so removed all reference to old attribute currentID (unnecessary...just use selectedId).
then fixed a renderer issue when not using the 'var' attribute (again from modifying the code when var was added).
Now, note that as long as you don't interact with children inside the panes via ajax, then the current handler works. However, the customer wants to view and update information from database, so if you add a form with input fields and ajax, then you get the following exception:-
Jun 08, 2015 4:01:54 PM org.icefaces.impl.application.ExtendedExceptionHandler handle
WARNING: queued exception
javax.faces.FacesException: Cannot add the same component twice: ps1:0:stack1:j_id462749121_1b94fc9e
at com.sun.faces.context.StateContext$AddRemoveListener.handleAddRemoveWithAutoPrune(StateContext.java:510)
at com.sun.faces.context.StateContext$AddRemoveListener.handleAdd(StateContext.java:437)
at com.sun.faces.context.StateContext$AddRemoveListener.processEvent(StateContext.java:359)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
at com.sun.faces.application.ApplicationImpl.processListenersAccountingForAdds(ApplicationImpl.java:2212)
at com.sun.faces.application.ApplicationImpl.invokeViewListenersFor(ApplicationImpl.java:2033)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:292)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2203)
at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1885)
at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:405)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2637)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2609)
at com.sun.faces.facelets.tag.jsf.ComponentSupport.addComponent(ComponentSupport.java:415)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.addComponentToView(ComponentTagHandlerDelegateImpl.java:299)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:199)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
at org.icefaces.ace.component.stackpane.StackPaneHandler.access$001(StackPaneHandler.java:25)
at org.icefaces.ace.component.stackpane.StackPaneHandler$2.run(StackPaneHandler.java:51)
at org.icefaces.ace.component.stackpane.StackPane.createChildren(StackPane.java:60)
at org.icefaces.ace.component.stackpane.StackPaneRenderer.encodeChildren(StackPaneRenderer.java:78)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
at org.icefaces.ace.renderkit.CoreRenderer.renderChild(CoreRenderer.java:82)
at org.icefaces.ace.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:70)
at org.icefaces.ace.component.panelstack.PanelStackRenderer.encodeChildren(PanelStackRenderer.java:85)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:335)
at com.icesoft.faces.component.panelseries.PanelSeriesRenderer.encodeChildren(PanelSeriesRenderer.java:82)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:847)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1822)
at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:153)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:973)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1819)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:421)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
......
the showcase example can be modified to include a form with input and ajax to each stackPane, or the attached panelStack3 (eclipse) app can be reviewed with the simpleProxy.jsf or panelSeries.jsf pages to see this exception. Doesn't matter which server is used....
see the panelSeries example for closest example required by customer.
Fixed NullPointerException by testing if TagAttribute.getObject returns null before invoking TagAttribute.getBoolean.
Take stack pane out of the view while adding children to avoid having JSF replay the addition.
Re-opened for the following:
1. Since this component is now working properly when nested inside UISeries and UIData containers, we have decided to remove the internal UISeries functionality ("var" attribute) from the component as this is seen as redundant and adding unnecessary complexity to the component.
2. It should be possible to support use of the component when it is not included inside of a form using an ICEfaces feature that would automatically use a utility form on the page to submit the component when necessary. This needs to be implemented and tested, particularly on older IE browsers (3.3). If testing is successful on all supported browsers, the ace:panelStackProxy component can be removed (unnecessary).
Simplified panel stack by extending it from UIOutput (see 1) above). Removed 'Var' example since attribute is not supported anymore. Removed panel stack proxy since form inside stack panes do submit and state is updated for the components included in the stack panes.
Assigned to Mircea to resolve ui:include-intensive use-case.
Modified StackPane class to allow children creation to occur multiple times for the same instance since the UISeries type containers reuse the same instance while iterating.
please see the attached project iceMock2
note that when you change from small to medium to large, a "PropertyNotFoundException" is thrown.
Also got this exception when trying to input values into an input field.
zipped up project. Must add ICEfaces CIM patched jars with jsf 2.1.28 and jstl jar.
Modified StackPane.visitTree method to visit only the children of the selected stack pane.
Remaining problems exists with ace:checkboxButton / f:selectBooleanCheckbox and ace:comboBox when used with ace:ajax / f:ajax. This is visible in the showcase example using either ace:checkboxButton or h:selectBooleanCheckbox. ice:selectBooleanCheckbox works as it does NOT use ace:ajax or f:ajax. ace:comboBox does not work either (see first simple example). By do not work, they do not get decoded properly and save their state.
fixed the other 2 showcase example which did not even show the checkbox stackPane (application code)
problem with these components not keeping their state in the first example -request is good, but it is not decoding/saving state correctly. ice component does.
Note that now was the following js console error for the component/widgets in the stackPanes:-
Uncaught TypeError: Cannot read property 'updateProperties' of undefined
....
fixed this by using mandatory configuration for tabSet.
fixed showcase examples for checkbox and resource loading tabSet rev 45260 IF4 and rev 45259 for IF 3.3 mtce.
iceads1.icesoft.domain/Public/Users/mircea/iceMock3.war
location of new test case for problem with ice:selectInputDate and ice:selectInputText which do not popup or work within ace:panelStack.
choose medium or large button (top example and small is the one that is not in the panelStack).
Still issue with ace:checkboxButton and ace:comboBox as well not maintaining state in showcase examples
Modified StackPane.visitTree method once again to visit only the children of the selected stack pane but avoid to shortcut the tree visiting when non-selected stack panes are encountered.
test had three lists of types of records. select control allows user to change these records and the bottom part of the page is the ice:panelSeries which controls the stack to show the correct panes are being rendered/selected.