Display of optional elements in create.jsp

X-Application Version: 4.1.1
Tamino Version : 4.1.1
Platform : Win2k
WebContainer : Tomcat 4.1.1
JDK Version : 1.4.1, 1.3.1

If I have a schema which looks roughly like:
schema test
foo1 (1)
foo2 (?)
foo3 (+)
foo4 (*)

Why is it that an entry for the optional element (foo2) is displayed instead of an “add” button?

I tried to control the display by using “if (notexist)”, but this does not appear to work. I don’t want an optional element to be displayed in a create unless the user explicitly asks for it. How to do this?


When creating a new document, X-Application’s default behavior is to create optional elements.
You can change this behavior by changing the calls to com.softwareag.xtools.xapplication.businessdocument.BusinessFactory.forSchema()
in the source code. Instead of “true”, you have to pass “false” for the “createOptionals” argument. Namely, there are two calls that have to be change:
o xapplication/src/com/softwareag/xtools/xapplication/businessdocument/BusinessFactory.java,
line 81
o xapplication/src/com/softwareag/xtools/xapplication/businessdocument/BusinessDocuemntWorkspace.java,
line 223.

After changing the files, run
build quick
and copy the newly createad
into your web application’s WEB-INF/lib folder.


Software AG Germany, Darmstadt

X-Application Version: 4.1.1, 3.1.3
Tamino Version : 4.1.1, 3.1
Platform : Win2k, WinXP, Solaris, Linux, …
WebContainer : Tamocat 4.1.1, Tomcat 3.3.1
JDK Version : 1.4.1, 1.3.1