Re: ArrayList, Label and Model
try the following: Building.this sent from my smartphone. I am still curious what I should use isntead of this to display data not in Form. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ArrayList, Label and Model
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.comml-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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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.htmlhttp://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=nodenode=3008166i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3008166i=2 - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3008166i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3008166i=4 -- View message @ http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html To unsubscribe from ArrayList, Label and Model, click herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=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
Re: ArrayList, Label and Model
The PropertyModel is having problems with house_cost. What is this in your example? Is house_cost a member variable of your this? Sven On 10/23/2010 11:35 AM, Zeldor wrote: 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.comml-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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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.htmlhttp://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=nodenode=3008166i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3008166i=2 - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3008166i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3008166i=4 -- View message @ http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html To unsubscribe from ArrayList, Label and Model, click herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ArrayList, Label and Model
Just caught the error (I think). It looks like you have this: class Building extends WebPage { private house_cost = foo; Building() { add(new Form(bar) { // are you doing it somewhere in here? If so, this is the form, not the page. } } } On Sat, Oct 23, 2010 at 7:12 AM, Sven Meier s...@meiers.net wrote: The PropertyModel is having problems with house_cost. What is this in your example? Is house_cost a member variable of your this? Sven On 10/23/2010 11:35 AM, Zeldor wrote: 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.comml-node%2b3008166-1025517113-152...@n4.nabble.com ml-node%2b3008166-1025517113-152...@n4.nabble.comml-node%252b3008166-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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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=nodenode=3008166i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=2 - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=3 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=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_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM= . - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: ArrayList, Label and Model
Ha! Good suggestion, I should have looked at this earlier. I guess I need better understanding of how things work. this in my situation referred just to a form, so it could not find the data required. When I cloned the ArrayList again in the Form, it works. But that's not exactly good thing to do, what should I use instead of this to get the data properly, without repeating it? Building.class does not work [same error with get method]. I just want to access and display data that is outside form... Right now it looks like that: public class Building extends EconPage{ public Building() { int nation = MySession.loggedInUser.getNation(); ArrayListDouble base_costs = new ArrayListDouble(); final ArrayListDouble house_cost = new ArrayListDouble(5); ... add(new FeedbackPanel(errorMsg)); FormString buildHousesForm = new FormString(buildHousesForm, new ModelString()) { private TextFieldLong build_houses = new TextFieldLong(build_houses, new ModelLong()); { ... add(new Label(houses_infracost, new PropertyModel(this, houses_cost.0))); ... add(build_houses); } }; add(buildHousesForm); } } On Sat, Oct 23, 2010 at 2:13 PM, Sven Meier [via Apache Wicket] ml-node+3008353-1436517199-152...@n4.nabble.comml-node%2b3008353-1436517199-152...@n4.nabble.com wrote: The PropertyModel is having problems with house_cost. What is this in your example? Is house_cost a member variable of your this? Sven On 10/23/2010 11:35 AM, Zeldor wrote: 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][hidden email]http://user/SendEmail.jtp?type=nodenode=3008353i=0 [hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=1 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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=2 - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=3 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=4 -- View message @ http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=t To unsubscribe from ArrayList, Label and Model, click here http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code
Re: ArrayList, Label and Model
The PropertyModel takes a root object on which it will evaluate the expression. So, you have to make sure the property is traversable from the root object. Most likely, you'd be better off using a ListView for your situation if you're trying to show all the items in the list. On Sat, Oct 23, 2010 at 10:59 AM, Zeldor pgronkiew...@gmail.com wrote: Ha! Good suggestion, I should have looked at this earlier. I guess I need better understanding of how things work. this in my situation referred just to a form, so it could not find the data required. When I cloned the ArrayList again in the Form, it works. But that's not exactly good thing to do, what should I use instead of this to get the data properly, without repeating it? Building.class does not work [same error with get method]. I just want to access and display data that is outside form... Right now it looks like that: public class Building extends EconPage{ public Building() { int nation = MySession.loggedInUser.getNation(); ArrayListDouble base_costs = new ArrayListDouble(); final ArrayListDouble house_cost = new ArrayListDouble(5); ... add(new FeedbackPanel(errorMsg)); FormString buildHousesForm = new FormString(buildHousesForm, new ModelString()) { private TextFieldLong build_houses = new TextFieldLong(build_houses, new ModelLong()); { ... add(new Label(houses_infracost, new PropertyModel(this, houses_cost.0))); ... add(build_houses); } }; add(buildHousesForm); } } On Sat, Oct 23, 2010 at 2:13 PM, Sven Meier [via Apache Wicket] ml-node+3008353-1436517199-152...@n4.nabble.comml-node%2b3008353-1436517199-152...@n4.nabble.com wrote: The PropertyModel is having problems with house_cost. What is this in your example? Is house_cost a member variable of your this? Sven On 10/23/2010 11:35 AM, Zeldor wrote: 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][hidden email]http://user/SendEmail.jtp?type=nodenode=3008353i=0 [hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=1 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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=2 - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=3 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=4 -- View message @ http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model
Re: ArrayList, Label and Model
It's a table with lots of data to display, with a mixture of plain text, data from session and from arrays, so it'd be rather hard to solve it with ListView. So my only problem is how to point the Label to data that is outside Form. On Sat, Oct 23, 2010 at 5:03 PM, James Carman [via Apache Wicket] ml-node+3008486-1151478827-152...@n4.nabble.comml-node%2b3008486-1151478827-152...@n4.nabble.com wrote: The PropertyModel takes a root object on which it will evaluate the expression. So, you have to make sure the property is traversable from the root object. Most likely, you'd be better off using a ListView for your situation if you're trying to show all the items in the list. On Sat, Oct 23, 2010 at 10:59 AM, Zeldor [hidden email]http://user/SendEmail.jtp?type=nodenode=3008486i=0 wrote: Ha! Good suggestion, I should have looked at this earlier. I guess I need better understanding of how things work. this in my situation referred just to a form, so it could not find the data required. When I cloned the ArrayList again in the Form, it works. But that's not exactly good thing to do, what should I use instead of this to get the data properly, without repeating it? Building.class does not work [same error with get method]. I just want to access and display data that is outside form... Right now it looks like that: public class Building extends EconPage{ public Building() { int nation = MySession.loggedInUser.getNation(); ArrayListDouble base_costs = new ArrayListDouble(); final ArrayListDouble house_cost = new ArrayListDouble(5); ... add(new FeedbackPanel(errorMsg)); FormString buildHousesForm = new FormString(buildHousesForm, new ModelString()) { private TextFieldLong build_houses = new TextFieldLong(build_houses, new ModelLong()); { ... add(new Label(houses_infracost, new PropertyModel(this, houses_cost.0))); ... add(build_houses); } }; add(buildHousesForm); } } On Sat, Oct 23, 2010 at 2:13 PM, Sven Meier [via Apache Wicket] [hidden email] http://user/SendEmail.jtp?type=nodenode=3008486i=1[hidden email] http://user/SendEmail.jtp?type=nodenode=3008486i=2 wrote: The PropertyModel is having problems with house_cost. What is this in your example? Is house_cost a member variable of your this? Sven On 10/23/2010 11:35 AM, Zeldor wrote: 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][hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=0 [hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=1 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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849
Re: ArrayList, Label and Model
You'd be surprised what you can do with a table. On Sat, Oct 23, 2010 at 11:09 AM, Zeldor pgronkiew...@gmail.com wrote: It's a table with lots of data to display, with a mixture of plain text, data from session and from arrays, so it'd be rather hard to solve it with ListView. So my only problem is how to point the Label to data that is outside Form. On Sat, Oct 23, 2010 at 5:03 PM, James Carman [via Apache Wicket] ml-node+3008486-1151478827-152...@n4.nabble.comml-node%2b3008486-1151478827-152...@n4.nabble.com wrote: The PropertyModel takes a root object on which it will evaluate the expression. So, you have to make sure the property is traversable from the root object. Most likely, you'd be better off using a ListView for your situation if you're trying to show all the items in the list. On Sat, Oct 23, 2010 at 10:59 AM, Zeldor [hidden email]http://user/SendEmail.jtp?type=nodenode=3008486i=0 wrote: Ha! Good suggestion, I should have looked at this earlier. I guess I need better understanding of how things work. this in my situation referred just to a form, so it could not find the data required. When I cloned the ArrayList again in the Form, it works. But that's not exactly good thing to do, what should I use instead of this to get the data properly, without repeating it? Building.class does not work [same error with get method]. I just want to access and display data that is outside form... Right now it looks like that: public class Building extends EconPage{ public Building() { int nation = MySession.loggedInUser.getNation(); ArrayListDouble base_costs = new ArrayListDouble(); final ArrayListDouble house_cost = new ArrayListDouble(5); ... add(new FeedbackPanel(errorMsg)); FormString buildHousesForm = new FormString(buildHousesForm, new ModelString()) { private TextFieldLong build_houses = new TextFieldLong(build_houses, new ModelLong()); { ... add(new Label(houses_infracost, new PropertyModel(this, houses_cost.0))); ... add(build_houses); } }; add(buildHousesForm); } } On Sat, Oct 23, 2010 at 2:13 PM, Sven Meier [via Apache Wicket] [hidden email] http://user/SendEmail.jtp?type=nodenode=3008486i=1[hidden email] http://user/SendEmail.jtp?type=nodenode=3008486i=2 wrote: The PropertyModel is having problems with house_cost. What is this in your example? Is house_cost a member variable of your this? Sven On 10/23/2010 11:35 AM, Zeldor wrote: 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][hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=0 [hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=1 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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label
Re: ArrayList, Label and Model
and display it with a Label? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=tby-user=t Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=2 - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=3 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=4 -- View message @ http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=tby-user=t To unsubscribe from ArrayList, Label and Model, click here http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=t http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=thttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=thttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=tby-user=tby-user=t
Re: ArrayList, Label and Model
ArrayListDouble(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.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=tby-user=t Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=2 - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=3 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=4 -- View message @ http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=tby-user=t To unsubscribe from ArrayList, Label and Model, click here http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=t http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=thttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=thttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=tby-user=t http
Re: ArrayList, Label and Model
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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=tby-user=t Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=1 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=2 - To unsubscribe, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=3 For additional commands, e-mail: [hidden email] http://user/SendEmail.jtp?type=nodenode=3008166i=4 -- View message @ http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3008166.html?by-user=tby-user=tby-user=t To unsubscribe from ArrayList, Label and Model, click here http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=by-user=t http://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM
Re: ArrayList, Label and Model
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][hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=0 [hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=1 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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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.htmlhttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=thttp://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=tby
Re: ArrayList, Label and Model
: 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][hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=0 [hidden email] http://user/SendEmail.jtp?type=nodenode=3008353i=1 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=nodenode=3008166i=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: ... ArrayListDouble house_cost = new ArrayListDouble(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 http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007849.html?by-user=tby-user=tby-user=t http://apache-wicket.1842946.n4
ArrayList, Label and Model
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: ... ArrayListDouble house_cost = new ArrayListDouble(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 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: ArrayList, Label and Model
Hi, according to the API PropertyModel(this, house_cost.4) should work: http://wicket.apache.org/apidocs/1.4/org/apache/wicket/util/lang/PropertyResolver.html Sven Am 22.10.2010 22:39, schrieb Zeldor: 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: ... ArrayListDouble house_cost = new ArrayListDouble(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? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ArrayList, Label and Model
Nope, it still does not work, so it must be something else. I have tried searching here, but I have only found people using ArrayList as whole, for dropdownmenus etc, not pointing to one specific data. It should be quite simple... On Fri, Oct 22, 2010 at 11:17 PM, Sven Meier [via Apache Wicket] ml-node+3007899-704217102-152...@n4.nabble.comml-node%2b3007899-704217102-152...@n4.nabble.com wrote: Hi, according to the API PropertyModel(this, house_cost.4) should work: http://wicket.apache.org/apidocs/1.4/org/apache/wicket/util/lang/PropertyResolver.html Sven Am 22.10.2010 22:39, schrieb Zeldor: 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: ... ArrayListDouble house_cost = new ArrayListDouble(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? - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3007899i=0 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3007899i=1 -- View message @ http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007899.html To unsubscribe from ArrayList, Label and Model, click herehttp://apache-wicket.1842946.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_codenode=3007849code=cGdyb25raWV3aWN6QGdtYWlsLmNvbXwzMDA3ODQ5fC0xMTUwMjA4NDM=. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ArrayList-Label-and-Model-tp3007849p3007950.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: ArrayList, Label and Model
On Fri, Oct 22, 2010 at 4:17 PM, Sven Meier s...@meiers.net wrote: according to the API PropertyModel(this, house_cost.4) should work: try new PropertyModel(this, house_cost[4]) -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: ArrayList, Label and Model
Can you try PropertyModel(this, house_cost[4])? Ernesto On Fri, Oct 22, 2010 at 10:39 PM, Zeldor pgronkiew...@gmail.com 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: ... ArrayListDouble house_cost = new ArrayListDouble(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 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