Hy guys.
I have a simple problem here.
in my order class i have OrderStatus field, which is an enum in the database. (Can be "Under process" or Dispatched)
My problem is when im using update.jspx i want a field:select dropdown list, where the admin can change this value.
Because these values can not be read out from database, i was thinking of creating a static arraylist inside order.java like this:
Code:public static List<String> StatusList; static{ ArrayList<String> tmp = new ArrayList<String>(); tmp.add("Under process"); tmp.add("Dispatched"); StatusList = Collections.unmodifiableList(tmp); }how can i read out these value using field:select tag, and set them as orderStatus?Code:public List<String> getStatusList() { return StatusList; }
if i could call a method from update.jspx would be fine also, but i dont know the syntax only in webflow, not in standard roo.Code:<field:select field="orderStatus" id="c_photostore_Porder_orderStatus" items="${porders}" itemValue="orderStatusList" path="/porders"/>


Reply With Quote