cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lutz Thomas <l...@aim-ag.com>
Subject AW: CForms: Enhancement of SetAttributeJXPathBinding
Date Tue, 14 Jun 2005 14:47:18 GMT
Sorry, seems that I was too optimistic.

 

Am I right that this would require a major change in all the widget classes
? They have setAttribute functions, but nothing to pass the attributes on to
the pipeline, as the getXMLElementAttributes does not do anything with the
attribute map ?

 

I hope I could make clear my indention in my previous mail, making
set-attribute bi-directional to be able to display validation data coming
from the database layer.

 

Regards,

Tom


  _____  

Von: Lutz Thomas [mailto:lutz@aim-ag.com] 
Gesendet: Dienstag, 14. Juni 2005 12:47
An: dev@cocoon.apache.org
Betreff: CForms: Enhancement of SetAttributeJXPathBinding



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