This content has been marked as final.
Show 4 replies
-
1. Re: Tab-Panel and inner Forms submitted within a Tab
ilya_shaikovsky Nov 14, 2007 5:19 AM (in response to agrimm)hm.. could you please more code (I mean faces-config and method itself).
Are you updated facelets together with RF? May be the problem there? I'm still not tested with 1.2 but I will after you give me rest of code snippets. -
2. Re: Tab-Panel and inner Forms submitted within a Tab
agrimm Nov 14, 2007 5:32 AM (in response to agrimm)Hi Ilya,
thanks for the fast reply.
I have only upgraded RF. Here is the part of the faces-config.xml:<?xml version="1.0"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" version="1.2"> <application> <view-handler> de.MyViewHandler </view-handler> <navigation-handler> de.MyNavigationHandler </navigation-handler> <property-resolver> de.MyCompositeELResolver </property-resolver> <action-listener> de.MyActionListener </action-listener> </application> </faces-config>
I have shorted the packagenames for better reading. I have changed quite a lot of the code normally used. But the normal facelets Lifecycle behavour is still used to handle all requests.
Hope this helps. Let me now if you need more information.
Best regards.
Achim Grimm -
3. Re: Tab-Panel and inner Forms submitted within a Tab
ilya_shaikovsky Nov 14, 2007 6:38 AM (in response to agrimm)My Page
<rich:tabPanel> <rich:tab label="test 1"> <h:form> <h:commandButton action="inputname" value="test"></h:commandButton> </h:form> </rich:tab> <rich:tab label="test 2"> <h:outputText value="tab2"></h:outputText> </rich:tab> </rich:tabPanel>
My ActionListenerpublic class actionList implements ActionListener{ public actionList() { } public void processAction(ActionEvent event) throws AbortProcessingException { System.out.println("global listener fired"); String outcome = ((ActionSource2)event.getComponent()).getActionExpression().invoke(FacesContext.getCurrentInstance().getELContext(), new Object[]{}).toString(); NavigationHandler handler = FacesContext.getCurrentInstance().getApplication().getNavigationHandler(); handler.handleNavigation(FacesContext.getCurrentInstance(), ((ActionSource2)event.getComponent()).getActionExpression().getExpressionString(), outcome); } }
Faces Config... <application> <action-listener> actionList </action-listener> ...
So I could say that all works jsut as you excpect..
Seems - the problem is in your facelets 1.2 usage. We didn't tested it with RF because it isn't released.
Could you please check with Facelets 1.1.14
B.t.w. I'm using 3.2.0 snapshot. But it shouldn't infuence to result. -
4. Re: Tab-Panel and inner Forms submitted within a Tab
agrimm Nov 15, 2007 4:53 AM (in response to agrimm)Hi ilya,
After your reply, I had a view more tries this morning. At the beginning I could not recreat the problem. But after a view changes in the attributes, I came out with these to code snippes. With the first one, everything is working fine, the second one has the descriped behavour.
First working version:
JSF-Page:<rich:tabPanel switchType="server" selectedTab="#{currentTabSession}"> <rich:tab label="test 1" action="TAB_A" id="TAB_A" > <h:form> <h:commandButton action="inputname" value="test" /> </h:form> </rich:tab> <rich:tab label="test 2" action="TAB_B" id="TAB_B" > <h:outputText value="tab2"></h:outputText> </rich:tab> </rich:tabPanel>
Managed-Beans:... <managed-bean> <managed-bean-name>currentTabSession</managed-bean-name> <managed-bean-class>java.lang.String</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> ...
Second not working version:
JSF-Page:<rich:tabPanel switchType="server" selectedTab="#{currentTab}"> <rich:tab label="test 1" action="TAB_A" id="TAB_A" > <h:form> <h:commandButton action="inputname" value="test" /> </h:form> </rich:tab> <rich:tab label="test 2" action="TAB_B" id="TAB_B" > <h:outputText value="tab2"></h:outputText> </rich:tab> </rich:tabPanel>
Managed-Beans:... <managed-bean> <managed-bean-name>currentTabSession</managed-bean-name> <managed-bean-class>java.lang.String</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> </managed-bean> ...
The difference between those two version is the scope of the managed beans.
Best regards.
Achim Grimm