Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2" Watch "Struts2" New topic
Author

Struts2

Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
issue: i have to display a search results on the modal box.

initially the search results was captured using ajax and then displayed using the display tag in a table format on the right side of page.

im not sure how to do it, please can i get help?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8839
    
    7

Welcome to the JavaRanch.
You must have missed our naming policy on the way in. In short, your displayed name must be your real (or at least real-sounding) first and last name separated by a space. You can change your displayed name here. Thank you for your prompt attention.
It's also a good idea to Use A Meaningful Subject Line so we can help you better.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
i am new to struts2.

i need to enhance something which is already existing.
The flow works like, the search results are being captured by using the Ajax.updater.
The result is displayed in a table format at the right side of the jsp using the display tag and css

now the enhancement is that the search results need to be displayed on a modal dialog box. I do not know how to appraoch?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

"learn more", Joe's request that you change your display name to adhere to JavaRanch standards was not a suggestion. Valid display names are mandatory for participation on the Ranch. Please change your display name as instructed prior to your next post.

Be aware that accounts with invalid display names are disabled.

bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8839
    
    7

Again, your displayed name must be your real (or at least real-sounding) first and last name separated by a space. As Bear stressed, we take this policy very seriously.

As for your question, I'd start by figuring out how to make a modal dialog box. Once you've figured that out, you can work on pointing the dialog at the correct URL to execute the search.
Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
i have figured as to how the modal dialog can be done.

My issue is that, the search button Onclick is directly going to the search function().

and i have the modaldialog function as in a javascript OpenDialogBox().
So how do i call the search() from within the OpenDialogBox().
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8839
    
    7

Thanks for changing your name.
posted Today 2:18 PM -
i have figured as to how the modal dialog can be done.


That's not what you said in your previous post:

posted Today 1:44 PM:
now the enhancement is that the search results need to be displayed on a modal dialog box. I do not know how to appraoch?


Who knows what details you've left out of your last post. You need to Tell The Details, preferably after you've read our advice on How To Ask Questions On JavaRanch
The better question you ask, the more help we can give you.
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

posted Monday, October 20, 2008 11:36 AM Profile for Nishan Patel Email Nishan Patel Send New Private Message Edit/Delete Post Reply With Quote Hi...

You can easily integrate Display tag for pagination in struts 2.

you have get example from it's site and integrate it.

you have to add tag lib.

<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>

and add

<display:table name="list" pagesize="10" cellpadding="0" cellspacing="0"
requestURI="" id="row" class="">
<display:column title="#" headerClass="Table-Head">
<c ut value="${row_rowNum}" />
</display:column>
<display:column headerClass="Table-Head" value="Euro25.00000" title="Account" autolink="true" />
<display:column headerClass="Table-Head" property="email" autolink="true"
titleKey="email" />
</display:table>



Thanks,
Nishan Patel.


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
Thanks so much for the help.
I did resolve to get a modalbox.

I am displaying the search results in it in the form of a table.

My problem here is,
1. can i display a table without a header, if so how to do it.
2.Is there any other way to display the search results.

Please help me.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts2
 
Similar Threads
Input type attribute 'name' query?
JScrollPane
database results in a pane
display tag..Printing all rows of a table
How to display 10 most relevant tweets from Twitter in real-time for the keyword "@cldmgc".