Change the Collection Value

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

Hi!

Within the file xapplication.conf a variable “xappCollection” is set for the Collection-value.
How can i change it dynamically?

Within the tag “select” of the taglibrary, there is an attribute collection.
I want to set this attribute with java like
<select collection=“<%=stringBean%>”, but nothing happens. The tag ignores the Java-value.

<jsp:useBean id=“stringBean” class=“java.lang.String”/>
<% stringBean= “TestCollection”; %>

Then i tried a second possibility.

<xapp:setvar name=“test” scope=“session” value=“<%=stringBean%>” default=“”/>

<xapp:getvar name=“test”/>

But “test” ist empty. What can i do?

Marcel

Hello,

Assignments for attributes <% … %> are runtime expressions that are not supported by the JSP standard 1.1. The standard 1.1 is used for the JSP tag library (-> tld file). However, you can switch to JSP standard 1.2. You have to change the tld file of X-Application and to enable runtime expressions for the attributes of the tags.

See also the topic

http://tamino.forums.softwareag.com/viewtopic.php?p=14027

If you don’t want to switch the standard, you can use the variables mechanism of X-Application, as you described it in your post. However, set the variable in the following way to avoid the problem with non-supported runtime expressions for attributes

<xapp:setvar name="test" scope="session" defaukt=""/><%= useStringBean %></xapp:setvar>



Now, the evaluation of the variable should be the content of the bean output.

Bye,
Christian.

Hi Christian!

Thank you, i switched to jsp 1.2 and it works.

Marcel