cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lutz Thomas <l...@aim-ag.com>
Subject CForms: Enhancement of SetAttributeJXPathBinding
Date Tue, 14 Jun 2005 10:46:41 GMT
Hi !

 

The fb:set-attribute binding is currently limited to "bind" a fixed string
value. 

 

I'd like to enhance this to be able to bind a value from the data xml, so I
could do something like this

 

<fb:value id="someFieldName" path="field[@name='someFieldName']"> 

  <fb:set-attribute name="persistence_layer_errormessage" path="
field[@name='someFieldName']/@PersistenceLayerErrorMessage" />

</fb:value>

 

So it would be able to include custom messages coming from "the server
side".

 

I had a look at the sources, and as far as I could figure out I would have
to:

-Copy and ModifyPaste some code from ValueJXPathBinding.java to
SetAttributeJXPathBinding.java

-Copy and ModfiyPaste some code from ValueJXPathBndingBuilder.java to
SetAttributeJXPathBindingBuilder.java

 

If I'd use a new attribute path, there would be not backwards compatibility
problems... if there's a value use hardcoded string as before, otherwise to
a binding.

 

If this is ok for you, I would give it a try...

 

Regards,

Tom


Mime
View raw message