Of course:)

This goes wrong:

What I would like from below was for it to replace the PhoneSearchPanel with the next step (gotoPage)

Now I have to use panel since im using the tabs from extension, originally I created this with pages..

I've though of having a container(which also would be a panel) which could keep track of panels instead, im not sure that would work better?

public PhoneSearchPanel(String id, final IPhoneManipulationPanel gotoPage) {
      super(id);
      setOutputMarkupId(true);
      Form form = new Form("form");
      final Panel panel = this;
      add(form);
      AutoCompleteTextField phoneName = new AutoCompleteTextField(
              "phoneName", selectedPhone) {
          @Override
          protected Iterator getChoices(String input) {

return SDUTApplication.getService().findPhonesByFilter(input, null, null, null, null, null, null, null).iterator();
          }
      };
      form.add(phoneName);

      form.add(new AjaxButton("submit", form) {

          @Override
          protected void onSubmit(AjaxRequestTarget target, Form form) {
              gotoPage.setPhone(selectedPhone);
target.addComponent((Component) gotoPage, panel.getMarkupId());
          }

      });

  }
}

Eelco Hillenius wrote:
On 8/7/07, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote:
Ok, I'll try to explain myself a little better.

Im using the tabs from extensions, tabs require that what you work with
are panels (otherwise I would have done this with pages).

So some of my tabs have a certain flow. Inorder to create that flow I
have to replace panels along the way, for example start with the search
panel, then replace the search panel with the edit panel.

However wicket complains that you cant add the panel via ajax with being
attached to a page, and since im replaceing not adding this cant be done?

Am I using a wrong approach on this?

I'm not sure what goes wrong. I'm doing component replacements via
Ajax all the time, without any wizardy needed. Can you give us a code
fragment of what you were doing earlier?

Eelco

---------------------------------------------------------------------
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