Change in value handling

X-Application Version: 3.1.2
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 4.0.2
JDK Version : 1.3.1

I have previously used this technique to populate bdm:edit fields with values from my jsp code:

<bdm:edit select=“/some/xpath”>

</bdm:edit>

This no longer works at X-Application 3.1.2. The field value is never set. If I remove the surrounding bdm:edit tags, the field value re-appears correctly. Is there another way to achieve the same?

[This message was edited by Bill Leeney on 28 Feb 2002 at 10:28.]
X-Application Version: 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : NT, Win2k, Solaris, …
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

[This message was edited by Bill Leeney on 28 Feb 2002 at 10:29.]

[This message was edited by Harald Wolf on 28 Feb 2002 at 17:07.]

Here’s an example of the problem.

If you drop this page into the examples/jsp/simple directory of X-Application, and run it in “create mode” with URL…

http://localhost:8080/simple/BillsModify.jsp?:action=create&:schema=Property

…under X-Application V311 you will see City= “CityOfDerby”.

Running the same code under V312 the City value is empty.
BillsModify.jsp (11.4 KB)

Hi Bill,

you´re right. You need to change the class
com.softwareag.xtools.xapplication.jsp.taglib.FieldTag

Method handleInputControls:

else {
htmlElement.setAttribute(“name”, select);
if (fieldValue != null && fieldValue.length() > 0) {
htmlElement.setAttribute(“value”, fieldValue);
}
}

Note: This sets a default value just in case the instance does not exist or is empty.
If a value exists in the document instance this default value is not used.

Regards, Harald

Works perfectly - many thanks.

The old behaviour was actually a bug, not a features. X-Application 3.1.2 fixed this bug …

Harald’s “fix” adds a new feature to the EditTag:
if there is no value obtained from the database,
the value specified by the user in the jsp page
is used.

Do you think we should add this feature to the
next version of X-Application? I know at least
one person who used the 3.1.1 bug as a feature

Michael

Software AG Germany, Darmstadt

Yes I think it’s important to be able to define a default value for an input field, and to have the jsp page generate that default value. I have only written two “real” applications with X-Application but both of them exploited the bug in V311.

Thanks.

Hi,

We’re currently coding an application for a client that uses the feature mentioned by Bill.
(we’re still on X-Application 3.1.1).

Our concern is that the application will break
when the client upgrades to future versions of X-Application.

Please let us know if this feature will be included in future versions.

Thanks,
Puny Sen

Hello,

yes. This feature will be available.

Regards, Harald