My suggestions:

1) create outputLinks instead of commandLinks with a "target"
specified in the tree instead of using actions

-or-

2) use an AJAX framework like Ajax4Jsf and make the "right side"
refreshed when the tree is clicked and don't use IFRAMEs

-Andrew

On 11/28/06, Anthony Hong <[EMAIL PROTECTED]> wrote:
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

Reply via email to