Help !
I have a tablepage with the table tag being as follows
<table proxied="true" formSubmitted="true"
data:alternateText="NO_ROWS_FOUND@jheadstart:nls"
data:destination="destination@jheadstart:sessionData" width="50%"
name="InventoryPackedSet"
data:tableData="InventoryPackedSet@jheadstart:sessionData">
One of the columns in the table is "PackedStatus" as follows
<column>
<columnFormat displayGrid="true" columnDataFormat="textFormat"/>
<columnHeader>
<text text="PackedStatus"/>
</columnHeader>
<contents>
<messageTextInput name="PackedStatus"
promptAndAccessKey="&PackedStatus"
data:text="PackedStatus" anchor="PackedStatus"
isPersistent="true"
dataObject="InventoryPackedSet"
maximumLength="1" columns="1" rows="1"
data:readOnly="isViewing"/>
</contents>
</column>
This column can contain 3 different values - "C", "M" or "E". I am then trying to add another column to the page that contains an different icon depending on the value of the PackedStatus column. Having tried all manner of different combinations, and having no luck, I thought it time to put the question forward !
What I have been trying initially is just to get the image "okind_active.gif" to display if the PackedStatus column is "C". This is what I have
<column>
<columnFormat displayGrid="true" columnDataFormat="iconButtonFormat"/>
<columnHeader>
<text text="Packed Status"/>
</columnHeader>
<contents>
<image source="images/okind_active.gif">
<boundAttribute name="rendered">
<comparison type="equals">
<dataObject data:select="PackedStatus" data:source="InventoryPackedSet@jheadstart:sessionData"/>
<fixed javaType="string">C</fixed>
</comparison>
</boundAttribute>
</image>
</contents>
</column>
What am I doing wrong here ? At the moment, it is not rendered for any column (no doubt becuase it cant find the PackedStatus dataObject Im referring to. If I change the comparison to notEquals - the image is rendered in every column. (The java type of the PackedStatus attribute is String)
Also, what I want to be able to really do is to bind the source attribute of the image such that if the PackedStatus is "C" then image source is "images/okind_active.gif", if "M" then source "images/warningind_active.gif" and if "E" then source "images/errorind_active.gif".
Can you please help me out here ?
Many thanks,
Brent