• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Selecting row in jsp

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to display a entire row from database in a jsp page.Each row suppose represnts a mail.
Now the row has got 3 fields.if anyone selects any paticular row(suppose a mail),then the corresponding mail should open up in another jsp page.I want that along with it, i shloud also be able to get the value of any field of that particular selected row(or mail)..
e.g
i hv a received a mail from A whose id is 1234 and date of posting is 17.04.2006( all these accessed from database and displayed in table format ( using Display Tags) in a jsp page).
When i click on the above mail, the mail should open with its content and also i shld see the ID BEING DISPLAYED...
Hw can i do this???

[Removed URGENT from subject line - GDB]
[ April 16, 2006: Message edited by: Gregg Bolinger ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You've got several issues you are going to have to deal with in this single post. The first thing you should focus on is getting your row from the database to display on the page.

So where are you at on that? What have you tried? What isn't working? Are you using JSTL?

Also, you might want to take a look at this on our FAQ page. I've edited your post accordingly.

Thanks.
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One thing at a time. How far have you gotten so far? Where's your code? What part has you stumped?
 
R. Roy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i hv done with displaying the database rows using DISPLAY TAGS.Nw i wnt to knw when one clicks on any particular row,i wnt that particular mail's content be opened,along with it i also want the value of ny field of the selected row for subsequent use.How shld i proceed?I m stumped on this...
 
R. Roy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well,there is a problem while displaying the database rows using DISPLAY TAGS.
I m using the following code for displaying:

<display:table name="${rowlist}" id="row"pagesize="10" class="dataTable" cellspacing="0" decorator="org.displaytag.decorator.TotalTableDecorator">
<display:column property="npcstat" title="Mail Status" class="npcstat" headerClass="npcstat" />
<display:column property="caseid" title="Job ID" sortable="true" class="caseid" headerClass="caseid" />
<display:column property="from" title="From" sortable="true" class="from" headerClass="from" />
<display:column property="postdate" title="Date of Posting" sortable="true" format="{0,date,short}" class="postdate" headerClass="postdate" />
<display:column property="posttime" title="Time of Posting" sortable="true" class="posttime" headerClass="posttime" />
</display:table>



where the name "rowlist" is actually an araay list which contains the object of the bean used to store the data rcvd from database.....
shown below:

ArrayList al=new ArrayList();
ViewJobBean vb;
Statement stat=con.createStatement();
ResultSet rs=stat.executeQuery("Select * from nms.transaction_info");
while(rs.next())
if((sys_uid.equals(rs.getString(3))) && npcstat.equals(rs.getString(7))) {
++i;
caseid = rs.getString(1);
from = rs.getString(2);
postdate = rs.getString(4) ;
posttime = rs.getString(5);
npc_stat = rs.getString(7);
vb=new ViewJobBean();
vb.setCaseid(caseid);
vb.setFrom(from);
vb.setPostdate(postdate);
vb.setPosttime(posttime);
vb.setNpcstat(npc_stat);
al.add(vb);
//vb.setList(al);
}
}
h.setAttribute("rowlist",al);

ViewJobBean stores the data rcvd from database....

But on running the application, its shwng:
NOTHING FOUND TO DISPLAY

I cant idntify where is the problem? Plz help!!!
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using DisplayTag Library?

You can use events for your each row. So after clicking, it go to the server and fetch the particular mail contents belongs to that row. Well, you can place the record ids in parameters.
 
R. Roy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
yes i am using DISPLAY TAG libraries.Adeel can u elaborate with the exaple i hv given? it would be gr8 if u provide a code snippet(for events etc.)
 
Bear Bibeault
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this is about a specific and proprietary tag library, I've moved it off to the Other Open Source Projects forum.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic