display GWT dialog when a link is clicked in jsp

307 views
Skip to first unread message

James

unread,
Aug 8, 2012, 5:32:32 PM8/8/12
to google-we...@googlegroups.com
I have already used GWT to develop a dialog. From a gwt application, I can open this dialog from Anchor. I have a struts 2 application. I want to integrate this GWT dialog to a dynamic jsp page. On this jsp page, there are a lot of links that represent records. I want to open a GWT dialog once a link is clicked from this jsp page. I also pass a value from a link in jsp page to GWT dialog. How do I implement this feature?


James


Thad

unread,
Aug 13, 2012, 5:58:01 PM8/13/12
to google-we...@googlegroups.com
You can define a bookmark within your app then use that bookmark as the anchor within your other page. And the other page needn't be a JSP--it can be static HTML, or generated by a JSP, servlet, CGI, etc.

David

unread,
Aug 14, 2012, 10:59:47 AM8/14/12
to google-we...@googlegroups.com

"there are a lot of links that represent records "

Option 1) Have GWT consume this section - i.e. the jsp page contains an empty div with an id that can be picked up during GWT module load ( RootPanel.get("theId") ).     The records would then be rendered via a gwt-rpc call into a gwt grid or table component.  You can then use the anchor handlers for the Dialog that you already built.   

Option 2)  Have gwt bootstrap from the jsp but without consuming any section.   Add a javascript onclick to your jsp record to call a native javascript function which performs a jsni call for your loaded gwt module to open your dialog.  

Option 3)   Have gwt consume a div with a hidden overlay (a dialog) .   Add a javascript onclick to your jsp record to call  a native javascript function which performs a jsni call to the loaded gwt module to provide context and reveal the dialog


I prefer Option 1 as it leaves the page much more extensible for java developers to provide additional RIA capabilities. ( i.e. paging the records without re-loading the main page).       

 




On Wednesday, August 8, 2012 5:32:32 PM UTC-4, James wrote:
Reply all
Reply to author
Forward
0 new messages