You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jon Evans <jo...@misgl.com> on 2004/12/17 12:07:49 UTC

cforms repeater widget link styling

Hi,

I've got a cforms search form in my app, which is bound to a java bean 
called SearchBean.

The SearchBean has a String field for the search text, and a pair of 
Collections, one for search results and one for "activated" results 
(bear with me - it's quite a complex search).

Both lists are programatically generated by the code in the SearchBean. 
  The activated list is just styled as text, this works fine.  I want 
the results list to be styled as links, so that a click on a link would 
submit the id of the result that was clicked.  This then gets processed 
by the search code, which generates a new pair of lists for when the 
form re-displays itself.  Think of it like the user narrowing down the 
search by clicking possibilities from the results list.

I can go into more detail if necessary, but basically I just need to 
know:

1) how do I display a repeater widget as a "submit button"-type 
hyperlink?
2) how do I pick up which link was clicked, either in the flowscript or 
in the SearchBean when I execute form.save(searchBean)?

Each entry in both collections is an object with an id (int) and a name 
(String), with just the name displayed on the form.  It's the id that I 
need for the search code, so the link on the form either has to submit 
the id, or the index of the item in the collection (so I can look it up 
in the collection and get its id).

Thanks,

Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org