I am using wicket 1.4.16, the markupplaceholder is there (checked with firebug).

I have also tried it with a simple visible label:

public class MyPanel extends Panel {
  Label myUpdatedLabel;
  public MyPanel() {
    add(new AbstractDefaultAjaxBehavior() {
            @Override
            protected void respond(AjaxRequestTarget target) {
              myUpdatedLabel.setDefaultModel("bar");
              target.addComponent(myUpdatedLabel);
            }
    }
    myUpdatedLabel = new Label("myLabel","foo");
    myUpdatedLabel.setOutputMarkupId(true);
    add(myUpdatedLabel);
}

This works, however what I actually have to do in the response()
method is the following:
myUpdatedLabel = new Label("myLabel","bar");
myUpdatedLabel.setOuputMarkupId(true);
target.addComponent(myUpdatedLabel);

But when I try this nothing happens. The html of the label remains
untouched: <div id="myLabeld" wicket:id="myLabel">foo</div>

On Mon, Jul 18, 2011 at 4:59 AM, msj121 <msj...@gmail.com> wrote:
> I am not sure if it is still true, but if you have the label added, just the
> visibility is false from the beginning, then in older versions of wicket it
> would not actually put the component, even the placeholder. I dealt with
> this before, but I think in newer versions presumably this was changed....
> In theory a good way to check if this is an issue is to setvisible to true
> in the beginning and alternate.
>
>
> If your trying to add a new markup that never existed in html to the page,
> it should throw an error, and then you will need to use ListViews etc... as
> described above.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Loading-wicket-components-from-javascript-tp3673381p3674372.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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

Reply via email to