Hi there,

I have a page with a Gallery.page.xml looking like this:

<?xml version="1.0" encoding="UTF-8"?>
  | <page xmlns="http://jboss.com/products/seam/pages";
  |       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |       xsi:schemaLocation="http://jboss.com/products/seam/pages 
http://jboss.com/products/seam/pages-2.0.xsd";
  |       login-required="true">
  | 
  |    <param name="tankId" value="#{tankHome.tankId}" required="true"/>
  | 
  | </page>
  | 
This works great when you link to the page with things like <s:link 
view="/Gallery.xhtml" value="Gallery"/>. Basically tankId is populated when you 
use GET parameters.
Within the Gallery.xhtml page I have a form that allows for picture uploading. 
When I hit the upload button I get
javax.faces.validator.ValidatorException: value is requiredIf I remove the 
required="true" attribute from the param it works like a charm. Only thing is I 
have no way of enforcing that a valid id is being provided. I thought that this 
stuff gets automatically populated if I stay withinn the same page and the page 
parameter is set? It work for links but not for JSF form submissions.
I also tried this
<?xml version="1.0" encoding="UTF-8"?>
  | <page xmlns="http://jboss.com/products/seam/pages";
  |       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |       xsi:schemaLocation="http://jboss.com/products/seam/pages 
http://jboss.com/products/seam/pages-2.0.xsd";
  |       login-required="true">
  | 
  |    <param name="tankId" value="#{tankHome.tankId}" />
  |    <restrict>#{tankHome.tankId != null}</restrict>
  | 
  | </page>
but with this I get org.jboss.seam.security.AuthorizationException: 
Authorization check failed for expression [#{tankHome.tankId != null}]
when I submit the upload form. Again the entire upload thing works fine as long 
as I don't try to validate/restrict the tankId/tankHome in page.xml.

I wonder if I got some concepts of auto parameter propagation wrong or if this 
is a bug?

Thanks, Thorsten

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117663
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to