populateItem(*FINAL* ListItem<ValueObject> item1) {
add(new ListView<OtherValueObject>("child", getOthers()) {
populateItem(ListItem<ValueObject> item2) {
ValueObject valueObject1 = item1.getModelObject();
.....
}
}}}}
Martijn
On Mon, Nov 9, 2009 at 7:12 PM, Sam Barrow <[email protected]> wrote:
> sorry sorry i made a mistake in the populateItem
> these is a nested listview
>
> populateItem(ListItem<ValueObject> item) {
> final ValueObject valueObject = item.getModelObject();
> add(new ListView<OtherValueObject>("child", getOthers()) {
> populateItem(ListItem<ValueObject> item) {
> Money price =
> getPricingService().calculatePrice(valueObject,
> item.getModelObject())
> }
> }
> }
>
> Looks like the problem has to do with me accessing the valueObject
> variable from inside the nested ListView. any clean way around this?
>
> On Mon, 2009-11-09 at 09:56 -0800, Igor Vaynberg wrote:
>> what does your listview's populateitem look like?
>>
>> -igor
>>
>> On Mon, Nov 9, 2009 at 9:50 AM, Sam Barrow <[email protected]> wrote:
>> > Hi. Wondering if someone can help me with a serialization problem I'm
>> > having.
>> > To start off, the domain model in this application does not use
>> > serializable domain objects (the project is using db4o, which does not
>> > play well with serialized objects).
>> >
>> > I have a page with this code:
>> >
>> > IModel<ValueObject> valueObjectList = new
>> > LoadableDetachableModel<ValueObject>() {
>> > protected void load() {
>> > return getVOGenerator().generateVOs();
>> > }
>> > }
>> > add(new ListView<ValueObject>("vos", valueObjectList) {
>> > ...
>> > });
>> >
>> > I'm getting this error:
>> > org.apache.wicket.util.io.SerializableChecker
>> > $WicketNotSerializableException: Unable to serialize
>> > class: ...ValueObject
>> >
>> > How do I get around this?
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > 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]
>
>
--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]