myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Jackson <bar...@umiacs.umd.edu>
Subject Re: subForm semantics
Date Sat, 28 Jul 2007 02:17:42 GMT

Now I'm really confused.  I've tried using subForm two different ways: 
with the subForm scope limiting validation to the contents when inner 
actions occur and subForm scope excluding validation caused by outside 
actions.  Either way, subForm is doing nothing for me.

My current kit is the same from this file, plus the other various things 
that I need for my webapp:

http://people.apache.org/~werpu/tomahawk-sandbox-examples.war

Here is the relevant clause from my web.xml where I configure my taglib 
files:

     <context-param>
         <description>Tag libraries for facelets</description>
         <param-name>facelets.LIBRARIES</param-name>
         <param-value>
 
/WEB-INF/tomahawk.taglib.xml;/WEB-INF/sandbox.taglib.xml;/WEB-INF/facelets/tags/glcf.taglib.xml
         </param-value>
     </context-param>

Here are the entire contents of my sandbox.taglib.xml file:

<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
   "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
   "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">

<facelet-taglib>
     <namespace>http://myfaces.apache.org/sandbox</namespace>
     <tag>
         <tag-name>subForm</tag-name>
         <component>
             <component-type>org.apache.myfaces.SubForm</component-type>
             <renderer-type>org.apache.myfaces.SubForm</renderer-type>
         </component>
     </tag>
</facelet-taglib>

If it's relevant, the place where I am using <s:subForm> is inside of a 
JSF core <f:subview> element.

Gary Jackson wrote:
> 
> As I understand it, subForm works like this:
> 
> <s:subForm id="inner">
>     <h:inputText value="inner"/>
>     <t:commandButton value="Submit Inner"/>
> </s:subForm>
> 
> <h:inputText value="outer"/>
> <t:commandButton value="Submit Outer"/>
> 
> When the "Submit Inner" button is pressed, everything is validated.
> 
> When the "Submit Outer" button is pressed, everything except those 
> components inside the "inner" subForm are validated.
> 
> Assuming this is true, how do I get the inverse behavior?  That is, I 
> want things inside the subForm to be validated when the "Submit Inner" 
> button is pressed, but nothing else?
> 

-- 
Gary

Mime
View raw message