Changing/Updating an area by a menu item
iktuz Jul 30, 2007 9:58 AMHi All,
I am trying to make my first RichFaces/JSF application. It looks like a desktop application with menu, toolbar, body and footer.
I am trying to update the body content when a menu option or tool bar button are fired. But I am not achieving that.
So I have the menu item in a default-menu.jsp:
... <rich:menuItem submitMode="ajax" onclick="Richfaces.showModalPanel('mp',{width:450, top:200})" value="#{msg.lbl_menu_analysis_call}" action="loadOperationLogin" reRender="centerGrid"> <f:facet name="icon"> <h:graphicImage value="/images/webapp_welcome.gif" /> </f:facet> </rich:menuItem> ...
The action called above is declared as follows:
... <navigation-rule> <from-view-id>/WEB-INF/pages/layout/default-menu.jsp</from-view-id> <navigation-case> <from-outcome>loadOperationLogin</from-outcome> <to-view-id> /WEB-INF/pages/operation/operationLogin.jsp </to-view-id> </navigation-case> </navigation-rule> ...
And the page layout comes as (where I have my "centerGrid" to be updated/changed):
<f:view> <h:panelGrid columns="1" style="width:800px;height:600px;" border="1"> <h:panelGrid id="headerGrid" columns="1" style="width:100%;valign:top;" border="1"> <jsp:include page="/WEB-INF/pages/layout/default-menu.jsp" /> <rich:separator lineType="beveled" height="5" width="100%" /> <jsp:include page="/WEB-INF/pages/layout/default-toolbar.jsp" /> </h:panelGrid> <h:panelGrid id="centerGrid" columns="1" border="1" style="width:100%;height:100%;valign:top;"> <a:include viewId="/WEB-INF/pages/layout/default-center.jsp" /> </h:panelGrid> </h:panelGrid> <jsp:include page="/WEB-INF/pages/layout/default-messages.jsp" /> </f:view>
When I run the application operationLogin.jsp is showed in place of default-menu.jsp area instead of "centerGrid" and finally disappears again. So all becames the same again. Can someone shed some light here because I don´t know what trick I am missing.
I supose that this kind of application is a "little" more audacious than a simple hello word application for a beginner, but I am so motivated to learn RichFaces that I dare the challenge.
Best Regards,
Iktuz.