Re: [xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
Hi Vincent, I' ve been using the swizzle plugin. It is pretty handy. Thanks, Abel On Fri, Mar 12, 2010 at 1:09 AM, Vincent Massol vinc...@massol.net wrote: Hi Abel, On Mar 11, 2010, at 11:51 PM, Abel Solórzano Astorga wrote: Thanks, I try Jean-Vincent suggestion and it works. By the way Caleb I am writing a module that create jira issues from xwiki. cool. I hope you've checked our swizzle plugin too: http://code.xwiki.org/xwiki/bin/view/Plugins/SwizzlePlugin Thanks -Vincent Abel On Wed, Mar 10, 2010 at 12:39 PM, Caleb James DeLisle calebdeli...@lavabit.com wrote: Jean-Vincent Drean wrote: 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 1Value 1/option option value=2 label=Value 2Value 2/option option value=3 label=Value 3Value 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 StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot 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=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not 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”) It looks like you are writing a bug tracker which I think is very cool! I think you will need to use valdoc.getDocument().getxWikiClass() again get(priority) will return a PropertyInterface which has no setValues function so you will have to cast it to StaticListClass like so. ((StaticListClass) valdoc.getDocument().getxWikiClass().get(priority)).setValues(a|b|c); It appears that this will work although I haven't tested it. Caleb ___ 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
Re: [xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
Thanks, I try Jean-Vincent suggestion and it works. By the way Caleb I am writing a module that create jira issues from xwiki. Abel On Wed, Mar 10, 2010 at 12:39 PM, Caleb James DeLisle calebdeli...@lavabit.com wrote: Jean-Vincent Drean wrote: 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 1Value 1/option option value=2 label=Value 2Value 2/option option value=3 label=Value 3Value 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 StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot 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=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not 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”) It looks like you are writing a bug tracker which I think is very cool! I think you will need to use valdoc.getDocument().getxWikiClass() again get(priority) will return a PropertyInterface which has no setValues function so you will have to cast it to StaticListClass like so. ((StaticListClass) valdoc.getDocument().getxWikiClass().get(priority)).setValues(a|b|c); It appears that this will work although I haven't tested it. Caleb * 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 ___ 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
Re: [xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
Hi Abel, On Mar 11, 2010, at 11:51 PM, Abel Solórzano Astorga wrote: Thanks, I try Jean-Vincent suggestion and it works. By the way Caleb I am writing a module that create jira issues from xwiki. cool. I hope you've checked our swizzle plugin too: http://code.xwiki.org/xwiki/bin/view/Plugins/SwizzlePlugin Thanks -Vincent Abel On Wed, Mar 10, 2010 at 12:39 PM, Caleb James DeLisle calebdeli...@lavabit.com wrote: Jean-Vincent Drean wrote: 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 1Value 1/option option value=2 label=Value 2Value 2/option option value=3 label=Value 3Value 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 StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot 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=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not 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”) It looks like you are writing a bug tracker which I think is very cool! I think you will need to use valdoc.getDocument().getxWikiClass() again get(priority) will return a PropertyInterface which has no setValues function so you will have to cast it to StaticListClass like so. ((StaticListClass) valdoc.getDocument().getxWikiClass().get(priority)).setValues(a|b|c); It appears that this will work although I haven't tested it. Caleb ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
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 StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot 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=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not 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
Re: [xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
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 1Value 1/option option value=2 label=Value 2Value 2/option option value=3 label=Value 3Value 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 StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot 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=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not 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
Re: [xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
Why don't you use database list? IMHO this is better, especially because then user can modify values without changing design. So, use them if there are no other design constraints. Valdis 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 StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot 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=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not 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
Re: [xwiki-users] Is there a way to modify the values of the options in the select element (html) associated with a Static List?
Jean-Vincent Drean wrote: 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 1Value 1/option option value=2 label=Value 2Value 2/option option value=3 label=Value 3Value 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 StopperShow Stopper/option* * option label=Must Have value=Must HaveMust Have/option* * option label=Should Have value=Should HaveShould Have/option* * option label=Could Have value=Could HaveCould Have/option* * option label=Not In Roadmap value=Not In RoadmapNot 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=1Show Stopper/option* * option value=2Must Have/option* * option value=3Should Have/option* * option value=4Could Have/option* * option value=5Not 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”) It looks like you are writing a bug tracker which I think is very cool! I think you will need to use valdoc.getDocument().getxWikiClass() again get(priority) will return a PropertyInterface which has no setValues function so you will have to cast it to StaticListClass like so. ((StaticListClass) valdoc.getDocument().getxWikiClass().get(priority)).setValues(a|b|c); It appears that this will work although I haven't tested it. Caleb * 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 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users