Re: ajax progress indicator

2008-05-02 Thread Martin Makundi
I haven't found much. Here are some snipplets that may be of use:

public class AjaxIndicatorContainer extends WebMarkupContainer {
  /**
   * Constructor for TODO
   * @param form
   */
  public AjaxIndicatorContainer(Form form) {
super(ajaxIndicator); // wicket:id
setOutputMarkupId(true);
setMarkupId(ajaxIndicatorId); // markup:id
form.add(this);
  }

  /**
   * @see 
org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
   */
  @Override
  protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put(src,urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
  }
}


final AjaxIndicatorContainer indicatorContainer = new
AjaxIndicatorContainer(loginForm);

{
  final AjaxButton loginButton = new
AbstractAjaxIndicatorAwareButton(LOGIN_BUTTON, loginForm) {

/**
 * @see
org.apache.wicket.ajax.markup.html.form.AjaxButton#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget,
org.apache.wicket.markup.html.form.Form)
 */
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
  processLogin(userIdField, passwdField);
  target.addComponent(feedbackPanel); // Update feedback panel too
}

public String getAjaxIndicatorMarkupId() {
  return indicatorContainer.getMarkupId();
}
  };
  loginForm.add(loginButton);
}

2008/5/2 i ii [EMAIL PROTECTED]:

  is documentation available for ajax progess indicator. i cannot find :(


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: ajax progress indicator

2008-05-02 Thread i ii

much work for simple feature, no?

 Date: Fri, 2 May 2008 15:46:04 +0300
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: ajax progress indicator
 
 I haven't found much. Here are some snipplets that may be of use:
 
 public class AjaxIndicatorContainer extends WebMarkupContainer {
   /**
* Constructor for TODO
* @param form
*/
   public AjaxIndicatorContainer(Form form) {
 super(ajaxIndicator); // wicket:id
 setOutputMarkupId(true);
 setMarkupId(ajaxIndicatorId); // markup:id
 form.add(this);
   }
 
   /**
* @see 
 org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
*/
   @Override
   protected void onComponentTag(ComponentTag tag) {
 super.onComponentTag(tag);
 tag.put(src,urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
   }
 }
 
 
 final AjaxIndicatorContainer indicatorContainer = new
 AjaxIndicatorContainer(loginForm);
 
 {
   final AjaxButton loginButton = new
 AbstractAjaxIndicatorAwareButton(LOGIN_BUTTON, loginForm) {
 
 /**
  * @see
 org.apache.wicket.ajax.markup.html.form.AjaxButton#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget,
 org.apache.wicket.markup.html.form.Form)
  */
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form form) {
   processLogin(userIdField, passwdField);
   target.addComponent(feedbackPanel); // Update feedback panel too
 }
 
 public String getAjaxIndicatorMarkupId() {
   return indicatorContainer.getMarkupId();
 }
   };
   loginForm.add(loginButton);
 }
 
 2008/5/2 i ii [EMAIL PROTECTED]:
 
   is documentation available for ajax progess indicator. i cannot find :(
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


RE: ajax progress indicator

2008-05-02 Thread Martin Grigorov
It depends what you want to achieve.
For simple things just use IndicatingAjaxButton/Link from
wicket-extensions.

On Fri, 2008-05-02 at 13:09 +, i ii wrote:
 much work for simple feature, no?
 
  Date: Fri, 2 May 2008 15:46:04 +0300
  From: [EMAIL PROTECTED]
  To: users@wicket.apache.org
  Subject: Re: ajax progress indicator
  
  I haven't found much. Here are some snipplets that may be of use:
  
  public class AjaxIndicatorContainer extends WebMarkupContainer {
/**
 * Constructor for TODO
 * @param form
 */
public AjaxIndicatorContainer(Form form) {
  super(ajaxIndicator); // wicket:id
  setOutputMarkupId(true);
  setMarkupId(ajaxIndicatorId); // markup:id
  form.add(this);
}
  
/**
 * @see 
  org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag)
 */
@Override
protected void onComponentTag(ComponentTag tag) {
  super.onComponentTag(tag);
  tag.put(src,urlFor(AbstractDefaultAjaxBehavior.INDICATOR));
}
  }
  
  
  final AjaxIndicatorContainer indicatorContainer = new
  AjaxIndicatorContainer(loginForm);
  
  {
final AjaxButton loginButton = new
  AbstractAjaxIndicatorAwareButton(LOGIN_BUTTON, loginForm) {
  
  /**
   * @see
  org.apache.wicket.ajax.markup.html.form.AjaxButton#onSubmit(org.apache.wicket.ajax.AjaxRequestTarget,
  org.apache.wicket.markup.html.form.Form)
   */
  @Override
  protected void onSubmit(AjaxRequestTarget target, Form form) {
processLogin(userIdField, passwdField);
target.addComponent(feedbackPanel); // Update feedback panel too
  }
  
  public String getAjaxIndicatorMarkupId() {
return indicatorContainer.getMarkupId();
  }
};
loginForm.add(loginButton);
  }
  
  2008/5/2 i ii [EMAIL PROTECTED]:
  
is documentation available for ajax progess indicator. i cannot find :(
  
  
  -
  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]



Re: ajax progress indicator

2008-05-02 Thread michalb_cz


i ii wrote:
 
 is documentation available for ajax progess indicator. i cannot find :(
 

see http://blog.ehour.nl/index.php/archives/18
scroll straight to bottom of the entry and look at the comments from Lock
and other wicket commiters too


Jonathan Locke:
Wicket.Ajax.registerPreCallHandler(onStartAjax);
Wicket.Ajax.registerPostCallHandler(onStopAjax);
Wicket.Ajax.registerFailureHandler(onStopAjax);

then just hide and show your indicator in onStartAjax() and onStopAjax() and
every single AJAX request on your site will magically spin that little
wheel.

-- 
View this message in context: 
http://www.nabble.com/ajax-progress-indicator-tp17018664p17020185.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]