| By Javier Paniza | Article Rating: |
|
| November 26, 2012 10:24 AM EST | Reads: |
3,745 |
You have to define a @Tab in your entity as following:
@Tab ( name ="Cards", editor="CustomerCardList",
properties="number, name, type, address.city, address.state.name"
)
And also define the editor in the editors.xml file of your project:
<editor name="CustomerCardList" url="customerCardListEditor.jsp"/>
Of course, you have to write customerCardListEditor.jsp to render the customers in your own way. Learn more details about how to choose an editor for a @Tab in the reference guide.
Moreover, it's possible to define an editor for all the lists of a model or even for all the lists of your application. Look at the customizing chapter of the reference guide.
With the addition of lists now we have editors for properties, references, collections and lists, thus the customization of the UI generated by OpenXava is total. You get exactly the UI you want.
Assigning model objects directly to View
Until now to put and get the data from a view based on a transient class you needed to use getView().get/setValue() with simple values or getView().get/setValues() with maps, you couldn't use the model object directly. Since OpenXava 4.6 you can use model objects to populate the view. So, a code like this is possible:
DateRange range = ... // DateRange can be an entity or a transient class
...
getView().setModel(range); // Populate the view with range data
This code populate the view with data from the DateRange object, even if the view currently is not displaying a DateRange the view is changed to display it.
Asserting PDF content in jUnit tests
Now you can verify that the content of the generated PDFs in your jUnit tests is the correct one. To do this ModuleTestBase has the following new methods: getPopupPDFAsText(), printPopupPDFAsText(), getPopupPDFLine(), assertPopupPDFLine(), assertPopupPDFLinesCount() and getPopupPDFLinesCount(). From now on you can write test code as following:
execute("CustomReport.generatePdf");
assertPopupPDFLinesCount(5);
assertPopupPDFLine(1, "jUnit Carrier report");
assertPopupPDFLine(2, "Name Number Zone");
assertPopupPDFLine(3, "CUATRO 4 1");
A good news for all of us that love automated testing.
@RowAction for collections
@RowAction allows to define an action to be show in each row, but not in the collection button bar. If you write a code like this:
@OneToMany(mappedBy="parent", cascade=CascadeType.ALL)
@RowAction("OrderDetail.reduceQuantity")
Collection<OrderDetail> details = new ArrayList<OrderDetail>()
You'll get the next user interface for the collection:
Note as Reduce quantity action is in the row but not in the button bar. Read more about @RowAction at wiki.
And more
See changelog for the complete list of new features and fixes.
Published November 26, 2012 Reads 3,745
Copyright © 2012 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Javier Paniza
Javier Paniza is the project lead for OpenXava project. He works as software developer at Gestión 400, a software company for public administration in Spain. He has been developing with Java Enterprise since 1998. Also he has been J2EE mentor for development teams in banking projects.
- Cloud People: A Who's Who of Cloud Computing
- Session Topics: 12th Cloud Expo / Cloud Expo New York
- CollabNet And UC4 Announce General Availability Of Joint Enterprise DevOps Platform
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- The Software Freedom Conservancy – Fundraising Campaign: Non-Profit Accounting Software
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- Project Floodlight Grows to the World’s Largest SDN Ecosystem; Global Users, Contributors and Partners Innovating Using Open Source SDN
- Midokura Announces General Availability of Disruptive Network Virtualization Technology
- Remote Controlling a Car over the Web. Ingredients: Smartphone, WebSocket, and Raspberry Pi.
- Social Business Intelligence Book Industry’s First Executive SBI Guide
- The Linux Foundation’s Collaboration – OpenDaylight Project – Open Source SDN
- Tech Trends To Watch In May 2013
- Cloud People: A Who's Who of Cloud Computing
- SUSE Receives Common Criteria Security Certifications
- Basho Announces Open Source Riak CS and General Availability of Riak CS Enterprise v1.3
- Session Topics: 12th Cloud Expo / Cloud Expo New York
- CollabNet And UC4 Announce General Availability Of Joint Enterprise DevOps Platform
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- The Software Freedom Conservancy – Fundraising Campaign: Non-Profit Accounting Software
- MicroStrategy Announces General Availability of MicroStrategy 9.3.1
- Project Floodlight Grows to the World’s Largest SDN Ecosystem; Global Users, Contributors and Partners Innovating Using Open Source SDN
- Mobility News Weekly – Week of March 17, 2013
- Global Information Security Products And Services Industry
- Kevin Benedict’s What’s New in HTML5 – Week of February 24, 2013
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- Creating Web Applications with the Eclipse Web Tools Project
- Eclipse Special: Remote Debugging Tomcat & JBoss Apps with Eclipse
- Where Are RIA Technologies Headed in 2008?
- The Next Programming Models, RIAs and Composite Applications
- SYS-CON Webcast: Eclipse IDE for Students, Useful Eclipse Tips & Tricks
- How to Bring Eclipse 3.1, J2SE 5.0, and Tomcat 5.0 Together
- Eclipse: The Story of Web Tools Platform 0.7
- The Top 250 Players in the Cloud Computing Ecosystem
- "Eclipse 3.0 is a Great Leap Forward," Says JDJ's Dudney
- Developing an Eclipse BIRT Report Item Extension





















