Skip to Content
author's profile photo Former Member
Former Member

How to change an Iview in a Page dinamically?????

Hello, I have 3 iviews(tree_root, Iview A, Iview B), the tree_root contains a tree with some information. Something like this:

tree_root

|__ Group A

|______ <b>link a.1</b>

|______ link a.2

|__ Group B

|______<b>link b.1</b>

What I want to do is when I click on <b>link a.1</b>, the central part of the page displays Iview A ... and when I click on <b>link b.1</b> it should display Iview B.

The problem is that I can`t use the top level Navigation (level 2) to define new pages and to use it through URLGenerator... so I think it may be possible to make a page with hidden Iviews and change some properties to show A or B... but i don't have any idea about how I can achieve that.

Thanks for Your help, Jesus Hernandez

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 02, 2005 at 08:22 AM

    A work-around might be using one iView with two states.

    It would use a state variable in the session, which would change when a link in the tree_root would be pressed.

    public void onALink(Event event){

    ...

    HttpSession session = request.getSession().getComponentSession().getHttpSession();

    session.setAttribute("myStatus","A");

    ...

    }

    The doProcessBeforeOutput() in the center iView would check for this variable and render the GUI according to it.

    HttpSession session = request.getComponentSession().getHttpSession();

    if (session.getAttribute("myStatus").equals("A"))

    //render iview A

    else

    //render iview B

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 02, 2005 at 08:20 AM

    _

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.