This page is intended to answer common questions about Open SUIT.

Can I insert an HTML fragment in the page instead of text?


Everywhere Open SUIT expects some text it's possible to return an HTML fragment instead.

All you have to do is to prefix the string with "\html\" !

Then the prefix is stripped from the text, and the text is inserted "as-is" in the page rendering (no encoding applied, assuming the text is already encoded).

That can be done:

  • directly in the Open SUIT xml files,
  • in your Java code (don't forget to double the backslash),
  • in your resource bundle files (needs escaping too),
  • ... or actually wherever the string comes from.

Caution: a badly formatted HTML fragment may break the page rendering.

How can I define conditional rendering?

In other words, can a page display differently depending on some condition?

Unfortunately doing this in xml language is not so easy as in JSP for instance, but at least we can.

The technique is to use <html.layout.Div> elements with Visible expression set, in order to show/hide their content.

An example of this technique is shown in the Open SUIT Live Tour Tips & Tricks section.

How can I internationalize enumerated values?

An enumerated type in Open SUIT may be implemented either as a regular Java enum, or a finite list of int, Integer, or even String values.

In your resource bundle, define your messages as follows (for an enum):

  • list.animal.dog = Dog
  • list.animal.cat = Cat
  • list.animal.pig = Pig
  • ...

... or for an int typed enumeration:

  • list.animal.0 = Dog
  • list.animal.1 = Cat
  • list.animal.2 = Pig
  • ...

Then use either the stringFormat() or messageFormat() functions in your expression to build dynamically the message key.


with stringFormat():
message(stringFormat('list.animal.%d', $value))
with messageFormat():
message(messageFormat('list.animal.0', $value))

An example of this technique is shown in the Open SUIT Live Tour Tips & Tricks section.

Is there a way of delegating table pagination and sorting to the database?

Open SUIT tables are able to handle pagination, sorting and filtering by themselves.
It's a nice feature but it may become costly if the table gets large.

For a potentially large table, it's preferable to implement those in the query to the database.

Open SUIT fully supports both modes. A detailed sample is available in the Movies DB tutorial.

Where can I get information about Open SUIT expressions?


What is the "page context" scope for a bean ?

The page context is a lifescope for your beans that stands between the session and the request.

Simply put, it's as-long-as the user stays in the page.

This notion is extensively explained in the Movies DB tutorial.

I face encoding troubles with texts passed as url parameters

When encoding url parameters, Open SUIT uses the same charset than for the HTML page.

On some J2EE servlet containers, you may have to tell the container to use the same charset than the page body, or even to declare explicitly which charset to use to decode url parameters.

On Tomcat, you just have to add the useBodyEncodingForURI="true" attribute on the Connector element in the server.xml configuration file:

    <Connector enableLookups="false" port="8080" [...] useBodyEncodingForURI="true"/>

Where can I find Open SUIT XSDs?

If you install the Open SUIT plugin for Eclipse, then all XSDs will be registered in your Eclipse XML Catalog (see Window > Preferences > XML > XML Catalog). Then the Eclipse XML editor should retrieve them automatically (providing content-assist and XML validation).

Nevertheless, XSDs can also be found in the Open SUIT distribution.

Lastly, they are also accessible online:

Does Open SUIT run in Google App Engine (GAE)?


All you have to do is to enable sessions (see GAE documentation).

By the way, the Open SUIT Tour is accessible on Google AppSpot.

Note: the chart extension integrates JFreeChart, that relies on Swing to compute chart images.

As Swing is not supported by GAE, so is JFreeChart and therefore the chart Open SUIT extension.