GWT/JAVA - Getting an AJAX call into a dialog box -


I am new to GWT, and there is a problem showing the results of an AJAX call in my dialog box.

I set my own dialogue box, Vpanel, and feedback labels here:

  VerticalPanel Event DiffetWindows = New Vertical Panel (); Last dialog box dialog box = 2 new dialog box (); DialogBox2.setText ("Event Details"); DialogBox2.setAnimationEnabled (true); Final HTML Server Response 3 = New HTML ("& lt; b & gt; Ok, It's Working & lt; / b & gt;"); ServerResponse3.addStyleName ("detailView"); EventDetailWindow.add (serverResponse3); EventDetailWindow.addStyleName ("detailWindow"); DialogBox2.setWidget (eventDetailWindow); RootPanel.get ("detailWindow") add (eventDetailWindow).  

Then, in the onSuccess method I have this:

  dialogBox2.setText ("Remote Procedure Call"); ServerResponse3.setHTML (results); DialogBox2.center (); CloseButton.setFocus (right); However, when this appears on the feedback page, not in the dialog box, and the dialog box is empty, it looks like it has been set up as a starter project - Which works fine ..  

Can anyone help me ...?

Do not use that code, which is root paneel.gate ("description"). Add (eventDetailWindow); If you only want to add to dialogBox2

Use this way:

  dialogBox2.setWidget (eventDetailWindow);  

and you have to add dialogBox2.show (); Because dialogBox2.center (); This code will show dialog box 2 initially.

Package Com X Import com.google.gwt.core.client.EntryPoint; Import com.google.gwt.event.dom.client.ClickEvent; Import com.google.gwt.event.dom.client.ClickHandler; Import com.google.gwt.user.client.ui.Button; Import com.google.gwt.user.client.ui.DialogBox; Import com.google.gwt.user.client.ui.HTML; Import com.google.gwt.user.client.ui.RootPanel; Import com.google.gwt.user.client.ui.VerticalPanel; Public class example enters EntryPoint {public zero} on ModuleLoad (vertical panel eventDetailWindow = new vertical pageple (); last dialog box dialog box 2 = new dialog box (); DialogBox2.setText ("Event Details"); dialogBox2.setAnimationEnabled (true ); Last HTML Server Response 3 = New HTML ("& lt; b & gt; Ok, it is working & lt; / b & gt;"); serverResponse3.addStyleName ("detailView"); eventDetailWindow.add (ServerResponse3); eventDetailWindow.addStyleName ("detailWindow"); dialogBox2.setWidget (eventDetailWindow); button b = new button ("click"); B.addClickHandler (new cli Handler) click {@Override on public zero (ClickEvent event) {dialogBox2.setText ( "Remote Procedure Call"); server Response3.setHTML ( "Results"); dialogBox2.center ();}}); RootPanel.get () add (b). }}

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -