You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Bode, Bianca" <bi...@hp.com> on 2006/05/16 16:14:16 UTC

Accessing unbound textfields

Hello all,

I was wondering if anyone has ever did something like I've described
below, and if so how???:

I need to make a page with 1 textfield, and when some enters a number in
this Textfield I generate (with javascript) that number of extra
Textfields.
Tapestry is unaware of these extra fields, as I have generated them at
client-side.
Upon form submission I need these textfields so I can create new objects
(1 for each field) and set one of the properties with the value entered
in the TextField.

I have no idea how to go about this.
Anyone?

Kind regards, Bianca

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Accessing unbound textfields

Posted by "Bode, Bianca" <bi...@hp.com>.
Thanks for your suggestion Lothar. 
But I think it will be faster/easier to just use the
getParameter/getParameters methods from the IRequestCycle after form
submission to retrieve the generated fields, as Andreas was suggesting.

Kind regards, Bianca


-----Original Message-----
From: Lothar Reisinger [mailto:sw@reisinger-training.de] 
Sent: dinsdag 16 mei 2006 16:31
To: Tapestry users
Subject: Re: Accessing unbound textfields

Create an own component, derived from AbstractFormComponent.
Build the html in the method renderFormComponent.
Receive the parameters in the method rewindFormComponent.
You should manage the required javascript with the tapestry script
mechanism in the same class.

Does that help?


Bode, Bianca wrote:
> Hello all,
> 
> I was wondering if anyone has ever did something like I've described 
> below, and if so how???:
> 
> I need to make a page with 1 textfield, and when some enters a number 
> in this Textfield I generate (with javascript) that number of extra 
> Textfields.
> Tapestry is unaware of these extra fields, as I have generated them at

> client-side.
> Upon form submission I need these textfields so I can create new 
> objects
> (1 for each field) and set one of the properties with the value 
> entered in the TextField.
> 
> I have no idea how to go about this.
> Anyone?
> 
> Kind regards, Bianca
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Accessing unbound textfields

Posted by Lothar Reisinger <sw...@reisinger-training.de>.
Create an own component, derived from AbstractFormComponent.
Build the html in the method renderFormComponent.
Receive the parameters in the method rewindFormComponent.
You should manage the required javascript with the tapestry script 
mechanism in the same class.

Does that help?


Bode, Bianca wrote:
> Hello all,
> 
> I was wondering if anyone has ever did something like I've described
> below, and if so how???:
> 
> I need to make a page with 1 textfield, and when some enters a number in
> this Textfield I generate (with javascript) that number of extra
> Textfields.
> Tapestry is unaware of these extra fields, as I have generated them at
> client-side.
> Upon form submission I need these textfields so I can create new objects
> (1 for each field) and set one of the properties with the value entered
> in the TextField.
> 
> I have no idea how to go about this.
> Anyone?
> 
> Kind regards, Bianca
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Accessing unbound textfields

Posted by "Bode, Bianca" <bi...@hp.com>.
OK that's what I need, thank you :) 

-----Original Message-----
From: Andreas Andreou [mailto:andyhot@di.uoa.gr] 
Sent: dinsdag 16 mei 2006 16:39
To: Tapestry users
Subject: Re: Accessing unbound textfields

See
http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/
IRequestCycle.html

getParameter and getParameters will do the trick

Bode, Bianca wrote:
> Hello all,
>
> I was wondering if anyone has ever did something like I've described 
> below, and if so how???:
>
> I need to make a page with 1 textfield, and when some enters a number 
> in this Textfield I generate (with javascript) that number of extra 
> Textfields.
> Tapestry is unaware of these extra fields, as I have generated them at

> client-side.
> Upon form submission I need these textfields so I can create new 
> objects
> (1 for each field) and set one of the properties with the value 
> entered in the TextField.
>
> I have no idea how to go about this.
> Anyone?
>
> Kind regards, Bianca
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Accessing unbound textfields

Posted by Lothar Reisinger <sw...@reisinger-training.de>.
The html input fields do have a name attribute? They are inside a form? 
The form is submitted?
cycle.getParameter("fieldname") works for me.

Bode, Bianca schrieb:
> Looks like the generated textfields cannot be accessed through
> getParameter/getParameters
> I've debugged and manually checked the QueryParameterMap of the
> RequestCycle, but they're nowhere in sight :(
> 
> -----Original Message-----
> From: Andreas Andreou [mailto:andyhot@di.uoa.gr] 
> Sent: dinsdag 16 mei 2006 16:39
> To: Tapestry users
> Subject: Re: Accessing unbound textfields
> 
> See
> http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/
> IRequestCycle.html
> 
> getParameter and getParameters will do the trick
> 
> Bode, Bianca wrote:
>> Hello all,
>>
>> I was wondering if anyone has ever did something like I've described 
>> below, and if so how???:
>>
>> I need to make a page with 1 textfield, and when some enters a number 
>> in this Textfield I generate (with javascript) that number of extra 
>> Textfields.
>> Tapestry is unaware of these extra fields, as I have generated them at
> 
>> client-side.
>> Upon form submission I need these textfields so I can create new 
>> objects
>> (1 for each field) and set one of the properties with the value 
>> entered in the TextField.
>>
>> I have no idea how to go about this.
>> Anyone?
>>
>> Kind regards, Bianca
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Accessing unbound textfields

