Title: Message
Here is a link to the JSP file that's used for this example.  It looks like you might need to add the SQL that's used to create the table in the first place.
 
 
HTH,
 
Matt
 
<%-- Create temporary table --%>
<c:if test="${empty applicationScope.tableCreated}">
<sql:transaction dataSource="jdbc/appfuse">
 
    <sql:update>
        DROP TABLE IF EXISTS temp_user
    </sql:update>
    <sql:update>
        CREATE TABLE temp_user (
           id BIGINT not null AUTO_INCREMENT,
           username VARCHAR(50),
           firstName VARCHAR(100),
           lastName VARCHAR(100),
           primary key (id)
        )
    </sql:update>
 
    <sql:update var="updateCount">
        INSERT INTO temp_user
            (username, firstName, lastName)
        VALUES
            ('mraible', 'Matt', 'Raible')
    </sql:update>
    <sql:update var="updateCount">
        INSERT INTO temp_user
            (username, firstName, lastName)
        VALUES
            ('tomcat', 'Tomcat', 'User')
    </sql:update>
</sql:transaction>
<c:set var="tableCreated" scope="application" value="true" />
</c:if>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Branko Bozek
Sent: Thursday, May 20, 2004 9:13 AM
To: [EMAIL PROTECTED]
Subject: [displaytag-user] Editable Table problem

I have problem with "Editable Table / SQL Tag" example.
 
When I'm using display tag "<display:table name="${users.rows}" id="user" class="list">"
result is empty table (Nothing found to display.).
 
With following code everything looks fine.
"<display:table name="pageScope.expanses.rows" id="rows" class="list">" 
 
I still  can't get rows from table using "value="<c:out value="${user.firstName}"/>" ".
How I can retrieve "users" using ${user.username} _expression_.
 
CODE EXAMPLE
******************************************************************
<sql:query var="users" >
    select id, username, firstName, lastName
    from temp_user order by upper(username)
</sql:query>
 
<display:table name="${users.rows}" id="user" class="list">
  <display:column title="Username">
            <input type="text" name="username" style="padding: 0"
                value="<c:out value="${user.username}"/>" />
  </display:column>
</display:table>
 
******************************************************************
 
Probably I forget to set something on my JSP page or in web.xml file.
I  have spend few day to find solution.
Hope that somebody can help me.
 
Thanks!
  Branko

Reply via email to