Re: SimpleAttributeModifier on SubmitLink?

2009-11-03 Thread Martijn Dashorst
Take a look at AttributeAppender, and transform it into AttributePrepender

Martijn

On Tue, Nov 3, 2009 at 10:23 AM, Peter Arnulf Lustig  wrote:
> Hi,
>
> how can I achieve something like that:
>
>
> abschliessen = (SubmitLink) new SubmitLink("abschliessen", antwortForm) {
>           �...@override
>            public void onSubmit() {
>                preQuestionInit();
>                Worker.ClosingTestprocedure(tp);
>                preQuestionInit();
>            }
>        }
>                .add(new SimpleAttributeModifier(
>                        "onclick",
>                        "return confirm('Information...');"));
>
> I detected, that the add Statement overwrites the "onclick" handler for the 
> form submit! How can I have both: After click on the "Ok-Button" it should 
> fire up the form.
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0

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



Re: SimpleAttributeModifier on SubmitLink?

2009-11-03 Thread Ernesto Reinaldo Barreiro
I have used ModalWindow for similar use cases... and then do the actual work
on the ok button of a modal confirmation dialog. Is that approach fine for
your use case?

Regards,

Ernesto

On Tue, Nov 3, 2009 at 10:23 AM, Peter Arnulf Lustig wrote:

> Hi,
>
> how can I achieve something like that:
>
>
> abschliessen = (SubmitLink) new SubmitLink("abschliessen", antwortForm) {
>@Override
>public void onSubmit() {
>preQuestionInit();
>Worker.ClosingTestprocedure(tp);
>preQuestionInit();
>}
>}
>.add(new SimpleAttributeModifier(
>"onclick",
>"return confirm('Information...');"));
>
> I detected, that the add Statement overwrites the "onclick" handler for the
> form submit! How can I have both: After click on the "Ok-Button" it should
> fire up the form.
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


SimpleAttributeModifier on SubmitLink?

2009-11-03 Thread Peter Arnulf Lustig
Hi,

how can I achieve something like that:


abschliessen = (SubmitLink) new SubmitLink("abschliessen", antwortForm) {
@Override
public void onSubmit() {
preQuestionInit();
Worker.ClosingTestprocedure(tp);
preQuestionInit();
}
}
.add(new SimpleAttributeModifier(
"onclick",
"return confirm('Information...');"));

I detected, that the add Statement overwrites the "onclick" handler for the 
form submit! How can I have both: After click on the "Ok-Button" it should fire 
up the form.





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