Uploaded image for project: 'Teeda'
  1. Teeda
  2. TEEDA-339

SelectOneMenu/RadioでMapをそのまま扱いたい

XMLWordPrintable

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major Major
    • 1.0.9
    • Affects Version/s: None
    • Component/s: None
    • None

      こんな感じで書ける様にする.
      Mapのキーはラベルに自動でバインド、バリューはまんまバリューで.

      public class SelectOne2Page {
      
      	private Map aaaItems;
      
      	private Integer aaa = new Integer(2);
      
      	public String prerender() {
      		aaaItems = new TreeMap();
      		aaaItems.put("AAAA", new Integer(1));
      		aaaItems.put("BBBB", new Integer(2));
      		aaaItems.put("CCCC", new Integer(3));
      		return null;
      	}
      
      	public Map getAaaItems() {
      		return aaaItems;
      	}
      
      	public void setAaaItems(Map aaaItems) {
      		this.aaaItems = aaaItems;
      	}
      
      	public Integer getAaa() {
      		return aaa;
      	}
      
      	public void setAaa(Integer aaa) {
      		this.aaa = aaa;
      	}
      
      	public String doAction() {
      		return null;
      	}
      }
      

            Assignee:
            shot shot
            Reporter:
            shot shot
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: