[RomaFramework-dev] [ romaframework-Feature Requests-1542535 ] Get the index of selection
Brought to you by:
lvca
From: SourceForge.net <no...@so...> - 2006-08-18 10:58:19
|
Feature Requests item #1542535, was opened at 2006-08-18 12:46 Message generated for change (Settings changed) made by lvca You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=824593&aid=1542535&group_id=162641 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ViewAspect Group: None >Status: Closed Priority: 5 Submitted By: Luca Garulli (lvca) Assigned to: Luca Garulli (lvca) Summary: Get the index of selection Initial Comment: Hi, we need to know the index of selection in select, list, etc. In this way can be more easy to create selection component binded to integer/short/byte values. Example: public class BaseProfile { @ViewField(label = "Mode", render = "select", selectionField = "mode", selectionMode = ViewFieldFeatures.SELECTION_MODE_INDEX) public String[] getModes() { return MODES; } @ViewField(visible = AnnotationConstants.FALSE) protected byte mode; public static final byte MODE_ALLOW_ALL_BUT = 0; public static final byte MODE_DENY_ALL_BUT = 1; public static final String[] MODES = { "Allow all but", "Deny all but" }; } This allows to view to the user a select containing values in MODES and on selection to bind the index in mode property. Note the new view aspect feature selectionMode = ViewFieldFeatures.SELECTION_MODE_INDEX. By default is equals to ViewFieldFeatures.SELECTION_MODE_VALUE since it copy the value selected in the field defined in selectionField feature. ---------------------------------------------------------------------- >Comment By: Luca Garulli (lvca) Date: 2006-08-18 12:58 Message: Logged In: YES user_id=75115 SVN Revision: 390 ---------------------------------------------------------------------- Comment By: Luca Garulli (lvca) Date: 2006-08-18 12:58 Message: Logged In: YES user_id=75115 Resolved. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=824593&aid=1542535&group_id=162641 |