Package org.apache.wicket.markup.html

Examples of org.apache.wicket.markup.html.WebComponent


    // get the url to that page
    IRequestHandler handler = new RenderPageRequestHandler(new PageProvider(leftFrame));
    String leftFrameSrc = RequestCycle.get().renderUrlFor(handler).toString();
    // and create a simple component that modifies it's src attribute to
    // hold the url to that frame
    WebComponent leftFrameTag = new WebComponent("leftFrame");
    leftFrameTag.add(new AttributeModifier("src", new Model<String>(leftFrameSrc)));
    add(leftFrameTag);

    // make a simple component for the right frame tag
    WebComponent rightFrameTag = new WebComponent("rightFrame");
    // and this time, set a model which retrieves the url to the currently
    // set frame class in the frame target
    rightFrameTag.add(new AttributeModifier("src", new FrameModel()));
    add(rightFrameTag);
  }
View Full Code Here


    LeftFrame leftFrame = new LeftFrame(this);
    // get the url to that page
    CharSequence leftFrameSrc = RequestCycle.get().urlFor(leftFrame);
    // and create a simple component that modifies it's src attribute to
    // hold the url to that frame
    WebComponent leftFrameTag = new WebComponent("leftFrame");
    leftFrameTag.add(new AttributeModifier("src", new Model((Serializable)leftFrameSrc)));
    add(leftFrameTag);

    // make a simple component for the right frame tag
    WebComponent rightFrameTag = new WebComponent("rightFrame");
    // and this time, set a model which retrieves the url to the currently
    // set frame class in the frame target
    rightFrameTag.add(new AttributeModifier("src", new FrameModel()));
    add(rightFrameTag);
  }
View Full Code Here

  /**
   * Adds components.
   */
  private final void initComps()
  {
    WebComponent meta = new WebComponent("meta");
    PageParameters parameters = new PageParameters();
    parameters.set("cto", continueTo);

    CharSequence url = urlFor(new BookmarkablePageRequestHandler(new PageProvider(
      BrowserInfoPage.class, parameters)));

    meta.add(new AttributeModifier("content", true, new Model<String>("0; url=" + url)));
    add(meta);
    WebMarkupContainer link = new WebMarkupContainer("link");
    link.add(new AttributeModifier("href", true, new Model<Serializable>((Serializable)url)));
    add(link);
    add(new BrowserInfoForm("postback")
View Full Code Here

    // get the url to that page
    IRequestHandler handler = new RenderPageRequestHandler(new PageProvider(leftFrame));
    String leftFrameSrc = RequestCycle.get().urlFor(handler).toString();
    // and create a simple component that modifies it's src attribute to
    // hold the url to that frame
    WebComponent leftFrameTag = new WebComponent("leftFrame");
    leftFrameTag.add(new AttributeModifier("src", new Model<String>(leftFrameSrc)));
    add(leftFrameTag);

    // make a simple component for the right frame tag
    WebComponent rightFrameTag = new WebComponent("rightFrame");
    // and this time, set a model which retrieves the url to the currently
    // set frame class in the frame target
    rightFrameTag.add(new AttributeModifier("src", new FrameModel()));
    add(rightFrameTag);
  }
View Full Code Here

   *
   * @throws Exception
   */
  public void testCreateAllowedComponent() throws Exception
  {
    new WebComponent("component");
  }
View Full Code Here

          return false;
        }
      });
    try
    {
      new WebComponent("test");
      // bad: authorization should have failed
      fail("authorization check failed to throw an exception");
    }
    catch (AuthorizationException e)
    {
View Full Code Here

  {
    Duration dur = Duration.seconds(20);
    final MyAjaxSelfUpdatingTimerBehavior timer = new MyAjaxSelfUpdatingTimerBehavior(dur);
    final MockPageWithLinkAndComponent page = new MockPageWithLinkAndComponent();

    page.add(new WebComponent(MockPageWithLinkAndComponent.COMPONENT_ID).setOutputMarkupId(true));


    page.add(new AjaxLink<Void>(MockPageWithLinkAndComponent.LINK_ID)
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

  private <C extends Component> void executeHeaderTest(final Class<C> componentClass,
    String expectedFile) throws IOException
  {
    final MockPageWithLinkAndComponent page = new MockPageWithLinkAndComponent();

    page.add(new WebComponent(MockPageWithLinkAndComponent.COMPONENT_ID).setOutputMarkupId(true));


    page.add(new AjaxLink<Void>(MockPageWithLinkAndComponent.LINK_ID)
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

  /**
   * Adds components.
   */
  private final void initComps()
  {
    WebComponent meta = new WebComponent("meta");
    PageParameters parameters = new PageParameters();
    parameters.put("cto", continueTo);
    CharSequence url = urlFor(new BookmarkablePageRequestTarget(BrowserInfoPage.class,
      parameters));
    meta.add(new AttributeModifier("content", true, new Model<String>("0; url=" + url)));
    add(meta);
    WebMarkupContainer link = new WebMarkupContainer("link");
    link.add(new AttributeModifier("href", true, new Model<Serializable>((Serializable)url)));
    add(link);
    add(new BrowserInfoForm("postback")
View Full Code Here

  {
    super(id, model);

    this.max = max;

    upload = new WebComponent("upload");
    upload.setOutputMarkupId(true);
    add(upload);

    container = new WebMarkupContainer("container");
    container.setOutputMarkupId(true);
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.WebComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.