Here's some code I've been using, which I'd have got from somewhere
such as the phonebook or similar...

String msg = MapVariableInterpolator.interpolate(getLocalizer().
   getString((count == 1) ? "status.topup" : "status.topups", this),
  new MicroMap("count", count));

/Gwyn

On 10/10/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> the imodel returns a substition map
>
> wicket doesnt use index parameters, but named ones with the same format as
> in el
>
> so mykey=This is a string value ${myvar}
>
> and in your map have myvar->"whatever"
>
> wicket has great validator support that makes it easy to validate common
> usecases so you might want to look into that
>
> -Igor
>
>
>
> On 10/9/06, craigdd <[EMAIL PROTECTED]> wrote:
> >
> > I have a form object that onSubmit will catch an exception and call the
> error
> > method on the form object.  The key to this error has parameters in it for
> > example here is the string in the .properties for the page that has the
> > form.
> >
> > mykey=This is a string with value {0}.
> >
> > My question is how do I replace the "{0}" part of the string with a value.
> >
> > I'm readin the javadoc for the Localizer method getString and I'm a little
> > confused as to what type of imodel should be used in association with
> > calling getString.

-- 
Download Wicket 1.2.2 now! - http://wicketframework.org

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