Equivalent of Line Separator in smartGWT?

2019-02-25 07:22发布

问题:

Is there an equivalent or alternate for

System.getProperty("line.separator");

It gives the below error

The method getProperty(String, String) in the type System is not applicable for the arguments (String)

回答1:

I think you need to execute System.getProperty("line.separator") in your server side code and access it using RPC or any other server side gwt communication technique.

Check GWT JRE Emulation:

GWT includes a library that emulates a subset of the Java runtime library. The list below shows the set of JRE packages, types and methods that GWT can translate automatically. Note that in some cases, only a subset of methods is supported for a given type.

System

err, out
System(), arraycopy(Object, int, Object, int, int), currentTimeMillis(), gc(), getProperty(String, String), identityHashCode(Object), setErr(PrintStream), setOut(PrintStream)