-
1. Ajax4jsf menu navigation
andersun Mar 6, 2007 4:10 AM (in response to andersun)How to create correct ajax4jsf navigation menu?
Following code redirect to Next page, but not as part of <a4j:outputPanel id="p">.<a4j:outputPanel id="menu"> <h:form id="form"> <a4j:commandLink value="press me" reRender="p" action="#{PageBean.next}"> </a4j:commandLink> </h:form> </a4j:outputPanel> ... <a4j:outputPanel id="p"> <h:outputText value="Lalalalal" /> </a4j:outputPanel>
-
2. Re: Ajax4jsf menu navigation
sergeysmirnov Mar 6, 2007 9:17 AM (in response to andersun)The action method #{PageBean.next} should return null if you want to have an Ajax Response on Ajax Request
Also, as soon as your menu located outside of the form, it is right to use reRender=":p" instead of just reRender="p" -
3. Re: Ajax4jsf menu navigation
andersun Mar 6, 2007 9:59 AM (in response to andersun)PageBean.next return "news" for example
facesConfig file:<navigation-rule> <from-view-id>*</from-view-id> <navigation-case> <from-outcome>news</from-outcome> <to-view-id>/news.jsp</to-view-id> </navigation-case> </navigation-rule>
news.jsp:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<h:outputText value="News" />
...
How can do that news page render directly in <a4j:outputPanel id="b"> on click "press me"
Current code throwsSEVERE: Component org.ajax4jsf.framework.ajax.AjaxViewRoot is no ValueHolder, cannot set value.
-
4. Re: Ajax4jsf menu navigation
sergeysmirnov Mar 6, 2007 10:13 AM (in response to andersun)If the action method returns the existing action outcome, the whole page should be refreshed. Ie. Ajax4jsf works in "Ajax Requests generates Non-Ajax Response" mode.
So, it works like it should work according to your description. However, I guess, not according to your expectation.
I am not sure I understand your whole use case correctly tomake some suggestion. Could you say more, please. -
5. Re: Ajax4jsf menu navigation
andersun Mar 6, 2007 11:16 AM (in response to andersun)I want to create menu:
In left part of page - menu
In right - context
When clicking link - loading context page without reloading header, menu, footer etc
Clicking another link - loading another context.... -
6. Re: Ajax4jsf menu navigation
sergeysmirnov Mar 6, 2007 3:46 PM (in response to andersun)do you use facelets? I am asking because if you use it, you can do the required behavior manipulating with ui:include feature without using the navigation from faces-context
In contrast, we have an a4j:include component that allows to use the navigation inside the page, but it requires the command component to be inside the a4j:include. It does not match your use case perfectly . -
7. Re: Ajax4jsf menu navigation
andersun Mar 7, 2007 3:32 AM (in response to andersun)I don't use facelets, but if no facility to create navigation with <a4j:include>, how can i do it with facelets?
Sergey, can you type please a short example with facelets -
8. Re: Ajax4jsf menu navigation
andersun Mar 9, 2007 11:43 AM (in response to andersun)People!! Anybody knows how to implement aforesaid navigation with ajax4jsf + facelets or without facelets... (!!! without reloading whole page)
-
9. Re: Ajax4jsf menu navigation
andersun Mar 10, 2007 12:24 PM (in response to andersun)Thanks, I did it with MyFaces 1.1.5, Tomahawk 1.1.5, Tiles 1.3.5, Ajax4jsf 1.1.0
Theme closed -
10. Re: Ajax4jsf menu navigation
bouboux Jul 27, 2007 11:25 AM (in response to andersun)Take a look at http://qlogic.ma/lilya
Lilay : Jsf Widgets with Ajax Capabilities based on ExtJs and Ajax4Jsf