You can use the following notation in the static list values
definition: "1=Value 1|2=Value 2|3=Value 3"
The generated HTML will look like:
<option value="1" label="Value 1">Value 1</option>
<option value="2" label="Value 2">Value 2</option>
<option value="3" label="Value 3">Value 3</option>

JV.

On Wed, Mar 10, 2010 at 6:24 PM, Abel Solórzano Astorga
<abelsolorz...@gmail.com> wrote:
> Hi,
>
>
>
> Is there a way to modify the values of the options in the select element
> (html) associated with a Static List?
>
> I noticed that the values are the same as the text that is shown on the
> list.
>
> I have:
>
> *<select id="SSI-Internal.CreateIssue_0_priority"
> name="SSI-Internal.CreateIssue_0_priority" size="1">*
>
> *  <option label="Show Stopper" value="Show Stopper">Show Stopper</option>*
>
> *  <option label="Must Have" value="Must Have">Must Have</option>*
>
> *  <option label="Should Have" value="Should Have">Should Have</option>*
>
> *  <option label="Could Have" value="Could Have">Could Have</option>*
>
> *  <option label="Not In Roadmap" value="Not In Roadmap">Not In
> Roadmap</option>*
>
> *</select>*
>
> I want something like:
>
> *<select id="SSI-Internal.CreateIssue_0_priority"
> name="SSI-Internal.CreateIssue_0_priority" size="1">*
>
> *  <option value="1">Show Stopper</option>*
>
> *  <option value="2">Must Have</option>*
>
> *  <option value="3">Should Have</option>*
>
> *  <option value="4">Could Have</option>*
>
> *  <option value="5">Not In Roadmap</option>*
>
> *</select>*
>
>
>
> I am using the following code to modify the values:
>
>
>
> *valdoc = xwiki.getDocument("SSI-Internal.CreateIssue")*
>
> *ok = valdoc.updateObjectFromRequest("SSI-Internal.CreateIssue")*
>
> *
> valdoc.getxWikiClass().get("priority").getPropertyClass().setValues(“a|b|c”)
> *
>
>
>
> Thanks,
>
>
>
> Abel
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to