Hi,
Maybe you need more example, the problem is not about subform only.
When i use subform i get a command link like next.
<a href="#" onclick="clear_formPagina_3Aheader_3AheaderSubform();
document.forms['formPagina:header:headerSubform'].elements['autoScroll'].value=getScrolling();
document.forms['formPagina:header:headerSubform'].elements['formPagina:header:headerSubform:_link_hidden_'].value='formPagina:header:headerSubform:linkLogoutHeader';
if(document.forms['formPagina:header:headerSubform'].onsubmit){var result=document.forms['formPagina:header:headerSubform'].onsubmit();
if( (typeof result == 'undefined') || result ) {document.forms['formPagina:header:headerSubform'].submit();}}
else{document.forms['formPagina:header:headerSubform'].submit();}
return false;"
id="formPagina:header:headerSubform:linkLogoutHeader" class="header_dreapta_logout"></a>
Because of _javascript_ error the link is not submited.
Error: clear_formPagina_3Ameniu_3AmeniuSubform is not defined
Source File: http://192.168.2.11:8080/comercial/faces/sec/index.jsp
Line: 1
I have tried today with the last sources from subversion and i get the
same error.
The clear method is not rendered anymore.
I have attached a small example.
Cristi.
Martin Marinschek wrote:
As I said before - the generated _javascript_ is entirely
optional. Shouldn't change anything.
Anyone else having problems with the subForm in the current state?
regards,
Martin
On 6/14/06, Grigoras Cristinel <[EMAIL PROTECTED]> wrote:
Hi,
I have the same problem with the last SVN. Check the name of clear
method .
clear__5Fid4() this is ok ?
Cristi
Martin Marinschek wrote:
The client-side code is totally optional.
The server code handles the results. I don't see what you're not doing
right though, everything looks perfectly alright to me!
regards,
Martin
On 6/13/06, Matthias Wessendorf <[EMAIL PROTECTED]
> wrote:
Maybe
Gerald knows more?
On 6/13/06, Andrew Robinson <[EMAIL PROTECTED]>
wrote:
> If this helps, this is the HTML generated for the command link:
>
> <a href=""
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
> > >
> > >
> > >
> > >
> > >
> >
>
--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
|
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Pagina test subform</title>
</head>
<body>
<f:view>
<h:form id="formPagina">
<f:subview id="headerPagina">
<s:subForm id="formHeader">
<t:commandLink action="ok"
value="reload"></t:commandLink>
</s:subForm>
</f:subview>
<f:subview id="bodyPagina">
<s:subForm id="formBody">
<t:commandLink action="ok"
value="reload"></t:commandLink>
</s:subForm>
</f:subview>
<f:subview id="footerPagina">
<s:subForm id="formFooter">
<t:commandLink action="ok"
value="reload"></t:commandLink>
</s:subForm>
</f:subview>
</h:form>
</f:view>
</body>
</html>