Solved

DisplayTag or Struts-Layout - want editable tables

Posted on 2009-05-10
3
3,302 Views
Last Modified: 2013-11-24
Hi,

I need to you use something like DisplayTag but I need the tables to be editable.
StrutsLayout looks like what I need but according to many people on the web Struts-Layout does not work with Struts 2

Is there anything similar?
Can someone send me on links to tutorials or sample JSP code?

       

I have a list for these Review Objects. I want somone way of listing these Review Objects in a editable table?
I am using Struts 2/Tiles 2.
Have been looking at displayTag. I have the List<Reviews> displaying with displayTag but want to edit the approved and review fields.
The changes must persisit back to the Review object

Im not sure what to do. Any thoughts?

Thanks,
Alan
public class Review{  
     int reviewID ; 
     int approved;  
     String review;  
      
     ....//getters and setters  
    }  
 
 
 
 
The  jsp is
 
  
  .     <s:form method="post" action="save.action" validate="true">  
           <display:table name="${requestScope.reviewList}" requestURI="" defaultsort="1" id="review">  
               <display:column property="reviewID" title="Review" sortable="true"/>  
              <display:column property="approved" title="Approved" sortable="true">  
               <display:column property="review" title="Review" sortable="true">  
  .             <display:column title="View Post"><a >Edit</a></display:column> <%-- Can I do something here to populate a <s:textarea> --%>  
           </display:table>  
             
   <s:textarea/>  
       </s:form>

Open in new window

0
Comment
Question by:MBUNITED
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 500 total points
ID: 24351076
I don't think plain displaytag is what you want, if you want editing.

The displaytag project appears to be pretty much inactive for the past few years as people have moved to other libraries like Prototype, Dojo and ExtJS. I would recommend you look at one of those for better grids if you are going the "AJAX" route. We have deprecated displaytag in our projects and now use Ext, though it is a bit heavyweight.

If you want to stick with displaytag, there are AJAX enablers for it.

Look at AjaxTags or ajaxanywhere.

However, I would encourage you to look elsewhere, there are way more options nowadays, displaytag just isn't compelling enough anymore, though it is simple and clean, it just hasn't moved forward much in ages.
0
 
LVL 13

Expert Comment

by:Murali Murugesan
ID: 24372900

in addition to @mrjoltcola comments , here is an already running post on this Display tag,

http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_24393594.html

i have made comments and suggested an work around which is NOT a proven one, but you can give a try.

-Murali*
0
 

Author Closing Comment

by:MBUNITED
ID: 31579937
Thanks alot. I have seen EXT JS in the  past. I have heard of DOJO. Never heard of prototype. I will look into these. Thanks
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mapShare challenge 13 178
firstChar challenge 13 148
jdbc error in jsp application 20 89
eclipse apache tomcat admin console 52 189
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question