portal views navigation issue

Hi,

In my portal application I have used “Extended portlet URL” control to navigate from view A to view B.
As I navigate to view B and try to click on a command to execute an action, it automatically takes me back to view A.
My scenario is: view A is my default view, from view A I click on the navigation link, it takes me to view B and in view B I want to excute an action using some command button.

I am using Designer 7.0

Please help.

Thanks.

Hi,

Is it possible to navigate between views using Extented portlet URL…???
Using the navigation rules u can achieve this i belive.

In Portlet.xml file for example for a portlet
u ll be havaing:

dbSample
com.webmethods.caf.faces.portlet.FacesPortlet

com.webmethods.caf.faces.portlet.INIT_VIEW
/DbSample/default.view

in value tag mention view name(view A) which u want to show bydefault when portlet loads after that in navigation rule set the navigation rule to navigate to next view(view B)…

Regards,
Sunil

Hi Sunil,

In my application I am using navigation links to navigate from one view to another. Extended portlet URL is the child control of navigation links, and “target view” property is set to the portlet view I want to navigate.

The init parameters in the portlet.xml file is correct.

The default page is loaded first and when I click on the navigation link from that page, it successfully takes me to the another view. But when I click on some action command in the target view, it automatically takes me back to the default view.
Any idea how to resolve this.

Thanks.

Hi Navdeep,

No idea on this…
but u can navigate to another view using the command link…
i have tried this and it is working fine…

In View A i have used command link, in navigation rule i am navigate to View B when user clicks on the command link.
In View B i am calling an action which inturn will call an webservice connector…

Regards,
Sunil.

The behavior you see when switching views using extended portlet urls is not correct. This might be a bug (I will follow up on this).

But as other person suggested when within a portlet it is much easier to use command buttons and JSF Navigation rules to control switching between views

Hi Alex,

I have even used the JSF navigation rules to navigate between multiple view, and am able to do so, but with this the problem is that I am not able to pass values to views while navigating.

Thanks.

Hi Alex,

Can you help me with passing value to the views using command link.
I am using control parameter as the child control of async command link.
When the view is navigated to another, I am not able to see the parameter being passed in the URL.

Thanks.

Hi Navdeep,

Dont know whether it ll be helpful to u in this scenario…

If possible maintain a common bean among ur views, bind the variables of View A to the bean so that u can access those in View B

Regards,
Sunil

First of all you can not switch portlet views using async commands, you have to use regular command buttons/links to do it.

Second if you pass in control parameters in the command then in the target view you can access them via following binding expression:

“#{param[‘param_name’]}”

This is a valid way of passing parameters, but keep in mind that there parameters are transient and any subsequent request you make will erase them so you need to capture and store them in the page bean.

From this point it can make sense to have just java properties declared on your page bean (or on some other managed bean you may define just for this purpose) and use hidden inputs to submit values bound to these properties when command is invoked. Then you can easily access them from any view.

thanks Alex, thanks Sunil
I created a common bean and now I am able to navigate views passing values.

Could you tell me how did you create a common bean?

I have 2 views on same portlet. I would like to take the value entered in a text field in View A to a output text field in B.

I have created a bean in bindings for view A and i have added a varialble called ‘input’ to that bean . How to bind the value of View A’s text field to this bean variable so that i can refer the same on view B’s text field?

Hi,

Create a bean in view A and add property ‘input’. Now, add the same bean method to the source of your view B. You can edit the view source by clicking on the top right corner of the design canvas.

Bind the property ‘input’ in view A to the text field control value, the same input property you can access from view B.

Thanks,