you could use ognl for that again by making a property model that uses ognl.

But wicket property resolver will not support that syntax. It is just for properties on objects/maps and lists
and simple method calls with no arguments.

but what you also can do is something like this:

final int tmpIter = anItem.getIteration();
Model model = new Model(normalisedWeights)
{
   getObject(Compoent)
    {
       optimisedWeights = super.getObject(component);
       return optimisedWeights.toBigDecimal(tmpIter,0)
    }
}

On 5/18/06, Anders Peterson < [EMAIL PROTECTED]> wrote:
Hi all,

With Wicket 1.1 (ognl) I could do this:

         Loop tmpLoop = new Loop("instruments", Instrument.ALL.size()) {

             protected void populateItem(LoopItem anItem) {

                 int tmpIter = anItem.getIteration();

                 anItem.add(new Label("name",
Instrument.ALL.get(tmpIter).getName()));
                 anItem.add(new Label("market", new
PropertyModel(tmpMod, "marketWeights.toBigDecimal (" + tmpIter + ",0)")));
                 anItem.add(new Label("raw", new PropertyModel(tmpMod,
"modifiedWeights.toBigDecimal(" + tmpIter + ",0)")));
                 anItem.add(new Label("normalised", new
PropertyModel(tmpMod, "normalisedWeights.toBigDecimal(" + tmpIter +
",0)")));
                 anItem.add(new Label("optimised", new
PropertyModel(tmpMod, "optimisedWeights.toBigDecimal(" + tmpIter + ",0)")));
             }

         };


Wicket 1.2 can't handle this:

"...toBigDecimal(" + tmpIter + ",0)"

as a property.


Currently thinking about alternative solution. With my limited
experience with Wicket I can only come up with rather messy solutions.

Any suggestions?

/Anders
--
http://ojalgo.org/

Mathematics, Linear Algebra and Optimisation with Java



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to