Re: Feedback panel -- message resource bundle

2010-03-24 Thread ayman elwany
Any another approach that's help me to to use resources key instead of
companent path  key 

On Wed, Mar 24, 2010 at 3:26 PM, ayman elwany aymanelw...@gmail.com wrote:

 Hi all,

 I update my feedback panel messages using wicketApplication.properties
  and  attach the message to the component path :


 
 EXAMPLE :

 Required=${label}
 MinimumValidator=${label}
 distributorForm.autoCompletePanel.borderOne.autoOne.Required=Do  Not
 Submit Claim Without this field.
 distributorForm.autoCompletePanel.borderOne.autoOne.MinimumValidator=value
 must be  0.


 

 I have 2 problems with this approach :

 1- Difficulty in reusing messages  :  ex.  If I I want to reuse the the
 same  validator message MinimumValidator in other 3 components I 'll have to
 copy it 3 times for the other 3 compnents.

 2- Message  Resource keys :

   a- more suitable and short keys instead of  using component path
 as a key
   b- Reusing this key in any component in any other component in
 any page


 Any help





RE: Feedback panel message

2008-10-20 Thread Dane Laverty
Like so:

DropDownChoice myDropDownChoice = new DropDownChoice(...); 
myDropDownChoice.setLabel(new Model(Description));
add(myDropDownChoice);

Hope that helps.

-Original Message-
From: Steve Thompson [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 20, 2008 12:49 PM
To: users@wicket.apache.org
Subject: Feedback panel message

I've got a panel for which I am building a number of DropDownChoices.
Each must be selected, and if any one of them is not, a message must
be displayed in the corresponding feedback panel.  The problem however
is that, with my HTML as such:

table
   tr wicket:id=reasons
  tdspan wicket:id=description//td
  tdselect wicket:id=options name=options//td
   /tr
/table

the ${label} is always 'options' of course.  How could I associate
different DropDownChoice components in this scenario with a little bit
more legible name (like 'description')

Let me know and best regards,


Steve

--

-
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: Feedback panel message

2008-10-20 Thread Steve Thompson
Dane -

Thanks, this worked like a charm!

On 10/20/08, Dane Laverty [EMAIL PROTECTED] wrote:
 Like so:

   DropDownChoice myDropDownChoice = new DropDownChoice(...);
   myDropDownChoice.setLabel(new Model(Description));
   add(myDropDownChoice);

 Hope that helps.

 -Original Message-
 From: Steve Thompson [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 20, 2008 12:49 PM
 To: users@wicket.apache.org
 Subject: Feedback panel message

 I've got a panel for which I am building a number of DropDownChoices.
 Each must be selected, and if any one of them is not, a message must
 be displayed in the corresponding feedback panel.  The problem however
 is that, with my HTML as such:

 table
tr wicket:id=reasons
   tdspan wicket:id=description//td
   tdselect wicket:id=options name=options//td
/tr
 /table

 the ${label} is always 'options' of course.  How could I associate
 different DropDownChoice components in this scenario with a little bit
 more legible name (like 'description')

 Let me know and best regards,


 Steve

 --

 -
 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]