Hi,

Your question is not very clear.
Is the XML file a Wicket i18n file ?
If it is then you can use Component.getString(String key) method.
If it is not then you will need to load and parse it yourself.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Jul 25, 2017 at 2:55 AM, extraquoo <[email protected]> wrote:

> Hi , I want to  get the text from the corresponding xml .
>
> how to get the text from a xml resource file and assign to String variable
> "message" ? my code is below
>
> add(new AbstractBehavior() {
>
>                                         private static final long
> serialVersionUID = 1L;
>
>                                         public void
> renderHead(IHeaderResponse response) {
>                                                 super.renderHead(response);
>                                                 if (!modalRendered) {
>
> response.renderOnLoadJavascript("$('#dialog-message-forms').dialog(
> 'open');");
>                                                         *String
> message="You will be able to attach all supporting
> documentation after you submit the report";*
>                                                         response.
> renderOnLoadJavascript("$('#dialog-message-text').html( '" +
> message +  " ');");
>                                                         modalRendered =
> true;
>                                                 }
>                                         }
>                                 });
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/how-to-implement-resource-bundle-to-
> get-text-from-the-xml-file-tp4678278.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to