Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
30. Apr 2008, 18:53 CET | Link

Hello again! I'm working with jboss seam 2.0.1 and Jboss 4.2.2.

How can I redirect to capturedView inside a rule definition in pages.xml? Something like this:

     <page view-id="/prelogin.xhtml" action="#{bean.action()}">
          <navigation>
		<rule if="#{bean.condition}">          
                       <redirectToCapturedView/>
	        </rule>	        
	  </navigation>
      </page> 

Thanks in advance!

3 Replies:
01. May 2008, 02:15 CET | Link

You could try this:


  <page view-id="/prelogin.xhtml" action="#{bean.action()}">
    <navigation>
      <rule if="#{bean.condition}">          
        <redirect view-id="#{redirect.viewId}"/>
      </rule>	        
    </navigation>
  </page> 
05. May 2008, 09:18 CET | Link

Thanks Shane!

In most of cases this solution works perfectly. My problem is that I want to maintain the initial parameters (of captured view), and using this

<redirect view-id="#{redirect.viewId}"/>

I loose my parameters.

05. May 2008, 18:43 CET | Link

I solve the problem adding (inside action() method) the next line:

Redirect.instance().returnToCapturedView();

Is this the only way to solve it?or can I write something in pages.xml to redirect to captured view?