see https://issues.apache.org/jira/browse/WICKET-663

this will not happen until 1.5 though, for now you can override
convertChoiceIdToChoice(String) and implement your own lookup there.

-igor

On Mon, Sep 15, 2008 at 2:04 PM, Cédric Thiébault
<[EMAIL PROTECTED]> wrote:
> My DropDownChoice contains a list of hibernate entities that are not
> fully loaded.
> But when I select a value in the dropdown I receive a
> LazyLoadingException because Wicket tries to add an entry in a
> collection that was not previously loaded.
>
> I tried to use a Converter but it is not called because
> PropertyResolverConverter set directly the value (because their
> classes are compatible) :
> if (clz.isAssignableFrom(object.getClass())) {
>  return object;
> }
>
> It works if I preload each entry in the list of choices of the
> DropDownChoice but it is very expensive. To display the dropdown, I
> just need to retrieve the name of my hibernate entity, not the
> collection inside this bean.
> I would like to load the collection only when the user select an
> option in the select.
>
> Code :
> class Foo {
>  Bar bar;
>
>  void setBar(Bar bar) {
>    this.bar = bar;
>    bar.getFoos().add(this);  // this will throw a
> LazyLoadingException if I don't fetch the collections before I render
> the DropDownChoice
>  }
> }
>
> class Bar {
>  Collection<Foo> foos;
> }
>
> Is there a nice way to do that ?
>
> Thanks in advance :-)
>
> Cedric
>
> ---------------------------------------------------------------------
> 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]

Reply via email to