0

Looked at some applications built using Openxava and it seems like a very useful peice of kit. However I am trying to find a very basic worked example ( helloworld type ) but can't find any. I have looked at the Openxava bundled examples but even these have too much 'magic' going on in them where the only thing you code is a single Entity class and next step is viewing a working Web Application. How is the UI created??
I'm looking a simple example like where I have a simple business class with a single method that returns a "helloWorld" string, how do I display that as the text on a button on a web page?

MayoMan
  • 4,757
  • 10
  • 53
  • 85
  • "how is the ui created?" - you could read the source code, I suppose. Not sure you'd be able to handle all the magic, though. – Sergio Tulentsev Jun 05 '15 at 07:57
  • This is the basic example that comes with the openxava installation. Digging into the source code is not the issue. I am following the first example word for word and it jumps from writing Java code to having a working UI in a single step. If it is a thing that you have to build the UI yourself as well then that's fine but I thought openxava required java coding in your business layer only. – MayoMan Jun 05 '15 at 08:50

1 Answers1

0

Writing an entity class to get a working web application is the simplest thing you can do with OpenXava. Most Java Framework are low level, focused in infrastructure, where you have to do all the work to get the application. OpenXava is high level where you have all the hard stuff done, you only have to write your data structure and your business logic.

But you can use plain JSP. If you want that your OpenXava application says "Hello", create a hello.jsp in the web folder and put inside it "Hello". 4 characters of code, less than Spring Boot.

javierpaniza
  • 677
  • 4
  • 10
  • I didn't mean I want a web page that says "Hello" done via JSP. I want to do it where I have business logic that generates the string "hello" and have this displayed. The idea of using openxava is to avoid having to dabble with javascript/jsps or have I got it completely wrong. – MayoMan Jun 05 '15 at 08:45
  • You can define your own logic for your OpenXava application using controllers: http://openxava.wikispaces.com/controllers_en – javierpaniza Jun 08 '15 at 11:49