Re: Internationalization: dynamic message for feedback Panel

2010-12-05 Thread sap2000

That did help.
Thank you Eugene and Ernesto.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Internationalization-dynamic-message-for-feedback-Panel-tp3070945p3074033.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Internationalization: dynamic message for feedback Panel

2010-12-03 Thread sap2000

Hello,
In my code following lines are present and works as expected.

.java file for Panel contains a FeedbackPanel and displays warning message
using following code:
info(getLocalizer().getString(deleteConfirm, this));

application.properties file contains
deleteConfirm: Do you want to delete user from the list?

What is required now, is to include user name to the existing message.
e.g. Do you want to delete user 'XYZ' from the list?
Since user name will be available at runtime, dynamically how can it be
included in the message?



 


-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Internationalization-dynamic-message-for-feedback-Panel-tp3070945p3070945.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Internationalization: dynamic message for feedback Panel

2010-12-03 Thread Ernesto Reinaldo Barreiro
I think you can do it as follows:

deleteConfirm: Do you want to delete user ${name} from the list?

and

getLocalizer().getString(deleteConfirm, this, new ModelUser(user));

Assuming User is a bean with  a getName() method.

Ernesto

On Fri, Dec 3, 2010 at 12:31 PM, sap2000 sap2...@indiatimes.com wrote:

 Hello,
 In my code following lines are present and works as expected.

 .java file for Panel contains a FeedbackPanel and displays warning message
 using following code:
 info(getLocalizer().getString(deleteConfirm, this));

 application.properties file contains
 deleteConfirm: Do you want to delete user from the list?

 What is required now, is to include user name to the existing message.
 e.g. Do you want to delete user 'XYZ' from the list?
 Since user name will be available at runtime, dynamically how can it be
 included in the message?






 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Internationalization-dynamic-message-for-feedback-Panel-tp3070945p3070945.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 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: Internationalization: dynamic message for feedback Panel

2010-12-03 Thread sap2000

ok. thank you.
but is there any way when you don't have a bean?

- Shantanu
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Internationalization-dynamic-message-for-feedback-Panel-tp3070945p3071012.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Internationalization: dynamic message for feedback Panel

2010-12-03 Thread Ernesto Reinaldo Barreiro
What do you want to use instead? A map? I think it will also work with
a map: map.put(name, Bla Bla). If not I think old Java style
properties  are also supported (thought I'm not 100% sure)

property = The user {0} will be deleted. Proceed?

and then passing an array of Object.

Ernesto


On Fri, Dec 3, 2010 at 1:47 PM, sap2000 sap2...@indiatimes.com wrote:

 ok. thank you.
 but is there any way when you don't have a bean?

 - Shantanu
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Internationalization-dynamic-message-for-feedback-Panel-tp3070945p3071012.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 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: Internationalization: dynamic message for feedback Panel

2010-12-03 Thread Eugene Malan
I just happened to be in that part of my code , so here goes :

MapString, String map = new HashMapString, String();
map.put(username, user.getDisplayName);
MapModelString, String values = new MapModelString, String(map);
String message = getLocalizer().getString(deleteConfirm, values);
etc...
--
Eugene

On 03 Dec 2010, at 8:01 AM, Ernesto Reinaldo Barreiro wrote:

 What do you want to use instead? A map? I think it will also work with
 a map: map.put(name, Bla Bla). If not I think old Java style
 properties  are also supported (thought I'm not 100% sure)
 
 property = The user {0} will be deleted. Proceed?
 
 and then passing an array of Object.
 
 Ernesto
 
 
 On Fri, Dec 3, 2010 at 1:47 PM, sap2000 sap2...@indiatimes.com wrote:
 
 ok. thank you.
 but is there any way when you don't have a bean?
 
 - Shantanu
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Internationalization-dynamic-message-for-feedback-Panel-tp3070945p3071012.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 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: Internationalization: dynamic message for feedback Panel

2010-12-03 Thread Eugene Malan
I just happened to be in that part of my code , so here goes :

MapString, String map = new HashMapString, String();
map.put(username, user.getDisplayName);
MapModelString, String values = new MapModelString, String(map);
String message = getLocalizer().getString(deleteConfirm, values);
etc...
--
Eugene

On 03 Dec 2010, at 8:01 AM, Ernesto Reinaldo Barreiro wrote:

 What do you want to use instead? A map? I think it will also work with
 a map: map.put(name, Bla Bla). If not I think old Java style
 properties  are also supported (thought I'm not 100% sure)
 
 property = The user {0} will be deleted. Proceed?
 
 and then passing an array of Object.
 
 Ernesto
 
 
 On Fri, Dec 3, 2010 at 1:47 PM, sap2000 sap2...@indiatimes.com wrote:
 
 ok. thank you.
 but is there any way when you don't have a bean?
 
 - Shantanu
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Internationalization-dynamic-message-for-feedback-Panel-tp3070945p3071012.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 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