Re: AW: Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Pedro Santos
-- What is TAG_TITLE ? A constant? Why?
A constant to encode/decode an "get" parameter on your behavior callback url

-- What does getCallbackURL do?
http://wicket.apache.org/docs/1.4/org/apache/wicket/behavior/AbstractAjaxBehavior.html#getCallbackUrl%28boolean%29

-- What shall I put into onUpdate() Method (tagTitle textfield)
you will not get your textfield model updated using this strategy. this
behavior attached on your button will only send to server the value on
textfield.

because I have already a form-tag in which I try to execute a seperated
"business logic". And there is no form-nesting allowed...
1-you can implement different onSubmit methods on different form buttons
2-you can create another form (not nested) for your textfield component

the code solution I posted before is just for you have an idea for how
boring and workaround will look like your handler to tagSubmit values

On Mon, Oct 19, 2009 at 10:43 AM, Peter Arnulf Lustig wrote:

> hi pedro,
>
> your code does not function properly (or I'm to stupid to use it :))
>
> -- What is TAG_TITLE ? A constant? Why?
>
> -- What does getCallbackURL do?
>
> -- What shall I put into onUpdate() Method (tagTitle textfield)
>
> many thanks in advance.
>
>
>
> - Ursprüngliche Mail 
> Von: Pedro Santos 
> An: users@wicket.apache.org
> Gesendet: Montag, den 19. Oktober 2009, 13:50:33 Uhr
> Betreff: Re: AW: Ajax Send TextField Input to Server without Form / Submit
>
> add(new Button("tagSubmit").add(new
> AjaxFormComponentUpdatingBehavior("onclick") {
>
>   the AjaxFormComponentUpdatingBehavior are to textfield component
>
> how can I use the content of the textfield?
>
>   new Button("tagSubmit").add(new AjaxEventBehavior("onclick")
>{
>   @Override
>protected void onEvent(AjaxRequestTarget target)
>{
>
> callMyCodeUsingTheInputOnTatTitle(getRequest().getParameter(TAG_TITLE);
>}
>
>@Override
>public CharSequence getCallbackUrl(boolean onlyTargetActivePage)
>{
>return super.getCallbackUrl(onlyTargetActivePage) + "&" +
> TAG_TITLE
>+ "=+Wicket.$('"+tagTitle.getMarkupId()+"').value";
>}
>});
>
> but why don't you what to use the html form tag? you can get is working in
> a
> simpler way, even without use an wicket button component.
>
>
> On Mon, Oct 19, 2009 at 9:38 AM, Peter Arnulf Lustig  >wrote:
>
> > I have to correct myself: I get the right Button.
> > But the next question: how can I use the content of the textfield?
> >
> >
> > final TextField tagTitle = (TextField) new TextField("tagTitle",
> > Model.of("")).setOutputMarkupId(true);
> >add(tagTitle);
> >add(new Button("tagSubmit").add(new
> > AjaxFormComponentUpdatingBehavior("onclick") {
> >
> >    @Override
> >    protected void onUpdate(AjaxRequestTarget arg0) {
> >System.out.println(tagTitle.getModelObject());
> >}
> >
> >}));
> >
> >
> >
> >
> >
> > - Ursprüngliche Mail 
> > Von: Peter Arnulf Lustig 
> > An: users@wicket.apache.org
> > Gesendet: Montag, den 19. Oktober 2009, 13:36:31 Uhr
> > Betreff: AW: Ajax Send TextField Input to Server without Form / Submit
> >
> > What do I do with a "click"-button? The User gets a new  TextField when I
> > try to add an AjaxFormComponentUpdatingBehavior.
> > I just want to have a textfield and next to it a button, where it says
> > "save". And this should happen without a form.
> >
> >
> >
> > - Ursprüngliche Mail 
> > Von: Pedro Santos 
> > An: users@wicket.apache.org
> > Gesendet: Montag, den 19. Oktober 2009, 13:12:34 Uhr
> > Betreff: Re: Ajax Send TextField Input to Server without Form / Submit
> >
> > how is it possible to submit TextField Input to the server without having
> a
> > Form (and submit) for this task?
> > yes, you can use an AjaxFormComponentUpdatingBehavior for it
> >
> > I figured out, that AjaxButton only has onSubmit() Method -- I expected
> > also
> > something like onClick --
> > you can use AjaxEventBehavior to handle onClick event
> >
> > On Mon, Oct 19, 2009 at 8:50 AM, Peter Arnulf Lustig  > >wrote:
> >
> > > Hi,
> > >
> > > how is it possible to submit TextField Input to the server without
> having
> > a

AW: AW: Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Peter Arnulf Lustig
hi pedro,

your code does not function properly (or I'm to stupid to use it :))

-- What is TAG_TITLE ? A constant? Why?

-- What does getCallbackURL do?

-- What shall I put into onUpdate() Method (tagTitle textfield)

many thanks in advance.



- Ursprüngliche Mail 
Von: Pedro Santos 
An: users@wicket.apache.org
Gesendet: Montag, den 19. Oktober 2009, 13:50:33 Uhr
Betreff: Re: AW: Ajax Send TextField Input to Server without Form / Submit

add(new Button("tagSubmit").add(new
AjaxFormComponentUpdatingBehavior("onclick") {

   the AjaxFormComponentUpdatingBehavior are to textfield component

how can I use the content of the textfield?

   new Button("tagSubmit").add(new AjaxEventBehavior("onclick")
{
   @Override
protected void onEvent(AjaxRequestTarget target)
{

callMyCodeUsingTheInputOnTatTitle(getRequest().getParameter(TAG_TITLE);
}

@Override
public CharSequence getCallbackUrl(boolean onlyTargetActivePage)
{
return super.getCallbackUrl(onlyTargetActivePage) + "&" +
TAG_TITLE
+ "=+Wicket.$('"+tagTitle.getMarkupId()+"').value";
}
});

but why don't you what to use the html form tag? you can get is working in a
simpler way, even without use an wicket button component.


On Mon, Oct 19, 2009 at 9:38 AM, Peter Arnulf Lustig wrote:

> I have to correct myself: I get the right Button.
> But the next question: how can I use the content of the textfield?
>
>
> final TextField tagTitle = (TextField) new TextField("tagTitle",
> Model.of("")).setOutputMarkupId(true);
>add(tagTitle);
>add(new Button("tagSubmit").add(new
> AjaxFormComponentUpdatingBehavior("onclick") {
>
>@Override
>protected void onUpdate(AjaxRequestTarget arg0) {
>System.out.println(tagTitle.getModelObject());
>}
>
>    }));
>
>
>
>
>
> ----- Ursprüngliche Mail 
> Von: Peter Arnulf Lustig 
> An: users@wicket.apache.org
> Gesendet: Montag, den 19. Oktober 2009, 13:36:31 Uhr
> Betreff: AW: Ajax Send TextField Input to Server without Form / Submit
>
> What do I do with a "click"-button? The User gets a new  TextField when I
> try to add an AjaxFormComponentUpdatingBehavior.
> I just want to have a textfield and next to it a button, where it says
> "save". And this should happen without a form.
>
>
>
> - Ursprüngliche Mail 
> Von: Pedro Santos 
> An: users@wicket.apache.org
> Gesendet: Montag, den 19. Oktober 2009, 13:12:34 Uhr
> Betreff: Re: Ajax Send TextField Input to Server without Form / Submit
>
> how is it possible to submit TextField Input to the server without having a
> Form (and submit) for this task?
> yes, you can use an AjaxFormComponentUpdatingBehavior for it
>
> I figured out, that AjaxButton only has onSubmit() Method -- I expected
> also
> something like onClick --
> you can use AjaxEventBehavior to handle onClick event
>
> On Mon, Oct 19, 2009 at 8:50 AM, Peter Arnulf Lustig  >wrote:
>
> > Hi,
> >
> > how is it possible to submit TextField Input to the server without having
> a
> > Form (and submit) for this task?
> >
> > I figured out, that AjaxButton only has onSubmit() Method -- I expected
> > also something like onClick --
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AW: AW: Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Peter Arnulf Lustig
thank you -- I will try your solution.

your question:
because I have already a form-tag in which I try to execute a seperated 
"business logic". And there is no form-nesting allowed... 



- Ursprüngliche Mail 
Von: Pedro Santos 
An: users@wicket.apache.org
Gesendet: Montag, den 19. Oktober 2009, 13:50:33 Uhr
Betreff: Re: AW: Ajax Send TextField Input to Server without Form / Submit

add(new Button("tagSubmit").add(new
AjaxFormComponentUpdatingBehavior("onclick") {

   the AjaxFormComponentUpdatingBehavior are to textfield component

how can I use the content of the textfield?

   new Button("tagSubmit").add(new AjaxEventBehavior("onclick")
{
   @Override
protected void onEvent(AjaxRequestTarget target)
{

callMyCodeUsingTheInputOnTatTitle(getRequest().getParameter(TAG_TITLE);
}

@Override
public CharSequence getCallbackUrl(boolean onlyTargetActivePage)
{
return super.getCallbackUrl(onlyTargetActivePage) + "&" +
TAG_TITLE
+ "=+Wicket.$('"+tagTitle.getMarkupId()+"').value";
}
});

but why don't you what to use the html form tag? you can get is working in a
simpler way, even without use an wicket button component.


On Mon, Oct 19, 2009 at 9:38 AM, Peter Arnulf Lustig wrote:

> I have to correct myself: I get the right Button.
> But the next question: how can I use the content of the textfield?
>
>
> final TextField tagTitle = (TextField) new TextField("tagTitle",
> Model.of("")).setOutputMarkupId(true);
>add(tagTitle);
>add(new Button("tagSubmit").add(new
> AjaxFormComponentUpdatingBehavior("onclick") {
>
>@Override
>protected void onUpdate(AjaxRequestTarget arg0) {
>System.out.println(tagTitle.getModelObject());
>}
>
>    }));
>
>
>
>
>
> ----- Ursprüngliche Mail 
> Von: Peter Arnulf Lustig 
> An: users@wicket.apache.org
> Gesendet: Montag, den 19. Oktober 2009, 13:36:31 Uhr
> Betreff: AW: Ajax Send TextField Input to Server without Form / Submit
>
> What do I do with a "click"-button? The User gets a new  TextField when I
> try to add an AjaxFormComponentUpdatingBehavior.
> I just want to have a textfield and next to it a button, where it says
> "save". And this should happen without a form.
>
>
>
> - Ursprüngliche Mail 
> Von: Pedro Santos 
> An: users@wicket.apache.org
> Gesendet: Montag, den 19. Oktober 2009, 13:12:34 Uhr
> Betreff: Re: Ajax Send TextField Input to Server without Form / Submit
>
> how is it possible to submit TextField Input to the server without having a
> Form (and submit) for this task?
> yes, you can use an AjaxFormComponentUpdatingBehavior for it
>
> I figured out, that AjaxButton only has onSubmit() Method -- I expected
> also
> something like onClick --
> you can use AjaxEventBehavior to handle onClick event
>
> On Mon, Oct 19, 2009 at 8:50 AM, Peter Arnulf Lustig  >wrote:
>
> > Hi,
> >
> > how is it possible to submit TextField Input to the server without having
> a
> > Form (and submit) for this task?
> >
> > I figured out, that AjaxButton only has onSubmit() Method -- I expected
> > also something like onClick --
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AW: Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Pedro Santos
 add(new Button("tagSubmit").add(new
AjaxFormComponentUpdatingBehavior("onclick") {

   the AjaxFormComponentUpdatingBehavior are to textfield component

how can I use the content of the textfield?

   new Button("tagSubmit").add(new AjaxEventBehavior("onclick")
{
   @Override
protected void onEvent(AjaxRequestTarget target)
{

callMyCodeUsingTheInputOnTatTitle(getRequest().getParameter(TAG_TITLE);
}

@Override
public CharSequence getCallbackUrl(boolean onlyTargetActivePage)
{
return super.getCallbackUrl(onlyTargetActivePage) + "&" +
TAG_TITLE
+ "=+Wicket.$('"+tagTitle.getMarkupId()+"').value";
}
});

but why don't you what to use the html form tag? you can get is working in a
simpler way, even without use an wicket button component.


On Mon, Oct 19, 2009 at 9:38 AM, Peter Arnulf Lustig wrote:

> I have to correct myself: I get the right Button.
> But the next question: how can I use the content of the textfield?
>
>
> final TextField tagTitle = (TextField) new TextField("tagTitle",
> Model.of("")).setOutputMarkupId(true);
>add(tagTitle);
>add(new Button("tagSubmit").add(new
> AjaxFormComponentUpdatingBehavior("onclick") {
>
>@Override
>protected void onUpdate(AjaxRequestTarget arg0) {
>System.out.println(tagTitle.getModelObject());
>}
>
>    }));
>
>
>
>
>
> - Ursprüngliche Mail 
> Von: Peter Arnulf Lustig 
> An: users@wicket.apache.org
> Gesendet: Montag, den 19. Oktober 2009, 13:36:31 Uhr
> Betreff: AW: Ajax Send TextField Input to Server without Form / Submit
>
> What do I do with a "click"-button? The User gets a new  TextField when I
> try to add an AjaxFormComponentUpdatingBehavior.
> I just want to have a textfield and next to it a button, where it says
> "save". And this should happen without a form.
>
>
>
> - Ursprüngliche Mail 
> Von: Pedro Santos 
> An: users@wicket.apache.org
> Gesendet: Montag, den 19. Oktober 2009, 13:12:34 Uhr
> Betreff: Re: Ajax Send TextField Input to Server without Form / Submit
>
> how is it possible to submit TextField Input to the server without having a
> Form (and submit) for this task?
> yes, you can use an AjaxFormComponentUpdatingBehavior for it
>
> I figured out, that AjaxButton only has onSubmit() Method -- I expected
> also
> something like onClick --
> you can use AjaxEventBehavior to handle onClick event
>
> On Mon, Oct 19, 2009 at 8:50 AM, Peter Arnulf Lustig  >wrote:
>
> > Hi,
> >
> > how is it possible to submit TextField Input to the server without having
> a
> > Form (and submit) for this task?
> >
> > I figured out, that AjaxButton only has onSubmit() Method -- I expected
> > also something like onClick --
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


AW: AW: Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Peter Arnulf Lustig
I have to correct myself: I get the right Button.
But the next question: how can I use the content of the textfield?


final TextField tagTitle = (TextField) new TextField("tagTitle", 
Model.of("")).setOutputMarkupId(true);
add(tagTitle);
add(new Button("tagSubmit").add(new 
AjaxFormComponentUpdatingBehavior("onclick") {

@Override
protected void onUpdate(AjaxRequestTarget arg0) {
System.out.println(tagTitle.getModelObject());
}

}));





- Ursprüngliche Mail 
Von: Peter Arnulf Lustig 
An: users@wicket.apache.org
Gesendet: Montag, den 19. Oktober 2009, 13:36:31 Uhr
Betreff: AW: Ajax Send TextField Input to Server without Form / Submit

What do I do with a "click"-button? The User gets a new  TextField when I try 
to add an AjaxFormComponentUpdatingBehavior.
I just want to have a textfield and next to it a button, where it says "save". 
And this should happen without a form.



- Ursprüngliche Mail 
Von: Pedro Santos 
An: users@wicket.apache.org
Gesendet: Montag, den 19. Oktober 2009, 13:12:34 Uhr
Betreff: Re: Ajax Send TextField Input to Server without Form / Submit

how is it possible to submit TextField Input to the server without having a
Form (and submit) for this task?
yes, you can use an AjaxFormComponentUpdatingBehavior for it

I figured out, that AjaxButton only has onSubmit() Method -- I expected also
something like onClick --
you can use AjaxEventBehavior to handle onClick event

On Mon, Oct 19, 2009 at 8:50 AM, Peter Arnulf Lustig wrote:

> Hi,
>
> how is it possible to submit TextField Input to the server without having a
> Form (and submit) for this task?
>
> I figured out, that AjaxButton only has onSubmit() Method -- I expected
> also something like onClick --
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AW: Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Peter Arnulf Lustig
What do I do with a "click"-button? The User gets a new  TextField when I try 
to add an AjaxFormComponentUpdatingBehavior.
I just want to have a textfield and next to it a button, where it says "save". 
And this should happen without a form.



- Ursprüngliche Mail 
Von: Pedro Santos 
An: users@wicket.apache.org
Gesendet: Montag, den 19. Oktober 2009, 13:12:34 Uhr
Betreff: Re: Ajax Send TextField Input to Server without Form / Submit

how is it possible to submit TextField Input to the server without having a
Form (and submit) for this task?
yes, you can use an AjaxFormComponentUpdatingBehavior for it

I figured out, that AjaxButton only has onSubmit() Method -- I expected also
something like onClick --
you can use AjaxEventBehavior to handle onClick event

On Mon, Oct 19, 2009 at 8:50 AM, Peter Arnulf Lustig wrote:

> Hi,
>
> how is it possible to submit TextField Input to the server without having a
> Form (and submit) for this task?
>
> I figured out, that AjaxButton only has onSubmit() Method -- I expected
> also something like onClick --
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Ernesto Reinaldo Barreiro
I'm not sure you can get rid of the form but you could use a JavaScript
like:
var url = this.url+ '&textField=' + textField.value;
 wicketAjaxGet(url);

Where this.url is the URL of something implementing ILinkListener. The on
the onLinkClicked of the listener read you parameter for the request and
store the value whenever you need on the server side... I use a similar
trick, for some custom components, to update values at server side, that
will change as the result of some user interaction.

Best,

Ernesto

On Mon, Oct 19, 2009 at 12:50 PM, Peter Arnulf Lustig wrote:

> Hi,
>
> how is it possible to submit TextField Input to the server without having a
> Form (and submit) for this task?
>
> I figured out, that AjaxButton only has onSubmit() Method -- I expected
> also something like onClick --
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Pedro Santos
how is it possible to submit TextField Input to the server without having a
Form (and submit) for this task?
yes, you can use an AjaxFormComponentUpdatingBehavior for it

I figured out, that AjaxButton only has onSubmit() Method -- I expected also
something like onClick --
you can use AjaxEventBehavior to handle onClick event

On Mon, Oct 19, 2009 at 8:50 AM, Peter Arnulf Lustig wrote:

> Hi,
>
> how is it possible to submit TextField Input to the server without having a
> Form (and submit) for this task?
>
> I figured out, that AjaxButton only has onSubmit() Method -- I expected
> also something like onClick --
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


Ajax Send TextField Input to Server without Form / Submit

2009-10-19 Thread Peter Arnulf Lustig
Hi,

how is it possible to submit TextField Input to the server without having a 
Form (and submit) for this task?

I figured out, that AjaxButton only has onSubmit() Method -- I expected also 
something like onClick --




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org