are you sure it is the same request and there is no redirect in
between? do new Exception().printStackTrace() inside your isvisible to
see where it is being called from

-igor


On Mon, Apr 21, 2008 at 7:15 PM, Warren <[EMAIL PROTECTED]> wrote:
> I did this in isVisible() and load was called twice.
>
>  public boolean isVisible()
>  {
>         return !super.getModelObjectAsString().equals("");
>
>
> }
>
>  > -----Original Message-----
>  > From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  > Sent: Monday, April 21, 2008 7:08 PM
>  > To: users@wicket.apache.org
>  > Subject: Re: isVisible() with surrounding Markup and
>  > LoadableDetachableModel
>  >
>  >
>  > loadable detachable model caches the value for the request, so even
>  > though getobject() is called multiple times, load() is only called
>  > once.
>  >
>  > -igor
>  >
>  >
>  > On Mon, Apr 21, 2008 at 6:59 PM, Warren
>  > <[EMAIL PROTECTED]> wrote:
>  > > I have a form that has a lot of labels with surrounding markup
>  > that needs to
>  > >  be visible based on whether their is a value or empty string.
>  > The form uses
>  > >  a CompoundPropertyModel based on a LoadableDetachableModel.
>  > How do I check
>  > >  the model value of a Label in isVisible() without having load() of
>  > >  LoadableDetachableModel being called twice.
>  > >
>  > >
>  > >  <wicket:enclosure child="lineItem.item.department.departmentName">
>  > >         <br>Dept: <span
>  > >  wicket:id="lineItem.item.department.departmentName">Supplements</span>
>  > >  </wicket:enclosure>
>  > >
>  > >
>  > >  Label departmentName = new
>  > Label("lineItem.item.department.departmentName")
>  > >  {
>  > >         public boolean isVisible()
>  > >         {
>  > >                 // How do I check value without load() being
>  > called again
>  > >         }
>  > >  };
>  > >
>  > >
>  > >  Thanks,
>  > >
>  > >  Warren Bell
>  > >
>  > >
>  > >  ---------------------------------------------------------------------
>  > >  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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to