Acessing portlets multiple views

I have a CAF created portlet called Portlet1 and it has two views 1) “defaultView” and 2) “view1”.

When I go to the portlet in a web browser the defaultView is displayed. How do I access the other view “view1” from the default view?

1 Like

The simplest way would be to use a “Portlet > Portlet Simple Link” that will switch the target view when it is clicked.

For example, copy + paste this fragment into your page:

<control component-type='com.webmethods.caf.faces.component.portleturl.PortletUrlLink' renderer-type='javax.faces.Link'>
  <property name='id' value='portletUrlLink' />
  <facet name='href'>
    <control component-type='com.webmethods.caf.faces.component.portleturl.ExtendedPortletUrl' renderer-type=''>
      <property name='id' value='extendedPortletUrl' />
      <property name='targetView' value='/MyPortlet/myotherview.view' />
  <control component-type='javax.faces.HtmlOutputText' renderer-type='javax.faces.Text'>
    <property name='id' value='htmlOutputText3' />
    <property name='raw' value='true' />
    <property name='value' value='Click to switch to second view' />


Eric your examples to all my inquiries have been very helpful and I can actually infer from them how to build other components.
Thanks a lot I do appreciate it.