-
1. load a complete JSF page with AJAX
nbelaevski Apr 15, 2011 8:27 AM (in response to djnose)Hi,
Point to those components via 'reRender' attribute - that's all you have to do. Components being updated can be arbitrary complex, tables, trees, panels, etc. Also check a4j:include example at livedemo - it shows how to update parts of page using navigation rules (wizard-style pages).
-
2. load a complete JSF page with AJAX
djnose Apr 15, 2011 9:24 AM (in response to nbelaevski)thx for your reply, but i dont want to update anything (not right now ) i want to load a page which has not been included,
which has not been loaded yet and which should also work like every page i may include.
Lets imagine i have a index page with a menu and a div, where the main-stuff is displayed.
The menu may have the entries
Entry1
entry2
and so on...
as far as i know (doing it the oldschool-selfwritten-way) i would create a JS function, create my XMLHTTPObject and send a request to,
lets say, my ControllerServlet.
Here i just have to forward my JSF page (do some stuff in js, but lets ignore that for now)
and finally i would say: document.getElementById(div).innerHTML = respText;
So the page is now loaded and should work.
I tried that with stuff like
<rich:togglePanel switchType="ajax">
<rich:togglePanelItem name="wstep1">
<ui:include src="/page2.xhtml" />
</rich:togglePanelItem>
cause <a4j:include isn´t supported anymore.
But that did not work like expected. (JS didnt work f.e.)
I dont want to do it the old way, cause i dont want to take care about issues like forward / backward in your browser.
Dont want to load all the JS after my request by my own and so on...
Maybe i just think to complex and it is very easy dont know .. any example would be appreciate
Thx!
-
3. load a complete JSF page with AJAX
ilya_shaikovsky Apr 15, 2011 9:40 AM (in response to djnose)<rich:togglePanel switchType="ajax">
<rich:togglePanelItem name="wstep1">
<ui:include src="/page2.xhtml" />
</rich:togglePanelItem>
But that did not work like expected. (JS didnt work f.e.)
js of the panel? Then check that you wrapped it in h:form.
-
4. load a complete JSF page with AJAX
djnose Apr 15, 2011 9:50 AM (in response to ilya_shaikovsky)it finally worked after all...just did it the wrong way.
Thx for your help!