Hi Jon,

Don't hold me for an expert, I'm a mere Cforms user. ;-)

> model:
>               <fd:repeater id="resultConcepts">
>                       <fd:widgets>
>                               <fd:output id="id">
>                                       <fd:datatype base="integer"/>
>                               </fd:output>
>                               <fd:output id="typeId">
>                                       <fd:datatype base="integer"/>
>                               </fd:output>
>                               <fd:output id="name">
>                                       <fd:datatype base="string"/>
>                               </fd:output>
>                               <fd:action id="addConcept" 
> action-command="foo">
>                                       <fd:label>Add this 
> concept</fd:label>
>                                       <fd:on-action>
>                                               <fd:javascript>
>                                               addConcept(event);
>                                               </fd:javascript>
>                                       </fd:on-action>
>                               </fd:action>
>                                       
>                       </fd:widgets>
>               </fd:repeater>
> 
> my template looks like this:
> 
>               <ul>
>                       <ft:repeater-widget id="resultConcepts">
>                               <li>
>                                       <ft:widget id="name">
>                                               <fi:styling 
> type="link"/> <!-- doesn't seem to work -->
>                                       </ft:widget>

Hmm. Your widget is of output type. That means no saving on binding. I'm not
sure if that also restricts the number of actions you can have with this
widget. Have you tried defining it as widget and setting the binding to
"load-ony"? Please check documentation for correct syntax.


>                                       <ft:widget id="addConcept">
>                                               <fi:styling 
> type="link"/> <!-- doesn't seem to work -->
>                                       </ft:widget>
>                               </li>
>                       </ft:repeater-widget>
>               </ul>
> 

Sorry, never used "fd:action" so I'm not sure how this works. On the other
hand, styling is done in the forms-styling-sample.xsl files (this one
includes several others). You might want to check that and see if it
responds to the link styling. I bet it doesn't and then you might want to
modify them by copy&paste of the code in the template for a regular widget.
Now that I write this, this might also be the case for the "output" case.

>       // is there a way to get this from form.binding or something?
>       var searchBean = form.getAttribute("searchBean");

I'm not sure, but if I look in the java code for the binding, there is the
concept of JexlContext. 
On the other hand, I've written the dreamteam sample which modifies the
selection list of subsequent widgets in a row. There I also added the full
"database" because each time I made a different selection.
You can have a look at it and see if there is something there that solves
your problem.

>       // don't know why form.load doesn't work, so earlier in the js
>       // I have: form.setAttribute("theForm", form);
>       form.getAttribute("theForm").load(searchBean);

Which version of Form.js are you using? I use v3. Can't remember why, but
there are posts on either this list or the dev list on the differences
between the versions. 
One of the differences has to do with how the form is loaded.

HTH.

Bye, Helma

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to