ok, wrong wording on my side.

i meant the html source of the page in the browser.

mf

Am 17.06.2009 um 16:41 schrieb walnutmon:


Martin,

I actually don't know how to get that dump, i'm using firefox, the error I posted was from the AjaxDebugBox, any tips on getting the client side dump?
I have firebug, but don't seem to see any JavaScript errors, although
admittedly I don't know anything about using it for JavaScript debugging.


Martin Funk-3 wrote:

since the error is thrown on the browser side a dump of the generated
html source might be more helpful.

try http://papernapkin.org/pastebin/home for posting that dump

mf

Am 17.06.2009 um 15:58 schrieb Justin Boyd:

All,

I have a simple application where I can change the size, position,
and color
of a div within a page.  When I click on the div I want some
functionality
to be performed, however the onclick event is never being returned
to the
server, and is instead intercepted and rejected by the javascript, I
get the
error
"Ajax GET stopped because of precondition check,
url:;jsessionid=e80700c56cdf00f163ab8b7adb38?wicket:interface=:
0:superDiv::IBehaviorListener:0:"

HomePage.java -
public class HomePage extends BasePage
{

  CompoundPropertyModel<RectInfo> rectInfoModel = new
CompoundPropertyModel<RectInfo>(new RectInfo(100, 100, 400, 400,
"blue"));
  WebMarkupContainer superDiv = new SuperDiv("superDiv",
rectInfoModel);

  public HomePage()    {
      ... form setup ...
      superDiv.add(new AjaxEventBehavior("onmousedown")
      {

          @Override
          protected void onEvent(AjaxRequestTarget target)
          {
              System.out.println("dicks");
          }
      });
      add(superDiv.setOutputMarkupId(true));

  }

  private class SuperDiv extends WebMarkupContainer
  {

      IModel<RectInfo> rectInfoModel;

      public SuperDiv(String id, IModel<RectInfo> rectInfoModel)
      {
          super(id);
          this.rectInfoModel = rectInfoModel;
      }

      @Override
      protected void onComponentTag(ComponentTag tag)
      {
          tag.put("style",
                  "position: static;" +
                  "top: " + getModelObject().getTop() + ";" +
                  "left: " + getModelObject().getLeft() + ";" +
                  "height: " + getModelObject().getHeight() + ";" +
                  "width: " + getModelObject().getWidth() + ";" +
                  "background-color: " +
getModelObject().getColor() +
";");
      }

      public RectInfo getModelObject()
      {
          return rectInfoModel.getObject();
      }

      public void setModelObject(RectInfo rectInfo)
      {
          rectInfoModel.setObject(rectInfo);
      }
  }

The markup is simple, I can post that if requested, but it's just a
div with
a wicket:id tag.

Thanks in advance!


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




--
View this message in context: 
http://www.nabble.com/AjaxEventBehavior-onclick-for-WebMarkupContainer-Precondition-Check-tp24074285p24075168.html
Sent from the Wicket - User 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