Ok, I got it, I’m using BeanContainer, but i get an classcast exception enterpriseapp.hibernate.CustomHbnContainer$EntityItem cannot be cast to com.jarris.dto.Cli
BeanContainer<String, Cli> b = new BeanContainer<String, Cli>(Cli.class);
if (values instanceof Set) {
Set selected = (Set) t.getValue();
for(Iterator it = selected.iterator(); it.hasNext();){
Object id = it.next();
Item item = t.getItem(id);
b.addBean((Cli) item);
}
}
Hi, I’m having a lot of problems with relationships in tables, now I’m getting a org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.jarris.dto.Vta.vtls, no session or session was closed as you can see there’s a new relation in table Vta, but now I’m getting this exception… I can send you the whole project? I’ll reward you if you help me to finish this…
I would say that if you are having LazyInitializationExceptions, something is wrong in your code, not in the add-on. However I’d need to see your code to confirm that. Please send me a message using the contact form at
http://alejandroduarte.weebly.com/contact-me.html to help you solve this issues more easyly.
Hi Mathias.
Implement your own
DefaultCrudFieldFactory overriding
createCustomField() to return a custom
TwinColSelect for the “bunch” property. Pass an instance of your
DefaultCrudFieldFactory to the
CrudComponent (using a proper constructor or builder).
Here you got an example:
public class MyFieldFactory extends DefaultCrudFieldFactory {
@Override
public Field createCustomField(Object bean, Item item, String pid, Component uiContext, Class<?> propertyType) {
Field field = null;
if(User.class.isAssignableFrom(bean.getClass())) {
if("bunch".equals(pid)) { // replace "bunch" whith your actual property name in the User class
field = new TwinColSelect();
// TODO: populate TwinColSelect with data
}
}
return field;
}
}
It’s look like something wrong with my environment. i tried a small vaadin project & jasper report. it still didn’t work. i have tried to change the enterpriseapp, lib, and jasper file. what i need is the enterprise app can show the report. I work with win7, netbeans 7.2, jdk 6, tomcat 7. does anyone ever meet the same problem?
I think this is just a warning when the server (Tomcat?) is serializing session instances on shutting down or starting up. This is not a problem unless you want to provide session serialization between restarts. Please provide me with the entire log and a screenshot so I can help you.