Open GoogleCodeExporter opened 9 years ago
Hi,
These examples are rather old and wicket JavaScript API has changed a lot from
1.4.x to 6.x. I do not think these examples ever where migrated to 6.x. In fact
they where dropped from wiquery on 1.5.x branch. Wiquery development have moved
to github
Original comment by reier...@gmail.com
on 18 Jul 2013 at 6:59
Thank you for your comment.
Unfortunately, marking this ticket as invalid does not solve my problem :-)
That sample was the only way to implement a dialog with a form using wiQuery,
and as you say starting from 6.0 such a feature is not supported anymore in
wiQuery. Isn't it a regression?
I'll try replacing wiquery with wicket-jquery-ui - the dialog there is much
more functional.
Original comment by ascheti...@gmail.com
on 18 Jul 2013 at 8:02
No want I say is that this a code on an example.... and those examples are no
longer part of wiquery. And the JavaScript API of wicket have changed. If you
describe what you are trying to achieve I could try to see how to achieve that
on WiQuery 6.x
Original comment by reier...@gmail.com
on 18 Jul 2013 at 8:53
As I said - my case is exactly the same as in that sample.
I have a Dialog with a complex Form inside.
And I want, when Ok is clicked, to submit the form data.
Previously it worked fine with that function wicketSubmitFormById(), but in
Wicket 6.9 the function does not exist anymore, and none of Wicket 6 approaches
worked.
Original comment by ascheti...@gmail.com
on 18 Jul 2013 at 9:01
I will have a look... and see if I can add something to wiquery to make this
use case easier to implement. Reopening the issue
Original comment by reier...@gmail.com
on 18 Jul 2013 at 9:07
I found a workaround that works.
I've added an invisible link into the dialog:
HTML code for the link:
<a wicket:id="submitFormInvisibleButton" style="visibility: collapse;" />
Java code for the link:
submitLink = new AjaxSubmitLink( "submitFormInvisibleButton", form ) {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit( AjaxRequestTarget target, Form<?> form ) {
super.onSubmit( target, form );
form.onFormSubmitted();
if( form.hasError() ) {
logger.debug( "AjaxSubmitLink.respond() error" );
} else {
logger.debug( "AjaxSubmitLink.respond() onOK" );
onOk(target);
}
}
};
submitLink.setOutputMarkupId( true );
form.add( submitLink );
JavaScript to be added to the OK button:
sb.append( "$('a#" ).append( submitLink.getMarkupId() )
.append( "').triggerHandler('click');" );
That worked - good enough for me.
Anyway, I'd recommend to have a generic solution for this use case - it should
be quite common, IMHO.
Original comment by ascheti...@gmail.com
on 18 Jul 2013 at 9:43
Original issue reported on code.google.com by
ascheti...@gmail.com
on 16 Jul 2013 at 3:27