Hello, My colleague and I both posted a question last week which received no answers. The two questions were posed from different points of view but, I believe, addressed the same issue. In the hope of getting some insight into this issue the text of each question is repeated below. We appreciate your time.
Steve Steinitz ----------- Hi everyone, We're having a lot of fun with woody and flow but have a problem with a common scenario. Scenario: 1. A list of items is displayed. 2. click on an item in the list 3. Go to an editor (form) to edit the clicked item. This is a typical scenario for most applications. Question: How do we create a clickable list with woody? There does not appear to be a widget that renders as a simple HTML Anchor (ie. <a href=destination.html?someKindOfReference=aReference&contrinuation- id=1234567890">Click me to edit the item I represent</a>) I can see that a anchor widget does not submit a form (like the wd:action does) How are you dealing with this scenario? Thanks, Phil ------------ Hello, We have prototyped some forms with Woody and Flow. It is impressive technology, particularly the binding framework. We use Cayenne (similar to OJB) as our object layer to access our postgres database. It is not obvious to us how to use woody to implement a 'clickable list' of objects -- meaning a list of objects (actually object attributes) where clicking one of them takes the user to a form to edit that object. We've now realized that this 'clickable list' may not really be a job for woody. Even so, we would still like to take advantage of woody's powerful bindings. Moreover, while we could implement a 'clickable list' using the wd:action widgets inside a wd:repeater we would rather use hyperlinks than buttons -- which even more, we suppose, begs the question: why even use woody? (But, we would like to use one technique for all our dynamic data.) We would be interested in suggestions on implementing a 'clickable list' and also on techniques for identifying the clicked object. We had intended to use, as part of the solution, Cayenne's DataObject.objectid() method which (I believe) is guaranteed to be unique among objects in a given DataContext (simliar to OJB's Broker). Now however, looking at frameworks like struts, we wonder if we even need to use the objectid -- that there might be a more elegant way to identify the clicked object. Here is some of our prototype code which works as far as displaying the list of objects from the database via Cayenne but does not yet attempt to allow selection of one of the objects. Widget Definition ----------------- <?xml version = "1.0" encoding = "UTF-8"?> <wd:form xmlns:wd="http://apache.org/cocoon/woody/definition/1.0"> <wd:widgets> <wd:repeater id="kriCategoryList"> <wd:widgets> <wd:field id="kriCategoryName"> <wd:label>KRI Category Name</wd:label> <wd:datatype base="string"/> </wd:field> </wd:widgets> </wd:repeater> </wd:widgets> </wd:form> Bindings -------- <wb:context xmlns:wb="http://apache.org/cocoon/woody/binding/1.0" path="/" > <wb:repeater id="kriCategoryList" parent-path="." row-path="KRICategories" unique-row-id="globalID" unique-path="@id" > <wd:convertor datatype="long" /> --> <wb:on-bind> <wb:value id="kriCategoryName" path="@name" /> </wb:on-bind> </wb:repeater> </wb:context> Flow ---- function kriCategoryList(form) { form.load(ourApp()); form.showForm("kriCategoryList-pipeline"); // form.save(ourApp()); cocoon.sendPage("editingPage.html"); } Content ------- <html xmlns:wt="http://apache.org/cocoon/woody/template/1.0" xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"> <head> <title>KRI Category List</title> </head> <body> <h1>Select a KRI Category</h1> <wt:form-template action="?continuation-id=#{$continuation/id}" method="POST"> <wt:widget id="kriCategoryList"/> <br/> <input type="submit"/> </wt:form-template> </body> </html> SiteMap ------- <map:match pattern="KRICategoryList.html"> <map:select type="request-method"> <!-- GET : start the flow for this screen --> <map:when test="GET"> <map:call function="woody"> <map:parameter name="function" value="kriCategoryList"/> <map:parameter name="form-definition" value="forms/kriCategoryList.wd"/> <map:parameter name="documentURI" value="docs/kriCategoryListTempData.xml"/> <map:parameter name="bindingURI" value="forms/kriCategoryList.wb"/> </map:call> </map:when> <!-- POST (form submission) : continue the flow --> <map:when test="POST"> <map:call continuation="{request-param:continuation-id}"/> </map:when> </map:select> </map:match> <map:match pattern="kriCategoryList-pipeline"> <map:generate src="docs/kriCategoryList.xml"/> <map:transform type="woody"/> <map:transform src="stylesheets/forms/woody-samples-styling.xsl"/> <map:serialize type="html"/> </map:match> --- Steve Steinitz ph +61 (0)2 9487 7215 Director Data Tactics Sydney, Australia www.datatactics.com.au Web Commerce Development Project Estimation and Planning Software Development MacOS X Support --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
