On 03/30/2011 11:19 AM, Martin Grigorov wrote:
no, it doesn't cache
it seems the textarea is not involved at all in the ajax request processing
and its model is not needed

On Wed, Mar 30, 2011 at 10:52 AM, Thierry Peng<p...@glue.ch>  wrote:

Quick question about textareas

I have on a panel two component, a textarea with a xml and a label. the
label gets updated (via ajax)but the textarea not.

form2.add(area = new TextArea<String>("userdata", new
LoadableDetachableModel<String>() {
      @Override
      protected String load() {
          log.debug("loading in  area called");
        return currentAccount.getUserdata();
      }
    }));

form2.add(new Label("current", new LoadableDetachableModel<String>() {
      @Override
      protected String load() {
        log.debug("loading in  area called");
        return "Ausgewählter Benutzer: " + currentAccount.getAccountName();
      }
    }

the ajaxtarget is the parent of both components (the parent of the form2
exactly). the "loading in area called" appears only once in the log, the
other always. Does the textarea do some sort of caching?

greetings

thierry

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



the problem was the page architecture. the page had two panels, an overview wmc with an inmethodgrid for all account registered in the application and a detail wmc with the the textarea. if someone clicked on an account displayed in the grid then the overviewpanel was made invisible and the detailpanel was made visible. the detailpanel had a submit and a cancelbutton.

if an user pressed the cancel button(formprocessing false) on the detailpanel, and selected another account on the overviewpanel, he saw the details (textarea) of the first account. As it seems only the readonly part (the label) was reloaded and the textarea not. But I can't explain this behaviour. It seems that the model on these components didn't pickup the modelobject change even when the modelchanging()/modelchanged() was fired.

however, I solved this problem with a replace panel strategy instead of the isvisible strategy. works like a charm this way.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to