Help with fluid renderer

Colin Clark colinbdclark at gmail.com
Fri May 7 13:23:02 UTC 2010


Hi Jim,

In the case of checkboxes and radio buttons, the Select component in the tree is not bound to anything directly in the HTML template. It works behind the scenes to manage the selection list and user's choice, but it has no peer in the markup.

This tripped me up, too, when I first learned how to render checkboxes and radio buttons. I'll defer to Antranig to explain the mechanics behind it.

Colin

On 2010-05-07, at 9:16 AM, Jim Eng wrote:

> I'm not quite following one thing in the demo.  The component tree for canapes part of the demo is a list of objects.  The first item represents the "Select" element, and the other items represent table rows, each of which contains a couple strings and a checkbox.  I see how the id's of the elements are mapped to html elements in the template in buildCutpoints. But the parent element, represented by the first item in the list, has an id of "canapes".  I do not see any mapping for that id.  Is there an element in the HTML corresponding to the "parent"?
> 
> Thanks.
> 
> Jim      
> 
> 
> On May 6, 2010, at 6:35 PM, Jim Eng wrote:
> 
>> Thanks, Colin.  That will give us everything we need.  I wish our code was as clean as that example.
>> 
>> Jim
>> 
>> 
>> On May 6, 2010, at 5:46 PM, Colin Clark wrote:
>> 
>>> Hi Jim,
>>> 
>>> It seems like this demo covers a similar use case to yours, with a rendered table containing checkboxes in each row:
>>> 
>>> http://build.fluidproject.org/infusion/demos/renderer/demo.html
>>> 
>>> You should be able to get your values to appear correctly if you associate your SelectChoice components with their parent Select component using the parentRelativeId and choiceIndex attributes.
>>> 
>>> Does this help?
>>> 
>>> Colin
>>> 
>>> On 2010-05-06, at 4:01 PM, Jim Eng wrote:
>>> 
>>>> Hi,
>>>> 
>>>> We need to render a table inside of a form element.  In each row of the table, we will have one td element containing a checkbox such as this:
>>>> 
>>>> <input type="checkbox" name="selectedMembers" value="/a/string/containing/slashes/and/other.punctuation" />
>>>> 
>>>> I think this is covered by the "Select" and "SelectChoice" types described in this page:
>>>> 
>>>> http://wiki.fluidproject.org/display/fluid/Renderer+Component+Types
>>>> 
>>>> Is that correct?  I'd appreciate suggestions about how we would render this using the fluid renderer.  Right now, our template has this element for the checkbox:
>>>> 
>>>> <input class="res_checkbox dis_checkbox" id="checkbox" type="checkbox" name="selectedMembers" />
>>>> 
>>>> When we try adding a value attribute to the component tree, it is ignored and the value is set to "true" instead.  I am guessing that we need to have an element in the template corresponding to the the Select type above and then add each checkbox to the component tree sort as a SelectChoice item.  Is that correct?
>>>> 
>>>> Is there a demo that shows how to do this?
>>>> 
>>>> Thanks.
>>>> 
>>>> Jim
>>>> 
>>>> _______________________________________________________
>>>> fluid-work mailing list - fluid-work at fluidproject.org
>>>> To unsubscribe, change settings or access archives,
>>>> see http://fluidproject.org/mailman/listinfo/fluid-work
>>> 
>>> ---
>>> Colin Clark
>>> Technical Lead, Fluid Project
>>> http://fluidproject.org
>>> 
>>> 
>>> 
>> 
> 

---
Colin Clark
Technical Lead, Fluid Project
http://fluidproject.org




More information about the fluid-work mailing list