> This seems like tweaking... 
nope, that's what CSS is for, you wouldn't want to change your markup just
to put something as tiny as an ajaxindicator some pixels to the left would
you? (just an example)



Martin Makundi wrote:
> 
>> You can use CSS to control the positon of the busy indicating image. To
>> place it
>> right from the button use
> 
> This seems like tweaking...
> 
>> IAjaxIndicatorAware simply takes the html id of the element you want
>> to show/hide; it can be placed anywhere in html...
> 
> This is more of what I am looking for, but with IAjaxIndicatorAware I
> havent succeeded in making the indicator appear. I posted earlier the
> code I have, but it didn't do the job. I will repeat it here if
> someone can see immediately what is wrong in it:
> 
> 
> public class Login extends WebPage {
>    // ... default constructor contents:
>    final Form loginForm = new Form(LOGIN_FORM, new Model());
>    final AjaxIndicatorContainer indicatorContainer = new
> AjaxIndicatorContainer();
>    indicatorContainer.setOutputMarkupId(true);
>    loginForm.add(indicatorContainer);
>      final SubmitLink loginButton = new SubmitLink(LOGIN_BUTTON, new
> Model()) {
>        /**
>         * @see org.apache.wicket.markup.html.form.SubmitLink#onSubmit()
>         */
>        @Override
>        public void onSubmit() {
>          super.onSubmit();
>          Thread.sleep(5000); // Simulate form processing
>        }
>      };
>      abstract class AjaxFormSubmitIndicator extends
> AjaxFormSubmitBehavior implements IAjaxIndicatorAware {
>        /**
>         * Constructor for TODO
>         *
>         */
>        public AjaxFormSubmitIndicator() {
>          super("onchange"); // I have tried "onchange" and "onclick"
>        }
>      }
>      loginButton.add(new AjaxFormSubmitIndicator() {
>        @Override
>        protected void onError(AjaxRequestTarget arg0) {
>          // TODO Auto-generated method stub
>        }
> 
>        @Override
>        protected void onSubmit(AjaxRequestTarget arg0) {
>          loginButton.onSubmit();
>        }
> 
>        public String getAjaxIndicatorMarkupId() {
>          return indicatorContainer.getMarkupId();
>        }
>      });
>      loginForm.add(loginButton);
> 
> // ... etc..
> 
>      add(new FeedbackPanel("feedback"));
>      add(loginForm);
> }
> 
> 
> 
> 
> public class AjaxIndicatorContainer extends WebMarkupContainer {
>  /**
>   *
>   */
>  private static final long serialVersionUID = 5573778050703849297L;
>  /**
>   *
>   */
>  public static final String INDICATOR_MARKUP_ID = "ajaxIndicator";
> 
>  /**
>   * Constructor for TODO
>   */
>  public AjaxIndicatorContainer() {
>    super(INDICATOR_MARKUP_ID);
>  }
> 
>  /**
>   * @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));
>  }
> 
> 
> 
> 
> <body>
> <wicket:extend>
> <h1>Login</h1>
> Feedback messages will be here.
> <form wicket:id="loginForm">
> <table border="0" cellspacing="0" cellpadding="2" align="center">
> <tr><td NOWRAP width="80" align="right">
> Username:
> </td>
> <td><input type="text" wicket:id="userId"></td></tr>
> <tr><td NOWRAP align="right">
> Password: </td><td><input type="password" wicket:id="password"></td></tr>
> <tr><td align="right"> # </td><td NOWRAP>
> <input type="submit" value="Sign in" wicket:id="loginButton">
> </td></tr>
> </table>
> </form>
> </wicket:extend>
> </body>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Ajax-Busy-Indicator-tp15153150p15177222.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]

Reply via email to