Wow, very fast response!

Is it possible to use wicket concepts like RequestTarget and Behavior on
the serverside? I'd like to have this integrated with wicket as much as
possible.

Cheers,
Martin


On Fri, 2009-04-17 at 14:55 -0700, Igor Vaynberg wrote:
> you cannot use wicket ajax facilities as they are designed for
> stateful pages - the link that wicket uses for ajax callback is
> inherently stateful.
> 
> what you can do is write javascript yourself using jquery, or
> something else to perform an ajax callback to some url you control and
> then replace some markup on your page with returned markup.
> 
> -igor
> 
> On Fri, Apr 17, 2009 at 2:52 PM, Martin Grotzke
> <martin.grot...@javakaffee.de> wrote:
> > Hello,
> >
> > can somebody help with this?
> >
> > Thanx && cheers,
> > Martin
> >
> >
> > On Mon, 2009-04-13 at 12:16 +0200, martin.grot...@javakaffee.de wrote:
> >> Hi,
> >>
> >> I'm currently evaluating how it's possible to have stateless pages with
> >> some information loaded asynchronously via AJAX.
> >>
> >> I found these postings that are somehow related to this
> >> http://www.nabble.com/Stateless-AJAX-links-td20031309.html
> >> http://www.nabble.com/Directions-for-Stateless-Ajax-td17518987.html
> >>
> >> but I'm not sure what exactly has to be done to achieve what I want.
> >>
> >> Basically I have a simple page where I added an AjaxBehavior to a label
> >> that shall get replaced via AJAX:
> >>
> >> final Label label = new Label( "info", "foo" );
> >> add( label.setOutputMarkupId( true ) );
> >> label.add(new AbstractDefaultAjaxBehavior() {
> >>
> >>     @Override
> >>     protected void respond( AjaxRequestTarget target ) {
> >>         final Label lazyLabel = new Label( "info", "loaded asynchronously" 
> >> );
> >>         Index.this.replace( lazyLabel.setOutputMarkupId( true ) );
> >>         target.addComponent( lazyLabel );
> >>     }
> >>
> >>     @Override
> >>     public void renderHead( IHeaderResponse response ) {
> >>         super.renderHead( response );
> >>         response.renderOnDomReadyJavascript( 
> >> getCallbackScript().toString() );
> >>     }
> >>
> >> } );
> >>
> >> This turns the previously statelesss page to stateful, AFAICS because of
> >>   getStatelessHint( Component component )
> >> returning false for the label.
> >>
> >> When I change this to return true, wicket says the page is expired on the 
> >> AJAX request...
> >>
> >> Can anybody say what had to be done?
> >>
> >> Btw: I'm using wicket-1.4-SNAPSHOT.
> >>
> >> Thanx in advance,
> >> cheers,
> >> Martin
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
> 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to