cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject [CForms] adding a row to a JS property list array
Date Thu, 25 Mar 2004 15:22:04 GMT
Hi All

Its not actually CForms, I am still using Woody in Cocoon-2.1.4

I have this JavaScript Property List as my Form Model:

	id: [unique id of the query]
	name: [what the user calls this saved query]
	type: [fulltext|advanced|keyword (etc)],
	bool: [and|or|not],
	paging: {
		size: [how many results to show],
		page: [most recently viewed page],
		total: [the # of results during last usage],
	criteria: [
			field: [fieldname|any],
			match: [contains|somewords|equals]
			value: [query string]
		. . .

The 'criteria' is an Array of criterion properties.
I am trying to use these in a wd:repeater with an 'add-row' 

I have it in a state where I can add and remove criterion(s) but am 
unable to save the form. The binding does not work, because I do not 
know what to put inside the wb:on-insert-row in the binding.

There seem to be two choices wb:insert-node and wb:insert-bean, neither 
of which appear to be appropriate to JavaScript Property Lists.

Is it possible to support JavaScript Property Lists in this way?

Is there another way of doing this, or should I move my Model to a real 
Java Bean ?

Thanks for any suggestions

regards Jeremy

View raw message