Hi, 

I have tried to create a model for the bean edit from : 



In the java part : 
public BeanModel getModel(){
        
        BeanModel model = beanModelSource.createEditModel(objectClass,
resources.getContainerMessages()); 
        model.exclude(pkField);
        return model;
    }

With objectClass : 

@Persist
private Class objectClass;

objectClass = Class.forName(className);


I have the following error : 
Failure reading parameter 'model' of component
admin/Resource:restype.fetchcreate: Could not find a coercion from type
java.lang.String to type org.apache.tapestry5.beaneditor.BeanModel. 
Available coercions: [.....]
        at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:516)
        at
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:496)
        at
org.apache.tapestry5.corelib.components.BeanEditForm._$read_parameter_model(BeanEditForm.java)
        at
org.apache.tapestry5.corelib.components.BeanEditForm.onPrepareFromForm(BeanEditForm.java:123)
...
...
...

Did I forgot something?


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-use-a-BeanEditForm-with-a-bean-without-knowing-the-bean-class-tp4286211p4288416.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