You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by amebaliu <am...@yahoo.com> on 2008/05/13 13:37:32 UTC

Questions about Textarea and submit button

I make the component called button which is different compare with submit
component.
The questions I have now is. how can I get the value from textarea without a
submit button.

<t:textArea t:value="task" t:id="editplace" /> <-- I put the value = "task"

And in the page class, i put 	
public void setTask(String task)
	{
		this.task = task;
		System.out.println("This is setting tasks: " + task);
		//tasks.add(this.task);
	}
	
public String getTask()
	{
		this.task = " more event here";
		System.out.println("This is the getting task: "+this.task);
		return this.task;
	}

But somehow, there are not working, because I use my custom button
component. Any suggesstions I can get the values from textarea , or make
setter and getter working??

Thanks a lot
-- 
View this message in context: http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17206414.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Questions about Textarea and submit button

Posted by amebaliu <am...@yahoo.com>.
Hi josh, Thanks for the help, I will try the zone 2nite.. thanks a lot
:working::working:

joshcanfield wrote:
> 
>> Sorry, i forgot to describe the functions of the button.
> No worries, if you want a good answer though, you'll have to ask your
> question with more details.
> 
>> The button is for doing the ajax, like retrieve the results from a
>> arraylist in page class, and display them when i click it. but not for
>> submitting the form, they are a normal button and a normal textarea.
> 
> Generally you post the form to get the contents of the textarea from
> the browser to the server.
> 
> If you don't want the full page to reload you can bind a zone to the
> form. This causes the form to be submitted via ajax and puts the
> results into the zone.
> 
> If you have more complicated requirements then you'll have to spell
> them out a little more specifically.
> 
> Josh
> 
> 
> On Tue, May 13, 2008 at 2:45 PM, amebaliu <am...@yahoo.com> wrote:
>>
>> Sorry, i forgot to describe the functions of the button.
>> The button is for doing the ajax, like retrieve the results from a
>> arraylist in page class, and display them when i click it. but not for
>> submitting the form, they are a normal button and a normal textarea.
>>
>>
>>
>> joshcanfield wrote:
>> >
>> >> I make the component called button which is different compare with
>> submit
>> >> component.
>> >> The questions I have now is. how can I get the value from textarea
>> >> without a
>> >> submit button.
>> >
>> > You haven't shown us what your button does. Are you submitting the
>> > form that the textarea is in?
>> >
>> > Josh
>> >
>> > On Tue, May 13, 2008 at 4:37 AM, amebaliu <am...@yahoo.com> wrote:
>> >>
>> >> I make the component called button which is different compare with
>> submit
>> >> component.
>> >> The questions I have now is. how can I get the value from textarea
>> >> without a
>> >> submit button.
>> >>
>> >> <t:textArea t:value="task" t:id="editplace" /> <-- I put the value =
>> >> "task"
>> >>
>> >> And in the page class, i put
>> >> public void setTask(String task)
>> >>        {
>> >>                this.task = task;
>> >>                System.out.println("This is setting tasks: " + task);
>> >>                //tasks.add(this.task);
>> >>        }
>> >>
>> >> public String getTask()
>> >>        {
>> >>                this.task = " more event here";
>> >>                System.out.println("This is the getting task:
>> >> "+this.task);
>> >>                return this.task;
>> >>        }
>> >>
>> >> But somehow, there are not working, because I use my custom button
>> >> component. Any suggesstions I can get the values from textarea , or
>> make
>> >> setter and getter working??
>> >>
>> >> Thanks a lot
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17206414.html
>> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > --
>> > TheDailyTube.com. Sign up and get the best new videos on the internet
>> > delivered fresh to your inbox.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17219076.html
>>
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17220249.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Questions about Textarea and submit button

Posted by Josh Canfield <jo...@thedailytube.com>.
> Sorry, i forgot to describe the functions of the button.
No worries, if you want a good answer though, you'll have to ask your
question with more details.

> The button is for doing the ajax, like retrieve the results from a
> arraylist in page class, and display them when i click it. but not for
> submitting the form, they are a normal button and a normal textarea.

Generally you post the form to get the contents of the textarea from
the browser to the server.

If you don't want the full page to reload you can bind a zone to the
form. This causes the form to be submitted via ajax and puts the
results into the zone.

If you have more complicated requirements then you'll have to spell
them out a little more specifically.

Josh


On Tue, May 13, 2008 at 2:45 PM, amebaliu <am...@yahoo.com> wrote:
>
> Sorry, i forgot to describe the functions of the button.
> The button is for doing the ajax, like retrieve the results from a
> arraylist in page class, and display them when i click it. but not for
> submitting the form, they are a normal button and a normal textarea.
>
>
>
> joshcanfield wrote:
> >
> >> I make the component called button which is different compare with submit
> >> component.
> >> The questions I have now is. how can I get the value from textarea
> >> without a
> >> submit button.
> >
> > You haven't shown us what your button does. Are you submitting the
> > form that the textarea is in?
> >
> > Josh
> >
> > On Tue, May 13, 2008 at 4:37 AM, amebaliu <am...@yahoo.com> wrote:
> >>
> >> I make the component called button which is different compare with submit
> >> component.
> >> The questions I have now is. how can I get the value from textarea
> >> without a
> >> submit button.
> >>
> >> <t:textArea t:value="task" t:id="editplace" /> <-- I put the value =
> >> "task"
> >>
> >> And in the page class, i put
> >> public void setTask(String task)
> >>        {
> >>                this.task = task;
> >>                System.out.println("This is setting tasks: " + task);
> >>                //tasks.add(this.task);
> >>        }
> >>
> >> public String getTask()
> >>        {
> >>                this.task = " more event here";
> >>                System.out.println("This is the getting task:
> >> "+this.task);
> >>                return this.task;
> >>        }
> >>
> >> But somehow, there are not working, because I use my custom button
> >> component. Any suggesstions I can get the values from textarea , or make
> >> setter and getter working??
> >>
> >> Thanks a lot
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17206414.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> >
> > --
> > --
> > TheDailyTube.com. Sign up and get the best new videos on the internet
> > delivered fresh to your inbox.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17219076.html
>
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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


Re: Questions about Textarea and submit button

Posted by amebaliu <am...@yahoo.com>.
Sorry, i forgot to describe the functions of the button. 
The button is for doing the ajax, like retrieve the results from a 
arraylist in page class, and display them when i click it. but not for
submitting the form, they are a normal button and a normal textarea.


joshcanfield wrote:
> 
>> I make the component called button which is different compare with submit
>> component.
>> The questions I have now is. how can I get the value from textarea
>> without a
>> submit button.
> 
> You haven't shown us what your button does. Are you submitting the
> form that the textarea is in?
> 
> Josh
> 
> On Tue, May 13, 2008 at 4:37 AM, amebaliu <am...@yahoo.com> wrote:
>>
>> I make the component called button which is different compare with submit
>> component.
>> The questions I have now is. how can I get the value from textarea
>> without a
>> submit button.
>>
>> <t:textArea t:value="task" t:id="editplace" /> <-- I put the value =
>> "task"
>>
>> And in the page class, i put
>> public void setTask(String task)
>>        {
>>                this.task = task;
>>                System.out.println("This is setting tasks: " + task);
>>                //tasks.add(this.task);
>>        }
>>
>> public String getTask()
>>        {
>>                this.task = " more event here";
>>                System.out.println("This is the getting task:
>> "+this.task);
>>                return this.task;
>>        }
>>
>> But somehow, there are not working, because I use my custom button
>> component. Any suggesstions I can get the values from textarea , or make
>> setter and getter working??
>>
>> Thanks a lot
>> --
>> View this message in context:
>> http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17206414.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17219076.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Questions about Textarea and submit button

Posted by Josh Canfield <jo...@thedailytube.com>.
> I make the component called button which is different compare with submit
> component.
> The questions I have now is. how can I get the value from textarea without a
> submit button.

You haven't shown us what your button does. Are you submitting the
form that the textarea is in?

Josh

On Tue, May 13, 2008 at 4:37 AM, amebaliu <am...@yahoo.com> wrote:
>
> I make the component called button which is different compare with submit
> component.
> The questions I have now is. how can I get the value from textarea without a
> submit button.
>
> <t:textArea t:value="task" t:id="editplace" /> <-- I put the value = "task"
>
> And in the page class, i put
> public void setTask(String task)
>        {
>                this.task = task;
>                System.out.println("This is setting tasks: " + task);
>                //tasks.add(this.task);
>        }
>
> public String getTask()
>        {
>                this.task = " more event here";
>                System.out.println("This is the getting task: "+this.task);
>                return this.task;
>        }
>
> But somehow, there are not working, because I use my custom button
> component. Any suggesstions I can get the values from textarea , or make
> setter and getter working??
>
> Thanks a lot
> --
> View this message in context: http://www.nabble.com/Questions-about-Textarea-and-submit-button-tp17206414p17206414.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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