Hi,

On Wed, Dec 12, 2012 at 8:29 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Why not have outputmarkupid=true?
>
>
In this particular use case doing that would mean that a IFeedback panel,
based on (
http://www.erichynds.com/jquery/a-jquery-ui-growl-ubuntu-notification-widget/),
will be reconstructed any time there are errors on page (all JS, and
dependencies will be streamed back to the server as PART of ART) while the
only thing that is need is pass back some JavaScript (e.g. appended to ART)
that adds some notifications at client side widget.



> 2012/12/12 Ernesto Reinaldo Barreiro <reier...@gmail.com>:
> > IHeaderContibutor won't work if component does not has
> > setOutputMarkupId(true).... AjaxRequestHandler#add()
> >
> > public void add(Component... components)
> > {
> > for (final Component component : components)
> > {
> > Args.notNull(component, "component");
> >
> > if (component.getOutputMarkupId() == false && !(component instanceof
> Page))
> > {
> > throw new IllegalArgumentException(
> > "cannot update component that does not have setOutputMarkupId property
> set
> > to true. Component: " +
> > component.toString());
> > }
> > add(component, component.getMarkupId());
> > }
> > }
> >
> > On Wed, Dec 12, 2012 at 4:59 PM, Martin Makundi <
> > martin.maku...@koodaripalvelut.com> wrote:
> >
> >> IHeaderContributor?
> >>
> >> 2012/12/12 Ernesto Reinaldo Barreiro <reier...@gmail.com>:
> >> > Hi,
> >> >
> >> > Several times I have encountered the situation where I want to
> "update" a
> >> > component via AJAX and this component does not have
> >> setOutputMarkupId(true)
> >> > or even the component generates no  visible markup.  All this
> component
> >> > needs is a way to repaint itself (either by adding some sub-components
> >> that
> >> > are re-paintable via AJAX or by generating some JavaScript that will
> >> update
> >> > component state at client side). So, what I want is being to do
> >> > target.add(myNotStandardComponent) and wicket to take care of its
> >> update...
> >> > Maybe by providing and  interface like
> >> >
> >> > IAjaxUpdatable {
> >> >
> >> > void update(AjaxRequestTarget target);
> >> >
> >> > }
> >> >
> >> > that marks the  component as being re-renderable via AJAX ... and
> modify
> >> > AjaxRequestTarget logic to take this into account.
> >> >
> >> > I gave a look into the sources and the closest thing I have found is
> >> >
> >> > interface ITargetRespondListener
> >> > {
> >> > /**
> >> >  * Invoked when AjaxRequestTarget is about the respond.
> >> >  *
> >> >  * @param target
> >> >  */
> >> > void onTargetRespond(AjaxRequestTarget target);
> >> > }
> >> >
> >> > but these are added via target.registerRespondListener do not seem to
> be
> >> > the same.
> >> >
> >> > Is the above a good idea? Or shall I simply use
>  ITargetRespondListener?
> >> >
> >> > --
> >> > Regards - Ernesto Reinaldo Barreiro
> >> > Antilia Soft
> >> > http://antiliasoft.com/ <http://antiliasoft.com/antilia>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> > Antilia Soft
> > http://antiliasoft.com/ <http://antiliasoft.com/antilia>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ <http://antiliasoft.com/antilia>

Reply via email to