ui_choicelist macro

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2009 12:54 PM
Hello,
Has anyone ever used the ui_choicelist macro. I would like to build a choice list using this macro based on two other user inputs but I am not sure how to populate it. I wasn't sure if anyone else was using this or not or knows how to use this macro.
Thanks for reading.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2009 07:02 PM
There is an example on how to use it in the UI Page - add_catalog_item.
According to the description of the UI Macro it takes 3 inputs.
name= what you want to name the select (if omitted, name will be set to the value of the "field" attribute)
table= the table from which you will select
field= the column in the table to select from
Here is the piece from the UI Page:
<tr id="quantityrow">
<td><label for="myquantity">${gs.getMessage('catalog_quantity')}</label></td>
<td><g:ui_choicelist name="myquantity" table="sc_cart_item" field="quantity" /></td>
</tr>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2009 05:48 AM
Thanks, I will try that today.
Does anyone know if you can poplulate this macro from a function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2009 07:35 AM
What are you trying to accomplish? Are you building a UI Page? Maybe the UI Macro is not the way to go. You could use a an HTML Select and populate it based on user inputs.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2009 08:30 AM
The item I am currently working on needs a dropdown build of two columns in a table appended together. Originally I was using the ui_slushbucket but the service owners changed their mind and decided that they only wanted the requester to be able to select one option at a time. So I found a macro called ui_choicelist and decided I would try to get this populated with the appended data.