On 9/20/06, Manuel Barzi <[EMAIL PROTECTED]> wrote:
Hi, there,

I am working with I18N and I have an HTML INPUT that has its "value"
property to be updated to the current locale, but also has to react as
a link when clicking, by means of "onClick" property.

what do you mean act as a link when clicked? a button submits the form - that is its purpose. if you dont want it to submit the form then instead of using type="submit" use type="button" and dont use Button but a webmarkupcontainer that sets the onclick attr to whatever you want.

-Igor


 

I do this in wicket-java-side:
-->
labelModel = new StringResourceModel("CaocAdminPage-lit-8", this, null);
                add(new Button("CaocAdminPage-link-1", labelModel) {
                        public void onSubmit() {
                                setResponsePage(new CaocMantenimentRolsCertficatsCiutadaPage());
                        }
                });
<--

And the html-side:
-->
<input value="Veure / Editar" name="nou" class="buttonEditar"
wicket:id="CaocAdminPage-link-1" type="submit">
<--

When testing the page it shows with the correct locale, but the LINK
DOESNT WORK - "onClick" overriden method does not make the button to
work as link. The html-output obtained does not provide the "onclick"
correctly filled up by Wicket, as show here:
-->
<input value="Ver / Editar" type="submit" class="buttonEditar"
wicket:id="CaocAdminPage-link-1" name="CaocAdminPage-link-1">
<--

I guess I should not use Button by some wicket-reason, then my question is:

to achieve this goal of providing an INPUT with I18N and "onClick"
(link capability), what would you recommend?

Grazie.

Manu

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to