Posted by Andreas Andreou <an...@di.uoa.gr>.
Change submit method from POST to GET and check if the
new textfields are indeed included in the submit.

Bode, Bianca wrote:
> Looks like the generated textfields cannot be accessed through
> getParameter/getParameters
> I've debugged and manually checked the QueryParameterMap of the
> RequestCycle, but they're nowhere in sight :(
>
> -----Original Message-----
> From: Andreas Andreou [mailto:andyhot@di.uoa.gr] 
> Sent: dinsdag 16 mei 2006 16:39
> To: Tapestry users
> Subject: Re: Accessing unbound textfields
>
> See
> http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/
> IRequestCycle.html
>
> getParameter and getParameters will do the trick
>
> Bode, Bianca wrote:
>   
>> Hello all,
>>
>> I was wondering if anyone has ever did something like I've described 
>> below, and if so how???:
>>
>> I need to make a page with 1 textfield, and when some enters a number 
>> in this Textfield I generate (with javascript) that number of extra 
>> Textfields.
>> Tapestry is unaware of these extra fields, as I have generated them at
>>     
>
>   
>> client-side.
>> Upon form submission I need these textfields so I can create new 
>> objects
>> (1 for each field) and set one of the properties with the value 
>> entered in the TextField.
>>
>> I have no idea how to go about this.
>> Anyone?
>>
>> Kind regards, Bianca
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>   
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Accessing unbound textfields

Posted by "Bode, Bianca" <bi...@hp.com>.
Never mind, I was to quick with my reply ;)
I forgot to add the name attribute to the generated fields :) 

-----Original Message-----
From: Bode, Bianca 
Sent: dinsdag 16 mei 2006 17:37
To: Tapestry users
Subject: RE: Accessing unbound textfields

Looks like the generated textfields cannot be accessed through
getParameter/getParameters I've debugged and manually checked the
QueryParameterMap of the RequestCycle, but they're nowhere in sight :(

-----Original Message-----
From: Andreas Andreou [mailto:andyhot@di.uoa.gr]
Sent: dinsdag 16 mei 2006 16:39
To: Tapestry users
Subject: Re: Accessing unbound textfields

See
http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/
IRequestCycle.html

getParameter and getParameters will do the trick

Bode, Bianca wrote:
> Hello all,
>
> I was wondering if anyone has ever did something like I've described 
> below, and if so how???:
>
> I need to make a page with 1 textfield, and when some enters a number 
> in this Textfield I generate (with javascript) that number of extra 
> Textfields.
> Tapestry is unaware of these extra fields, as I have generated them at

> client-side.
> Upon form submission I need these textfields so I can create new 
> objects
> (1 for each field) and set one of the properties with the value 
> entered in the TextField.
>
> I have no idea how to go about this.
> Anyone?
>
> Kind regards, Bianca
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Accessing unbound textfields

Posted by "Bode, Bianca" <bi...@hp.com>.
Looks like the generated textfields cannot be accessed through
getParameter/getParameters
I've debugged and manually checked the QueryParameterMap of the
RequestCycle, but they're nowhere in sight :(

-----Original Message-----
From: Andreas Andreou [mailto:andyhot@di.uoa.gr] 
Sent: dinsdag 16 mei 2006 16:39
To: Tapestry users
Subject: Re: Accessing unbound textfields

See
http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/
IRequestCycle.html

getParameter and getParameters will do the trick

Bode, Bianca wrote:
> Hello all,
>
> I was wondering if anyone has ever did something like I've described 
> below, and if so how???:
>
> I need to make a page with 1 textfield, and when some enters a number 
> in this Textfield I generate (with javascript) that number of extra 
> Textfields.
> Tapestry is unaware of these extra fields, as I have generated them at

> client-side.
> Upon form submission I need these textfields so I can create new 
> objects
> (1 for each field) and set one of the properties with the value 
> entered in the TextField.
>
> I have no idea how to go about this.
> Anyone?
>
> Kind regards, Bianca
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Accessing unbound textfields

Posted by Andreas Andreou <an...@di.uoa.gr>.
See
http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/IRequestCycle.html

getParameter and getParameters will do the trick

Bode, Bianca wrote:
> Hello all,
>
> I was wondering if anyone has ever did something like I've described
> below, and if so how???:
>
> I need to make a page with 1 textfield, and when some enters a number in
> this Textfield I generate (with javascript) that number of extra
> Textfields.
> Tapestry is unaware of these extra fields, as I have generated them at
> client-side.
> Upon form submission I need these textfields so I can create new objects
> (1 for each field) and set one of the properties with the value entered
> in the TextField.
>
> I have no idea how to go about this.
> Anyone?
>
> Kind regards, Bianca
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org