Package org.apache.wicket.markup.html.form

Examples of org.apache.wicket.markup.html.form.IChoiceRenderer


  /**
   * @return iterator over unselected choices
   */
  public Iterator getUnselectedChoices()
  {
    IChoiceRenderer renderer = getPalette().getChoiceRenderer();
    Collection choices = getPalette().getChoices();

    if (choices.size() - ids.length == 0)
    {
      return Collections.EMPTY_LIST.iterator();
    }

    List unselected = new ArrayList(Math.max(1, choices.size() - ids.length));
    Iterator it = choices.iterator();
    while (it.hasNext())
    {
      final Object choice = it.next();
      final String choiceId = renderer.getIdValue(choice, 0);
      boolean selected = false;
      for (int i = 0; i < ids.length; i++)
      {
        if (ids[i].equals(choiceId))
        {
View Full Code Here


        choice = new DropDownChoice("rasterTable", tableNameModel, choices);

        /*
         * Make table name match the option id
         */
        choice.setChoiceRenderer(new IChoiceRenderer() {
            private static final long serialVersionUID = 1L;

            public String getIdValue(Object tableName, int index) {
                return tableName.toString();
            }
View Full Code Here

     * Switches between the types of param panels
     */
    Component connectionTypeChoice(final Map<String, Component> paramPanelMap) {
        ArrayList<String> connectionTypeList = new ArrayList<String>(paramPanelMap.keySet());
        DropDownChoice choice = new DropDownChoice("connType", new PropertyModel(this,
                "connectionType"), new Model(connectionTypeList), new IChoiceRenderer() {

            public String getIdValue(Object object, int index) {
                return String.valueOf(object);
            }

View Full Code Here

        final List<String> demoList = getDemoList(demoDir);
        final DropDownChoice demoRequestsList;
        final IModel reqFileNameModel = new PropertyModel(requestModel, "requestFileName");
        demoRequestsList = new DropDownChoice("demoRequestsList", reqFileNameModel, demoList,
                new IChoiceRenderer() {
                    public String getIdValue(Object obj, int index) {
                        return String.valueOf(obj);
                    }

                    public Object getDisplayValue(Object obj) {
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.IChoiceRenderer

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.