Hello all,

my goal is to create something like BeanEditForm, but the underlying data is
not a Java Bean but a an XML tree (org.jdom.Element). I found out that the
core component being responsible for the field editing is PropertyEditor. My
idea is to use PropertyEditor standalone.

        <t:form>
                <t:propertyEditor id="propertyEditor" property="propertyName"
                        object="xmlData" model="myModel" overrides="this" />
        </t:form>

Within the page class I customize myModel in the following way 

  // create empty model
  myModel = beanModelSource.createEditModel(Object.class, messages);
  // add xml attributes with XML specific Conduit implementation
  myModel.add("myattr", new PropertyConduitXPathImpl(...));


The following problem occurs during rendering:

java.lang.IllegalArgumentException: Parameter overrideMessages was null.
        at 
org.apache.tapestry5.ioc.internal.util.Defense.notNull(Defense.java:37)
        at
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:67)
        at
$FieldTranslatorSource_1291c069daa.createDefaultTranslator($FieldTranslatorSource_1291c069daa.java)
        at
org.apache.tapestry5.corelib.components.PropertyEditor$1.getTranslator(PropertyEditor.java:184)
        at
org.apache.tapestry5.corelib.pages.PropertyEditBlocks.getTextFieldTranslator(PropertyEditBlocks.java:95)
        at $PropertyConduit_1291c069de4.get($PropertyConduit_1291c069de4.java)
        at
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:58)
        ... 84 more

My question is: can PropertyEditor be used standalone? How can I initialize
a PropertyOverrides object in the same way as BeanEditor/BeanEditForm does?
What else can I do to avoid the above exception? 

I appreciate your help,
Lothar
-- 
View this message in context: 
http://old.nabble.com/Using-PropertyEditor-standalone-tp28829845p28829845.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to