[jboss-user] [JBoss Seam] - Simple question from an not-noob developer

beligum do-not-reply at jboss.com
Fri Jun 8 12:26:33 EDT 2007


Hi all,

Quick question I've been stuggling with for a day now:

I have a page that uses an outjected variable/bean.
That variable is set by an action bean after selection from a list.
However, when a user accesses the target page directly, without going through the selection page, that variable will be null (normal behaviour indeed).

Now, is there a way to redirect the user to the selection-page when this happens?
I could do this in a page-action method, but the problem is that the target page is restricted (in pages.xml) :

  | <page view-id="/showSpace.xhtml">
  |     <restrict>#{s:hasPermission('space', 'view', selectedSpaceInstance)}</restrict>
  | </page>
  | 

The outjected variable in question here is selectedSpaceInstance, and the restriction-check crashes when it is null, throwing this exception:

  | javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'selectedSpaceInstance'
  | 
even before any page-action is invoked.

Seems like something simple to me, usually done in pages.xml, but I can't seem to find a solution.

any help is, of course, welcome.

b.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052668#4052668

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052668



More information about the jboss-user mailing list