If this helps, this is the HTML generated for the command link:

<a href="#" 
onclick="clear__5Fid4();document.forms['_id4'].elements['autoScroll'].value=getScrolling();document.forms['_id4'].elements['_id4:_link_hidden_'].value='_id4:addEmailForm:_id48';if(document.forms['_id4'].onsubmit){var
result=document.forms['_id4'].onsubmit();  if( (typeof result ==
'undefined') || result )
{document.forms['_id4'].submit();}}else{document.forms['_id4'].submit();}return
false;" id="_id4:addEmailForm:_id48" title="Add Email"
class="imageButton">...</a>

I don't know if there should be any special "subForm" code in that
onclick that isn't there.

On 6/13/06, Andrew Robinson <[EMAIL PROTECTED]> wrote:
I am using facelets, so it is a bit different:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
        xmlns:f="http://java.sun.com/jsf/core";
        xmlns:ui="http://java.sun.com/jsf/facelets";
        xmlns:h="http://java.sun.com/jsf/html";
        xmlns:b="http://bethanyefree.org/jsf/facelets";
        xmlns:t="http://myfaces.apache.org/tomahawk";
        xmlns:c="http://java.sun.com/jsp/jstl/core";
        xmlns:jdt="http://www.jenia.org/jsf/dataTools";
        xmlns:s="http://myfaces.apache.org/sandbox";
        xmlns:jsfcomp="http://sf.net.jsfcomp.validator";>

tomahawk-sandbox.taglib.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD
Facelet Taglib 1.0//EN" "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>

That should do it I would think.

Anyone else see what I have done wrong?

-Andrew

On 6/13/06, Michael Heinen <[EMAIL PROTECTED]> wrote:
> very quick shot:
>
> I had this problem a time because I forgot to add the taglib or used a
> wrong prefix.
> <%@ taglib uri="http://myfaces.apache.org/sandbox"; prefix="s"%>
>
> Subforms are working well in my app.
> Your code looks ok to me.
>
>
> -----Original Message-----
> From: Andrew Robinson [mailto:[EMAIL PROTECTED]
> Sent: Dienstag, 13. Juni 2006 15:39
> To: MyFaces Discussion
> Subject: Does SubForm do anything?
>
> I attempted to use the subForm sandbox component with absolutely no
> luck.
>
> I had a page like:
>
> <f:form>
>   <t:panelGrid>
>     <t:panelGroup>
>       <t:inputText required="true"><f:validateLength minimum="15"
> maximum="30"/></t:inputText>
>     </t:panelGroup>
>     <t:panelGroup>
>       <s:subForm id="clickMeForm">
>         <t:commandLink value="clickMe" />
>       </s:subForm>
>     </t:panelGroup>
>   </t:panelGrid>
> </f:form>
>
> When I click the command link, I get validation errors from the input
> text outside of the subform. Correct me if I am wrong, but I thought
> the whole point of the subform was to stop validation and updating
> outside of that component.
>
> What am I doing wrong?
>
> Tomahawk 1.1.2
> Sandbox snapshot 2006-05-13
>
> Thanks,
> Andrew
>
>
>
>
>

Reply via email to