Ugo Cei wrote:

Sylvain Wallez wrote:

Done: the selection list builders are now pluggable components. And I also wrote the FlowJXPathSelectionList just to test if this worked properly...


In the back of my mind I'm a little sad because you took away from me the possibility of making a first, substantial commit ;-).


Oh, I'm sorry for that :-/ But I'm sure there are many more commits to come!

Is this what you had also? If not feel free to hack and patch around!


I have a couple of observations just from quickly glancing at your code:

Shouldn't this component be called just JXPathSelectionList? There's no reason why it should be called from the Flow only, is there?


Yes, there is, since the xpath expressions apply to the flow view data object (I prefer "view data" to "context object" as there are already too many "context" objects in Cocoon).

In my code I mimicked what DynamicSelectionList does, namely wrapping the ContentHandler in a SelectionListHandler that does some datatype conversions, AFAIU. Isn't the same needed here?


The main difference with DynamicSelectionList is that values are given in their object form, and not as Strings. DynamicSelectionList has a lot of code to convert the @value attribute format according to the selection list's convertor and the output Locale.

That's why FlowXPathSelectionList is so simple.

What about tests? ;-)


Well, awaiting your commit ;-)

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com





Reply via email to