You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Hu, Yiguang" <Yi...@stercomm.com> on 2006/05/31 01:07:15 UTC

jsf with portlet problem

I run into a strange problem while trying to using jsf bridge. I have
the following simple jsp pages, when it was first loaded by clicking the
psml that point to the index.jsp, I can see both the command button and
link from the index.jsp page. When I click either the button or link, it
goes to the second page (first.jsp) correctly. But when I click the same
psml link again, it goes directly to the page (first.jsp) instead of the
index.jsp.

Any ideas?

Thanks

Yiguang 

Index.jsp 

<f:view>

    <h:form id="index" >

     <h:commandButton id="submit" action="first" value="Goto First" />

 

      <h:commandLink action="first">

        <h:outputText value="Page1" />

    </h:commandLink>

 

     </h:form>

</f:view>

 

Portlet def:

<portlet id="home">

    <description> Home</description>

    <portlet-name>home</portlet-name>

    <display-name>Home</display-name>

 
<portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-clas
s>

    <init-param>

      <name>ViewPage</name>

      <value>/WEB-INF/index.jsp</value>

    </init-param>

    <supports>

      <mime-type>text/html</mime-type>

      <portlet-mode>VIEW</portlet-mode>

    </supports>

    <supported-locale>en</supported-locale>

    <portlet-info>

      <title>exception</title>

      <short-title>exception</short-title>

    </portlet-info>

  </portlet>

 

Faces navigation rule:

  <navigation-rule>

   <description>

        test

    </description>

    <from-view-id>/WEB-INF/index.jsp</from-view-id>

    <navigation-case>

        <description>

                goto first page

        </description>

        <from-outcome>first</from-outcome>

      <to-view-id>/WEB-INF/first.jsp</to-view-id>

    </navigation-case>

  </navigation-rule>


Re: jsf with portlet problem

Posted by Ralph Goers <Ra...@dslextreme.com>.
What makes you think it should restart? It sounds like you are 
reinvoking the portlet at the same place it left off so it is going back 
there.

Hu, Yiguang wrote:
> I run into a strange problem while trying to using jsf bridge. I have
> the following simple jsp pages, when it was first loaded by clicking the
> psml that point to the index.jsp, I can see both the command button and
> link from the index.jsp page. When I click either the button or link, it
> goes to the second page (first.jsp) correctly. But when I click the same
> psml link again, it goes directly to the page (first.jsp) instead of the
> index.jsp.
>
> Any ideas?
>
> Thanks
>
> Yiguang 
>
> Index.jsp 
>
> <f:view>
>
>     <h:form id="index" >
>
>      <h:commandButton id="submit" action="first" value="Goto First" />
>
>  
>
>       <h:commandLink action="first">
>
>         <h:outputText value="Page1" />
>
>     </h:commandLink>
>
>  
>
>      </h:form>
>
> </f:view>
>
>  
>
> Portlet def:
>
> <portlet id="home">
>
>     <description> Home</description>
>
>     <portlet-name>home</portlet-name>
>
>     <display-name>Home</display-name>
>
>  
> <portlet-class>org.apache.portals.bridges.jsf.FacesPortlet</portlet-clas
> s>
>
>     <init-param>
>
>       <name>ViewPage</name>
>
>       <value>/WEB-INF/index.jsp</value>
>
>     </init-param>
>
>     <supports>
>
>       <mime-type>text/html</mime-type>
>
>       <portlet-mode>VIEW</portlet-mode>
>
>     </supports>
>
>     <supported-locale>en</supported-locale>
>
>     <portlet-info>
>
>       <title>exception</title>
>
>       <short-title>exception</short-title>
>
>     </portlet-info>
>
>   </portlet>
>
>  
>
> Faces navigation rule:
>
>   <navigation-rule>
>
>    <description>
>
>         test
>
>     </description>
>
>     <from-view-id>/WEB-INF/index.jsp</from-view-id>
>
>     <navigation-case>
>
>         <description>
>
>                 goto first page
>
>         </description>
>
>         <from-outcome>first</from-outcome>
>
>       <to-view-id>/WEB-INF/first.jsp</to-view-id>
>
>     </navigation-case>
>
>   </navigation-rule>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org