Blog do projektu Open Source JavaHotel

niedziela, 4 maja 2014

Enhancement to MVP GWT/Jython framework

Introduction
I added several enhancement to my MVP framework. Source code is available here, the demo version (deployed to Google App Engine) is available here. I'm planning to use this enhancements in the JavaHotel application. The description is available here.
Disclosure panel
It is an utilization of GWT DisclosurePanel. Demo version: link -> Different lists -> Dialog with disclosure. I'm planning to use it for more advanced room booking options (group booking). Because in most cases a single room is booked it is not necessary to expose group booking options all the time. The implementation also raises Jython action events before opening and closing the disclosure panel.
Autohide dialog
It is a GWT DialogBox widget with 'autoHide' constructor parameter set to true. Demo version: link -> Autohide dialog. I'm using this feature while exposing the link for PDF downloading. This link is enclosed in autohide dialog just making removing this small dialog more convenient.
Modeless dialog
It is a GWT DialogBox with 'modal' constructor parameter set to false. link -> Modeless dialog ->Modeless. After displaying the last dialog it is still possible to enter values into underlying dialog.I'm planning to use it in the JavaHotel application for more sophisticated searching.
Unfortunately, working with modeless dialog causes some complications and questions. For instance : whether modeless dialog should be removed while underlying dialog is closed ? It requires more elaboration.
Programmatic switching active line in lists
As a default the active line in the list immediately after creation is not specfied. The user should manually navigate to the other lines if necessary. I added the programmatic way of changing the active line - for instance - to implement more advanced searching. link -> Different lists -> List with custom search. I'm planning to use this option for more advanced booking.
Programmatic change active line in dateline panel
This problem is similar to above but is related to dateline widget. link -> Panel date -> To date.
URL query string
Allows passing parameters from query string to Jython backing code. More details.
Strange thing while deploying JSPWiki for Clouds application
I spent some time trying to resolve log message:
Unsupported major.minor version 51.0
The meaning of this  message is obvious: one is trying to execute java code in JVM not supporting this Java version. For instance: byte code created with JDK 1.8 in JVM 1.7. I indeed launched Eclipse with JDK 1.8 but JSPWiki code was compiled having 1.7 compatibility level. This message was throws from JSP (not pure Java) code.
I discovered that this message is thrown after executing the application on local machine in Development mode before deployment to Google App Engine. Probably the JSP pages are compiled at that moment and later I was unable to find any way to force recompiling it in 1.7 compatibility mode. After relaunching the Eclipse with JDK 1.7, running the application locally and redeploying it to Google App Engine again the problem disappeared.

Brak komentarzy:

Prześlij komentarz