I’d like to introduce this new add-on I’ve been working on for some time. The add-on is a set of classes to help in the creation of CRUD interfaces with import and export options, reports (with jasper reports), audit logs, MDI like interfaces, and other features.
Well… I hope It to be useful for reference on integrating technologies or for directly use in your own apps. Will appreciate any comments and suggestions.
I’m developing this add-on based on other three software projects. Accordingly to the requeriments for these projects, I implement all the functionality that I think would be useful for other projects, in the add-on. So it’s very likely that new features will appear as the other projects evolve. Now, what it’s happening at this point with the add-on is that it has enough features to allow the development of the three products I’m involved on. So, I would say that in the future, the add-on will have a lot of bug-fixes and improvements over the current components rather than new ones.
Hi,
When I use the jasper reports module, the whole web application is blocked, it gives none response unless I restart the web server. Could you help me with this problem?
Thanks
Hi, awesome add-on, but I’m having issues with CRUD relationships, I have a onetomany relationship, And I want to get rows so can be displayed in a table in my CRUD interface, just like the example app, also, I saw you have spanish locale how can i use it in all the labels in my app? thank you very much
Cli class, has CLITELEFO, also Vta class has VTATELEFO, so i have a join between them in a onetomany relationship 12387.java (6.99 KB) 12388.java (9.53 KB)
In order to use the spanish locale (or any custom configuration file), you must define your own ServletContextListener extending enterprise-app’s
DefaultContextListener and overriding
getPropertiesFileNames() . The following example will include spanish locale, and two custom configuration files:
public class MyContextListener extends DefaultContextListener {
@Override
public String[] getPropertiesFileNames() {
return new String[] {
"/defaultConfiguration-es.properties",
"/database.properties",
"/ui.properties"
};
}
}
Ok, thanks, now I have my app in spanish locale, but I’m having the same situation with onetomany relations…
the first screeshot shows the relationship between tables,
the second one as you see it’s the CRUD table of clientes, and it’s working fine… actually the column ventas is fine, but as soon as I select a row with ventas on it, it never stop loading data… and I got java.lang.OutOfMemoryError: Java heap space 12396.java (6.8 KB) 12397.java (9.57 KB)
@CrudField(embedded=true) only works if you map the property with @OneToMany(cascade=ALL, orphanRemoval=true) .
mappedBy is not currently supported for embedded
EntityTable fields. If you need to keep your current mapping, you must implement your own field component and add it to the CRUD via a custom
DefaultCrudFieldFactory .
Hi John. You can extend
DefaultHbnContainer and use all the protected
*query() methods. Take a look at the classes inside the
enterpriseapp.example.container package of the example application.
Of course. Hibernate session is exposed through
sessionManager.getSession() , so you can use
session.createSQLQuery() . Please refer to Hibernate documentation to get more details.
Nice, man you are helping me a lot, but now i have another question, in this case I got a Table with containerdatasoure that is a CliContainer form the entity Cli.java, and I want to get the selected values and put it on a separate CliContainer…
CliContainer clientes = (CliContainer) ExampleContainerFactory.getInstance().getContainer(Cli.class);
t.setContainerDataSource(clientes);
t.setSizeFull();
t.setImmediate(true);
t.setSelectable(true);
t.setMultiSelect(true);
t.addListener(new ItemClickListener() {
private static final long serialVersionUID = 1L;
public void itemClick(ItemClickEvent event) {
Object values = t.getValue();
if (values instanceof Set) {
Set selected = (Set) t.getValue();
for(Iterator it = selected.iterator(); it.hasNext();){
final Object id = it.next();
Item item = t.getItem(id);
}