You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mallik <ma...@yahoo.com> on 2006/09/14 08:09:56 UTC
Validation framework for Dynamically added HTML elements?
Hi Friends
i have one form where user enter his family details
for this i create on row of fields (like name,relationtype,occupation) if
user want to add one more relation, he click on addmore button then i
provied one more row and user need more, click on addmore and i create
another row
this way my form will get fields dynamically using javascript
createElement() method,
now i want to add validation framework for this form
how to manage in struts-config.xml ( for each form field we specify
<form-property name="" type=""/>
or is there any alternative solution for this problem in struts framework
please let me know
urs
Mallik
--
View this message in context: http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-elements--tf2269760.html#a6300004
Sent from the Struts - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Hpw to pass multiple parameters in
Posted by Laurie Harper <la...@holoweb.net>.
Alternatively, you can stick with html:link but supply your parameters
as a map:
<html:link action="..." name="myParamMap"
or
<html:link action="..." name="myBeanMap" property="myParamMap"
See the documentation for the html:link tag for more details:
http://struts.apache.org/1.2.9/userGuide/struts-html.html#link
L.
Andrè Kapp (AJ) wrote:
> You can use this type of link
>
> href='<c:url value="/mailMemberAction.do?exec=updateValidMailMember"
> context="/xxxxxxxxxxxxx"> // put your app name here to keep context
> <c:param name="masterGroupName"
> value="${groups.masterGroupName}"/>
> <c:param name="listName"
> value="${groups.listName}"/>
> <c:param name="memberName"
> value="${groups.memberName}"/>
> </c:url>'>
>
> Andre
>
> -----Original Message-----
> From: Sheetal Gupta [mailto:Sheetal.Gupta@hsc.com]
> Sent: 14 September 2006 02:20 PM
> To: Struts Users Mailing List
> Subject: Hpw to pass multiple parameters in <html:link>
>
> Hi,
> Can anybody tell me how to pass multiple parameters in <html:link> I
> tried the following snippet, <bean:define id="cmdExec" value=
> "CmdExec" /> <tr> <td> <bean:define id="deviceType" value= "ACU" />
>
> <html:link action="/dispatchBrowser.do" paramId="DeviceType"
> paramName
> ="deviceType"
> paramId="Module" paramName="cmdExec" target="showframe" >cmd</
> html:link>
> </td>
> </tr>
> :
> but it don't work..
> It is only giving value of "Module"
> and not the "DeviceType"
>
> Regards,
> Sheetal
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> This e-mail and its contents are subject to the Telkom SA Limited
> e-mail legal notice available at
> http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Hpw to pass multiple parameters in
Posted by "Andrè Kapp (AJ)" <Ka...@telkom.co.za>.
You can use this type of link
href='<c:url value="/mailMemberAction.do?exec=updateValidMailMember"
context="/xxxxxxxxxxxxx"> // put your app name here to keep context
<c:param name="masterGroupName"
value="${groups.masterGroupName}"/>
<c:param name="listName"
value="${groups.listName}"/>
<c:param name="memberName"
value="${groups.memberName}"/>
</c:url>'>
Andre
-----Original Message-----
From: Sheetal Gupta [mailto:Sheetal.Gupta@hsc.com]
Sent: 14 September 2006 02:20 PM
To: Struts Users Mailing List
Subject: Hpw to pass multiple parameters in <html:link>
Hi,
Can anybody tell me how to pass multiple parameters in <html:link> I
tried the following snippet, <bean:define id="cmdExec" value=
"CmdExec" /> <tr> <td> <bean:define id="deviceType" value= "ACU" />
<html:link action="/dispatchBrowser.do" paramId="DeviceType"
paramName
="deviceType"
paramId="Module" paramName="cmdExec" target="showframe" >cmd</
html:link>
</td>
</tr>
:
but it don't work..
It is only giving value of "Module"
and not the "DeviceType"
Regards,
Sheetal
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Hpw to pass multiple parameters in
Posted by Sheetal Gupta <Sh...@hsc.com>.
Hi,
Can anybody tell me how to pass multiple parameters
in <html:link>
I tried the following snippet,
<bean:define id="cmdExec" value= "CmdExec" />
<tr>
<td>
<bean:define id="deviceType" value= "ACU" />
<html:link action="/dispatchBrowser.do" paramId="DeviceType" paramName
="deviceType"
paramId="Module" paramName="cmdExec" target="showframe" >cmd</
html:link>
</td>
</tr>
:
but it don't work..
It is only giving value of "Module"
and not the "DeviceType"
Regards,
Sheetal
RE: Validation framework for Dynamically added HTML elements?
Posted by Mallik <ma...@yahoo.com>.
Hi friend,
i want how to create array of elements
please help me
urs
Mallik
Patil, Sheetal wrote:
>
> U can create array and create field as per reqiuirment,but this has
> limit and here problem is for "arrayindexoutofboundexception" after
> limit exceeds.
> Elsewise u can use ajax, put ur form in session and send requeset to an
> action which will increase the size of array and again put into the
> session. Then u can dynamically create as many fields u want...
>
> -----Original Message-----
> From: Mallik [mailto:malli345@yahoo.com]
> Sent: Thursday, September 14, 2006 11:40 AM
> To: user@struts.apache.org
> Subject: Validation framework for Dynamically added HTML elements?
>
>
> Hi Friends
> i have one form where user enter his family details for this i create on
> row of fields (like name,relationtype,occupation) if user want to add
> one more relation, he click on addmore button then i provied one more
> row and user need more, click on addmore and i create another row this
> way my form will get fields dynamically using javascript
> createElement() method,
> now i want to add validation framework for this form how to manage in
> struts-config.xml ( for each form field we specify <form-property
> name="" type=""/> or is there any alternative solution for this problem
> in struts framework please let me know urs Mallik
>
> --
> View this message in context:
> http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-el
> ements--tf2269760.html#a6300004
> Sent from the Struts - User forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-elements--tf2269760.html#a6303477
Sent from the Struts - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation framework for Dynamically added HTML elements?
Posted by Laurie Harper <la...@holoweb.net>.
You can achieve what you want more simply; no need to start using Ajax
just for expanding an input form :-)
What you need to do is to generate additional rows that use the correct
naming conventions for the parameter names. Start by getting the form
working for some fixed number of input rows, backed by indexed
properties in your form bean. Then just modify your Javascript as
necessary so that the dynamically generated inputs look the same as the
ones that were served by Struts.
L.
Patil, Sheetal wrote:
> U can create array and create field as per reqiuirment,but this has
> limit and here problem is for "arrayindexoutofboundexception" after
> limit exceeds.
> Elsewise u can use ajax, put ur form in session and send requeset to an
> action which will increase the size of array and again put into the
> session. Then u can dynamically create as many fields u want...
>
> -----Original Message-----
> From: Mallik [mailto:malli345@yahoo.com]
> Sent: Thursday, September 14, 2006 11:40 AM
> To: user@struts.apache.org
> Subject: Validation framework for Dynamically added HTML elements?
>
>
> Hi Friends
> i have one form where user enter his family details for this i create on
> row of fields (like name,relationtype,occupation) if user want to add
> one more relation, he click on addmore button then i provied one more
> row and user need more, click on addmore and i create another row this
> way my form will get fields dynamically using javascript
> createElement() method,
> now i want to add validation framework for this form how to manage in
> struts-config.xml ( for each form field we specify <form-property
> name="" type=""/> or is there any alternative solution for this problem
> in struts framework please let me know urs Mallik
>
> --
> View this message in context:
> http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-el
> ements--tf2269760.html#a6300004
> Sent from the Struts - User forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Validation framework for Dynamically added HTML elements?
Posted by "Patil, Sheetal" <pa...@diebold.com>.
U can create array and create field as per reqiuirment,but this has
limit and here problem is for "arrayindexoutofboundexception" after
limit exceeds.
Elsewise u can use ajax, put ur form in session and send requeset to an
action which will increase the size of array and again put into the
session. Then u can dynamically create as many fields u want...
-----Original Message-----
From: Mallik [mailto:malli345@yahoo.com]
Sent: Thursday, September 14, 2006 11:40 AM
To: user@struts.apache.org
Subject: Validation framework for Dynamically added HTML elements?
Hi Friends
i have one form where user enter his family details for this i create on
row of fields (like name,relationtype,occupation) if user want to add
one more relation, he click on addmore button then i provied one more
row and user need more, click on addmore and i create another row this
way my form will get fields dynamically using javascript
createElement() method,
now i want to add validation framework for this form how to manage in
struts-config.xml ( for each form field we specify <form-property
name="" type=""/> or is there any alternative solution for this problem
in struts framework please let me know urs Mallik
--
View this message in context:
http://www.nabble.com/Validation-framework-for-Dynamically-added-HTML-el
ements--tf2269760.html#a6300004
Sent from the Struts - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org