Internationalized titles

2009-05-04 Thread Shelah Horvitz
I want to internationalize the title of my application, so that I would get its 
value from a properties file, and the HTML would look something like:

head
  titlespan wicket:id=appTitle/span/title
/head

It doesn't look like I can use a header contributor to do this sort of thing, 
so how is it done?

Thanks for your help.

Shelah


RE: Internationalized titles

2009-05-04 Thread Shelah Horvitz
Many thanks!


From: Jeremy Thomerson [jer...@wickettraining.com]
Sent: Monday, May 04, 2009 2:08 PM
To: users@wicket.apache.org
Subject: Re: Internationalized titles

add(new Label(appTitle, new ResourceModel(your.title.key));

also, change your html:
title wicket:id=appTitlethis will be replaced/title

Of course, if you don't use markup inheritance, you'll need to repeat
this throughout each page.

--
Jeremy Thomerson
http://www.wickettraining.com




On Mon, May 4, 2009 at 1:02 PM, Shelah Horvitz
shelah.horv...@blackwave.tv wrote:
 I want to internationalize the title of my application, so that I would get 
 its value from a properties file, and the HTML would look something like:

 head
  titlespan wicket:id=appTitle/span/title
 /head

 It doesn't look like I can use a header contributor to do this sort of thing, 
 so how is it done?

 Thanks for your help.

 Shelah


-
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



RE: How to expose regular exception message in FeedbackPanel?

2008-10-06 Thread Shelah Horvitz
Thank you.  I can't believe you got back to me so fast!

This is a slick solution.  I appreciate it.



From: Serkan Camurcuoglu [EMAIL PROTECTED]
Sent: Monday, October 06, 2008 2:36 PM
To: users@wicket.apache.org
Subject: Re: How to expose regular exception message in FeedbackPanel?

you can use the info, warn, error or fatal methods of component to
generate feedback messages.. usually you can just write:

catch (Exception e) {
  error(e.getMessage());
}



Seven Corners wrote:
 I have a form whose submission can possibly generate exceptions.  I would
 like to expose the exception text in the FeedbackPanel.  How can I do this?

 I've tried getting the FeedbackMessagesModel and doing a setObject() on that
 but it's not accepting a String, a FeedbackMessages List, or a new
 FeedbackMessage.  Obviously I'm going about this the wrong way.

 Ideas?

 Thanking you in advance for your time and trouble.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to update ListChoice after form submission?

2008-10-03 Thread Shelah Horvitz
Thank you, Igor, for getting back to me so quickly.  Actually, thank you for 
answering at all.

I thought of the onclick handler, but the AjaxFallbackButton doesn't have an 
onClick() function.  It does have a getOnClickScript() which I can override, 
but I believe the timing will be off.  I think it will fire before the form is 
submitted.  Hold on, I think I get what you're saying: write some JavaScript 
AJAX for the onclick script that will call whatever routines I need to create 
the user and then update the ListChoice's model.  I don't need to do anything 
with the onSubmit() overload.  Is that what you're saying?  I will try it.  I 
think it's a good idea.

An interesting aspect of this solution is that I don't think I even need a 
form.  I think the validation of control inputs would happen after the onclick 
handler returns.  I think this is a strictly roll-your-own solution.

Have I got it right?


From: Igor Vaynberg [EMAIL PROTECTED]
Sent: Thursday, October 02, 2008 4:42 PM
To: users@wicket.apache.org
Subject: Re: How to update ListChoice after form submission?

inside the onclick of your ajaxfallbackbutton you have to add the
listchoice to the target so wicket rerenders it

-igor

On Thu, Oct 2, 2008 at 12:49 PM, Seven Corners [EMAIL PROTECTED] wrote:

 I have a page with a ListChoice of user names that is populated with a call
 to our server (loadUserNames()).  The page also contains a number of
 TextFields corresponding to the user's other attributes.  When you modify
 those text fields so the user name doesn't correspond to anything in the
 list, the Add AjaxFallbackButton enables.  Click this, and you make a call
 to the server which creates the new user.

 The new user does not show up in the ListChoice.  If you refresh the page,
 it does, so we know it's created, and we know that loadUserNames() will
 return the correct list if it were called and its values were used..  I want
 the new user name to show up in the ListChoice after submission, and I'd
 like to be able to set the selection in the ListChoice to the new user.
 I've tried giving the ListChoice a LoadableDetachableModel, I've tried
 giving it an ArrayList model with a call to loadUserNames() and setChoices()
 on the ListChoice after submission, I've tried a
 AjaxFormComponentUpdatingBehavior( onsubmit ), hoping this might fire
 after submission, I've tried using a call to
 getRequestCycleSettings().setRenderStrategy(IRequestCycleSettings.ONE_PASS_RENDER)
 in my application class's init() method, I've tried a ton of things and I
 can't figure this out.

 Any ideas?
 --
 View this message in context: 
 http://www.nabble.com/How-to-update-ListChoice-after-form-submission--tp19786374p19786374.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]