Package org.apache.wicket

Examples of org.apache.wicket.AttributeModifier


    private static final long serialVersionUID = 1L;

    private Container(String id) {
      super(id);
      add(new Label("percent", String.format("%d%%", percent)));
      add(new AttributeModifier("style", true, getStyleModel()));
    }
View Full Code Here


      // link to file in content directory
      return new ResourceLink<Object> (wicketId, getRelativeRef(elt.getAttribute("href")));
     
    } else if (wicketId.startsWith("sectionIcon_")) {   
      WebComponent icon = ISIApplication.get().makeIcon(wicketId, elt.getAttribute("class"));
      icon.add(new AttributeModifier("class", true, new Model<String>("sectionIcon")));
      return icon;
 
    } else if (wicketId.startsWith("thumbRating_")) {
      ContentLoc loc = new ContentLoc(getModel().getObject());
      String thumbId = elt.getAttribute("id");
View Full Code Here

  protected IFeatureService featureService;
 
  public SectionCompleteToggleTextLink(String id, IModel<XmlSection> model,
      IModel<User> targetUserModel) {
    super(id, model, targetUserModel);
    add(new AttributeModifier("class", true, new Model<String>(){

        private static final long serialVersionUID = 1L;
       
        @Override
        public String getObject() {
View Full Code Here

          else
            return "img/icons/view_feedback.png";
      }     
    });

    link.add(new AttributeModifier("title", true, new AbstractReadOnlyModel<String>() {
      private static final long serialVersionUID = 1L;

      @Override
      public String getObject() {
        if (role.equals(Role.STUDENT))
View Full Code Here

      protected void onModelChanging()
      {
        AjaxEditableMultiLineLabel.this.onModelChanging();
      }
    };
    editor.add(new AttributeModifier("rows", new AbstractReadOnlyModel<Integer>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public Integer getObject()
      {
        return new Integer(rows);
      }
    }));
    editor.add(new AttributeModifier("cols", new AbstractReadOnlyModel<Integer>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public Integer getObject()
View Full Code Here

    if (!(RequestCycle.get().getRequest() instanceof UploadWebRequest))
    {
      log.warn("UploadProgressBar will not work without an UploadWebRequest. See the javadoc for details.");
    }

    form.add(new AttributeModifier("onsubmit", true, new Model<String>()
    {

      private static final long serialVersionUID = 1L;

View Full Code Here

  /** Tests simple behavior */
  @Test
  public void simple()
  {
    MyPage page = new MyPage();
    page.getContainer().add(new AttributeModifier("class", "border"));
    tester.startPage(page);

    assertTrue(tester.getLastResponseAsString().contains("class=\"border\""));
  }
View Full Code Here

   * Tests the fact that url-behavior indexes do not change even if behaviors are removed/added
   */
  @Test
  public void urlIndexRendering()
  {
    Behavior border = new AttributeModifier("class", "border");
    Behavior border2 = new AttributeModifier("class2", "border");
    Behavior auto = new AttributeModifier("autocomplete", "off");
    Behavior auto2 = new AttributeModifier("autocomplete2", "off");
    Behavior link = new LinkBehavior("href");
    Behavior link2 = new LinkBehavior("onclick");

    MyPage page = new MyPage();

View Full Code Here

   * Tests that removal of behaviors properly cleans up the data array
   */
  @Test
  public void behaviorDataArrayCleanup()
  {
    Behavior border = new AttributeModifier("class", "border");
    Behavior border2 = new AttributeModifier("class2", "border");
    Behavior auto = new AttributeModifier("autocomplete", "off");
    Behavior auto2 = new AttributeModifier("autocomplete2", "off");
    Behavior link = new LinkBehavior("href");
    Behavior link2 = new LinkBehavior("onclick");

    MyPage page = new MyPage();
    page.getContainer().add(border, auto, link, border2, link2, auto2);
View Full Code Here

    protected void applyLabelAtRule(Label scalarName, MarkupContainer formGroup) {

        final LabelAtFacet facet = getModel().getFacet(LabelAtFacet.class);

        // TODO mgrigorov: Remove this. It is for debugging
        scalarName.add(new AttributeModifier("title", "labelAt=" + (facet != null? facet.value(): "(null)")));

        if (facet != null) {
            switch (facet.value()) {
                case LEFT:
                    formGroup.add(new CssClassAppender("label-left"));
View Full Code Here

TOP

Related Classes of org.apache.wicket.AttributeModifier

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.