Package org.wicketstuff.datatable_autocomplete.button

Examples of org.wicketstuff.datatable_autocomplete.button.DTAAjaxFallbackButton


        }

      };

    DTAAjaxFallbackButton button;

//    if (buttonProvider.isSelectedRowRequired()) {
//     
//      IModel<String> requireASelectedRow;
//     
//      final List<Radio>radioList = new LinkedList<Radio>();
//     
//      if (selectedContextField instanceof RadioGroup) {
//        RadioGroup rg = (RadioGroup) selectedContextField;
//       
//        rg.visitChildren(new IVisitor() {
//
//          /* (non-Javadoc)
//           * @see org.apache.wicket.Component.IVisitor#component(org.apache.wicket.Component)
//           */
//          public Object component(Component component) {
//           
//            if (component instanceof Radio) {
//             
//              radioList.add((Radio) component);
//            }
//           
//            return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
//          }
//         
//        });
//       
//       
//        requireASelectedRow = createRadioRequireSelectedRowModel (radioList);
//       
//      }
//      else {
//        // String hidden field
//     
//     
//      requireASelectedRow = new MarkupIDInStringModel(
//          "if (Wicket.$('" + MarkupIDInStringModel.MARKUP_ID_TAG
//              + "').value == '') {"
//              + "\nalert ('A selected row is required.');"
//              + "\nreturn false;" + "}", selectedContextField);
//      }
//     
//      button = new DTAAjaxFallbackButton(BUTTON_ID, buttonProvider
//          .getButtonLabelText(displayEntityName), this.form,
//          requireASelectedRow);
//
//      button.setSubmitAction(buttonAction);
//    }
//    else {

      button = new DTAAjaxFallbackButton(BUTTON_ID, buttonProvider
          .getButtonLabelText(displayEntityName), this.form,
          buttonAction);
//    }
   
    String cssClass = buttonProvider.getCSSClassName();
   
    if (cssClass != null) {
      button.add(new AttributeModifier("class", true, new Model<String>(cssClass)));
    }

    item.add(button);

  }
View Full Code Here

TOP

Related Classes of org.wicketstuff.datatable_autocomplete.button.DTAAjaxFallbackButton

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.