Hello,
I have data in the Database, using displaytag I am able
to display data using sessionScope. Data is collected from
a servlet and forward to a jsp. I want to display pictures or images
with each data row collected. Since I am using database sql server to
store the data, I have an attribute which is a string / varchar type which
contains details of the directory I store my pics. E.g - directory
C:\java\pictues
picture
C:\java\pictues\for.jpeg
Now I just have to use the img src= to display the pictures.
Below is example of my displaytag:
<display:table name="sessionScope.gotent" uid="datum" defaultsort="1"
defaultorder="descending" pagesize="7" class="tabledata">
<display:column property="id" sortable= "true"
headerClass="sortable" title="Bale code"/>
<display:column property="name" sortable="true"
headerClass="sortable" title="Name"/>
<display:column property="description"
sortable="true" headerClass="sortable" title="Description"/>
<display:column property="colour" sortable="true"
headerClass="sortable" title="Colour "/>
<display:column property="price" sortable="true"
headerClass="sortable" title=" Bale price "/>
<display:column property="size" sortable="true"
headerClass="sortable" title=" Size "/>
<display:column property="pic" sortable="true"
headerClass="sortable" title="Picture"/>
<display:column property="pic" <img src="<c:out
value="#{tableId.propertyName}"/>"/>
<display:column property="pic" <img src="<c:out
value="balepic"/>"/>
<img src="${property="balpic"}"/>
</display:table>
I have seen examples as above and thought I play around with it but got nowhere.
Please, help.
THANKS
eve
_________________________________________________________________
Get the best of MSN on your mobile
http://clk.atdmt.com/UKM/go/147991039/direct/01/
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user