myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Hong" <anthony.bin.h...@gmail.com>
Subject Tree2 Navigation with iframe
Date Tue, 28 Nov 2006 09:15:56 GMT
I have a template, which left side is a tree component and right side
is displaying zone.
I want to render what tree node selected page in right div body zone.
How can I achieve this?
I to write following code in my node action method

HttpServletResponse response = (HttpServletResponse)
super.getExternalContext().getResponse();
        response.setContentType("text/html");
        response.getWriter().write("<script>document.getElementById('innerFrameId').src='newPage.jsf';</script>");
        super.getFacesContext().responseComplete();

But it didn't work, javascript error shown 'innerFrameId' can not be
found.I already defined in page.
Am I right?

If I don't use iframe to display div body, each time working place
have actions, tree data have to be reloaded. Any other alternative can
I use?

I found each time tree load nodes, backend getTreeNode function will
be invoked more than once,  Can I prevent it form repeatly loading?
I think I cann't define a property in my backing bean,  otherwise my
tree node data is not refreshed. How to solve this problem

-- 

Anthony Hong

Mime
View raw message