Nope, still same error:

org.apache.wicket.RequestCycle logRuntimeException: no get method
defined for class: class com.myproject.economy.Building$1 expression:
house_cost
org.apache.wicket.WicketRuntimeException: no get method defined for
class: class com.myproject.economy.Building$1 expression: house_cost



{
            System.out.println("Values:" + house_cost.get(0)+  +
house_cost.get(1)+  + house_cost.get(2)+  + house_cost.get(3)+  +
house_cost.get(4) );
            }
This works and gives proper values. I'd be surprised if Wicket required smth
special just to display that...


On Sat, Oct 23, 2010 at 7:08 AM, Ernesto Reinaldo Barreiro-4 [via Apache
Wicket] 
<ml-node+3008166-1025517113-152...@n4.nabble.com<ml-node%2b3008166-1025517113-152...@n4.nabble.com>
> wrote:

> Can you try PropertyModel(this, "house_cost[4]")?
>
> Ernesto
>
> On Fri, Oct 22, 2010 at 10:39 PM, Zeldor <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=3008166&i=0>>
> wrote:
>
> >
> > Hi,
> >
> > I am trying to make an ArrayList, populate it and then display them [and
> do
> > other stuff later, but I did not get so far]. It does not work though, so
>
> > what I am missing?
> >
> > My code looks like that:
> >
> >
> > ...
> >                ArrayList<Double> house_cost = new ArrayList<Double>(5);
> > ...
> > [adding some data here]
> >
> > [form]
> >        add(new Label("houses_goldcost", new PropertyModel(this,
> > "house_cost.get(4)")));
> > ...
> >
> > I am of course getting the generic "no get method defined for class"
> error,
> > so I must be doing something wrong. What is the correct way to get just
> one
> > cell from ArrayList and display it with a Label?
> >
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html<http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t>
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=3008166&i=1>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=3008166&i=2>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=3008166&i=3>
> For additional commands, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=3008166&i=4>
>
>
>
> ------------------------------
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html
> To unsubscribe from ArrayList, Label and Model, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3007849&code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=>.
>
>
>

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008269.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

Reply via email to