Re: create web service inside GWT project
If the response is something static (a template), it would have been easier to use a JSP. If you're fetching any document (unknown MIMETYPE), then using servlets is ok... fetch the document's content from database, use response.setContentType(mimetypefromdatabasehere); etc... A pointer... the RemoteService servlet already differentiates between RPC and other requests... That servlet overrides the default doGet or doPost to un-marshal the data you sent and then to route your RPC to the method you called in the client side... In Google IO check this video http://code.google.com/events/io/2010/sessions/architecting-production-gwt.html it talks about how it has a header X-GWT-Permutation, which tells you which JS file (permutation=IE-english, permutation=Safari-spanish) is excecuting... (as an example of the detail level at which it differentiates between regular HTTP requests and XHR... and to avoid XSRF http://dl.google.com/googleio/2010/gwt-architecting-apps-production.pdf (page 39) On Jul 10, 2:49 pm, Arian Prins apapapapapapa...@gmail.com wrote: Hi Jeff, I think I figured things out, thanks to your pointers. I'll try to explain what I did in case someone with the same question stumbles upon this thread. First, I created a class that extends HttpServlet. Thats different from the classes that are made to communicate with GWT-client. HttpServlet is a fairly simple way to create a respons to a webquery. See this page for some general info:http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-F... Second, I used a library to simplify creating XML responses. I used jdom. See this page for some info:http://www.ibm.com/developerworks/java/library/j-jdom/ Then I edited web.xml so the app server will connect requests to a certain URI to my newly created class: servlet servlet-nameMyJustCreatedExternalInterfaceImpl/servlet-name servlet-classnet.arianprins.advsys.server.ExternalInterfaceImpl/ servlet-class /servlet servlet-mapping servlet-nameMyJustCreatedExternalInterfaceImpl/servlet-name url-pattern/advsys/ExternalInterfaceImpl/url-pattern /servlet-mapping Just in case someone is interested; I'll add my test-class at the bottom. I'm now going to research the best method to do xml requests in vba / .net but that's for another group :-) Jeff, thanks for taking the time to help me. Arian. --- public class ExternalInterfaceImpl extends HttpServlet { public void init(ServletConfig config) throws ServletException { // Initialise anything if neede } public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { try { // This gets the id in the request iehttp://www.x.com/ExternalInterfaceImpl?id=5 Integer eszId = Integer.parseInt(request.getParameter(id)); // Build some example xml: Element carElement = new Element(car); Document myDocument = new Document(carElement); // Output the xml document: try { XMLOutputter outputter = new XMLOutputter(); response.setContentType(text/xml); response.setHeader(Cache-Control, no-cache); outputter.output(myDocument, response.getWriter()); } catch (java.io.IOException e) { e.printStackTrace(); } // id request variable didn't contain a valid integer: } catch (NumberFormatException e) { response.setContentType(text/xml); response.setHeader(Cache-Control, no-cache); response.getWriter().write(messageinvalid request: +request.getParameter(id)+/message); } } } On 9 jul, 17:23, Jeff Chimene jchim...@gmail.com wrote: Hi Arian, I don't have a good answer for you, as I really don't do server-side Java. I've got to believe that there are quite a few examples out there of how a Java servlet can participate in CGI traffic on some arbitrary port. Such CGI traffic is what a non-Java RPC client request looks like to a CGI server. Your servlet is written in Java, but doesn't use GWT Java RPC. IOW, this servlet doesn't extend and implement RemoteServiceServlet. This doesn't change what the Office macro sends. I could produce a Perl script that interacts with your Office macro, and the macro would never know that it's not talking to a Java servlet. Your servlet then decodes the request parameters and replies with a CGI-compatible response. BTW, the reference to .NET objects in my earlier post referred to the client side as well as the server side. Although you're using Java on the server side, I think you'll still need .NET classes for the client (MS Office) side. On 07/09/2010 07:19 AM, Arian Prins wrote: Hi Jef, Thanks for taking the time to answer my questions. I'll try to remove the
Re: GWT RPC with Adobe AIR 2
On Jul 11, 1:39 pm, nino ekambi jazzmatad...@googlemail.com wrote: Why dont just use the RequestBuilder and send the response back as JSON or XML ? Because you have to write some of the conversion process manually which is automated with GWT. Unless you know of a project that is a drop-in replacement for RPC with no extra code required? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT overlay
hi all , after i get the json fomat from the server i tried to use GWT Overlay to get the values from The json but after eval that return an array of object each index hold the json format after trying to get the values from it in this function private void DoWork(JsArrayMember_JSON members) { Window.alert(members.toString()); for (int i = 0; i members.length(); i++) { Window.alert(members.get(i).getEmail().toString()); if(members.get(i).getEmail().equals(loginInfo.getEmailAddress())){ if(members.get(i).getType().equals(Admin)){ AdminPanel admin = new AdminPanel(loginInfo.getEmailAddress(), loginInfo.getLogoutUrl(), members); RootPanel.get().add(admin); break; } } } the Window.Alert Show Me unDefined the jsonScript Class - package com.apphuset.eventbuddy.client; import com.google.gwt.core.client.JavaScriptObject; public class Member_JSON extends JavaScriptObject { // [1] // Overlay types always have protected, zero argument constructors. protected Member_JSON() {} // [2] // JSNI methods to get stock data. public final native String getEmail() /*-{ return this.email; }- */; // [3] public final native String getType() /*-{ return this.type; }-*/; } the json format -- http://www.4shared.com/photo/xZvLBL2r/jsonformat.html The Message --- http://www.4shared.com/photo/h10Jln2n/Message.html how To Solve This problem ??? Thanks, ahmed shoeib -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Image setUrl and setResources IE8 JavaScriptException
Hi Stefan, I did not encounter such a situation, yet. However, to my knowledge IE8 has an limit on data-url of 32KB which are used by GWT (url(data:...)). Probably one gif is smaller than the limit but the other is NOT. that seems to be the cause. However, only one out of four images in the resoucebundle is (slightly) larger than 32k, the others are smaller and still not displayed. For debugging just compile with output style: detailed. This gives you an idea of the position in your java code. Actually, I check the browser version and use setUrl() in case that it is IE 8. Using the resource bundle works for other browsers (including IE 7, but maybe I need to check). Thanks, Sven -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Storing passwords: jBcrypt vs Jasypt
Hi everyone, I'm looking for a good way to store user passwords and have found two potential solutions. - jBCrypt (Blowfish), as suggested in the LoginSecurityFAQ by Reinier of the GWT-incubator project, and - jasypt (SHA), found googling. Both are mentioned in a very old discussion (2008) about the LoginSecurityFAQ on this group. Since some time has passed, I would like to hear your opinions and experiences with either as I have not found thorough reviews written by security experts. Regards, M. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT overlay
I don't think that what you're showing there is a valid json array. It should be, you are also expecting it, but the array should have [ ] brackets surrounding it... So, the jsonformat.html file in which you're showing the data, you should have [ { type:asd, ... } , { type:asd, ... } ] On Jul 11, 12:22 pm, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: hi all , after i get the json fomat from the server i tried to use GWT Overlay to get the values from The json but after eval that return an array of object each index hold the json format after trying to get the values from it in this function private void DoWork(JsArrayMember_JSON members) { Window.alert(members.toString()); for (int i = 0; i members.length(); i++) { Window.alert(members.get(i).getEmail().toString()); if(members.get(i).getEmail().equals(loginInfo.getEmailAddress())){ if(members.get(i).getType().equals(Admin)){ AdminPanel admin = new AdminPanel(loginInfo.getEmailAddress(), loginInfo.getLogoutUrl(), members); RootPanel.get().add(admin); break; } } } the Window.Alert Show Me unDefined the jsonScript Class - package com.apphuset.eventbuddy.client; import com.google.gwt.core.client.JavaScriptObject; public class Member_JSON extends JavaScriptObject { // [1] // Overlay types always have protected, zero argument constructors. protected Member_JSON() {} // [2] // JSNI methods to get stock data. public final native String getEmail() /*-{ return this.email; }- */; // [3] public final native String getType() /*-{ return this.type; }-*/; } the json format --http://www.4shared.com/photo/xZvLBL2r/jsonformat.html The Message ---http://www.4shared.com/photo/h10Jln2n/Message.html how To Solve This problem ??? Thanks, ahmed shoeib -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
CellTable SimplePager and and UiBinder with provided=true
Hi, I have a very simple UiBinder file : g:HTMLPanel Usuários c:CellTable ui:field=grid/c:CellTable c:SimplePager ui:field=paginador/c:SimplePager /g:HTMLPanel CellTable and SimplePager needs to be instantiated using generics, and SimplePager also needs a constructor parameter, so I used @UiField(provided=true) for both at java side: @UiField(provided=true) final CellTableUsuario grid; @UiField(provided=true) final SimplePagerUsuario paginador; private ArrayListUsuario dados = new ArrayListUsuario(); private ListViewAdapterUsuario adapter = new ListViewAdapterUsuario(); public Usuarios() { inicializaDados(); grid = new CellTableUsuario(); // - adapter.addView(grid); adapter.setList(dados); paginador = new SimplePagerUsuario(grid); // - initWidget(uiBinder.createAndBindUi(this)); // -- The strange behaviour is when I run this code I get: 10:50:26.196 [ERROR] [app] c:SimplePager ui:field='paginador' missing required attribute(s): location view Element c:SimplePager ui:field='paginador' (:13) It seems that something is missing (view Element) at UiBinder side, but I'm using provided=true which means I'm in control of instantiating, and I provided the view element. More strange is that with the same UiBinder file if I mix the instantiations methods using provided for CellTable and @UiFactory for SimplePager it works. @UiField(provided=true) final CellTableUsuario grid; @UiField SimplePagerUsuario paginador; // --- not using provided anymore private ArrayListUsuario dados = new ArrayListUsuario(); private ListViewAdapterUsuario adapter = new ListViewAdapterUsuario(); public Usuarios() { inicializaDados(); grid = new CellTableUsuario(); adapter.addView(grid); adapter.setList(dados); initWidget(uiBinder.createAndBindUi(this)); } @UiFactory SimplePagerUsuario criaSimplePager() { SimplePagerUsuario p = new SimplePagerUsuario(grid); return p; } I'm using GWT 2.1M2. From what I understand from docs @UiField(provided=true) and @UiFactory are interchangeable, so I wanted to use just one way for code clarity. Can you comment on this subject. Thanks in advance and sorry my english. Geraldo Lopes -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: layoutpanels and actual results
It would help to know what specifically you were trying to do (there are a lot of different layouts on the page you linked to) and how it wasn't working for you. One common mistake that people make when starting out with layout panels is not using standards mode. It's documented on that page, but you have to go down a bit: http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Standards I think they should probably move (or repeat) at least the critical part about the doctype up to the top where layout panels are introduced. -Brian On Jul 10, 3:21 am, ToXiC dezm...@gmail.com wrote: Hi all Am jus a beginner and i've been trying to use the layout panels in my code..using the example code.i wasn't able to achieve the kindof results thts shown inhttp://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html so pls do help me...i jus want to hav layouts as shown in tht page..i jus want to know wht should be done to achieve it.thnks in advance :) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: layoutpanels and actual results
The other thing that I was just reminded of from another post is to make sure that you're using the appropriate root panel. Specifically, again if you're using layout panels, you need to use a RootLayoutPanel. -Brian On Jul 11, 10:33 am, Brian Reilly brian.irei...@gmail.com wrote: It would help to know what specifically you were trying to do (there are a lot of different layouts on the page you linked to) and how it wasn't working for you. One common mistake that people make when starting out with layout panels is not using standards mode. It's documented on that page, but you have to go down a bit: http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#St... I think they should probably move (or repeat) at least the critical part about the doctype up to the top where layout panels are introduced. -Brian On Jul 10, 3:21 am, ToXiC dezm...@gmail.com wrote: Hi all Am jus a beginner and i've been trying to use the layout panels in my code..using the example code.i wasn't able to achieve the kindof results thts shown inhttp://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html so pls do help me...i jus want to hav layouts as shown in tht page..i jus want to know wht should be done to achieve it.thnks in advance :) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Storing passwords: jBcrypt vs Jasypt
Hi, I use java.security.MessageDigest in a simple class converting a string (password) to a hashed string using SHA. If SHA becomes too weak, I could easily change to better algos. Stefan Bachert http://gwtworld.de On 11 Jul., 12:49, sbrombo sbro...@gmail.com wrote: Hi everyone, I'm looking for a good way to store user passwords and have found two potential solutions. - jBCrypt (Blowfish), as suggested in the LoginSecurityFAQ by Reinier of the GWT-incubator project, and - jasypt (SHA), found googling. Both are mentioned in a very old discussion (2008) about the LoginSecurityFAQ on this group. Since some time has passed, I would like to hear your opinions and experiences with either as I have not found thorough reviews written by security experts. Regards, M. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT overlay
first stop when validating any webservice json :) http://www.jsonlint.com/ On Jul 11, 10:09 am, djd alex.dobjans...@gmail.com wrote: I don't think that what you're showing there is a valid json array. It should be, you are also expecting it, but the array should have [ ] brackets surrounding it... So, the jsonformat.html file in which you're showing the data, you should have [ { type:asd, ... } , { type:asd, ... } ] On Jul 11, 12:22 pm, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: hi all , after i get the json fomat from the server i tried to use GWT Overlay to get the values from The json but after eval that return an array of object each index hold the json format after trying to get the values from it in this function private void DoWork(JsArrayMember_JSON members) { Window.alert(members.toString()); for (int i = 0; i members.length(); i++) { Window.alert(members.get(i).getEmail().toString()); if(members.get(i).getEmail().equals(loginInfo.getEmailAddress())){ if(members.get(i).getType().equals(Admin)){ AdminPanel admin = new AdminPanel(loginInfo.getEmailAddress(), loginInfo.getLogoutUrl(), members); RootPanel.get().add(admin); break; } } } the Window.Alert Show Me unDefined the jsonScript Class - package com.apphuset.eventbuddy.client; import com.google.gwt.core.client.JavaScriptObject; public class Member_JSON extends JavaScriptObject { // [1] // Overlay types always have protected, zero argument constructors. protected Member_JSON() {} // [2] // JSNI methods to get stock data. public final native String getEmail() /*-{ return this.email; }- */; // [3] public final native String getType() /*-{ return this.type; }-*/; } the json format --http://www.4shared.com/photo/xZvLBL2r/jsonformat.html The Message ---http://www.4shared.com/photo/h10Jln2n/Message.html how To Solve This problem ??? Thanks, ahmed shoeib -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Url to my data for HTTP GET request?
Have tried both RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, /rate.xml); and RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, GWT.getHostPageBaseURL() +rate.xml); both do not work. If that was a SOP problem it would fire the at least the onError method. On Jul 5, 11:45 pm, Thomas Broyer t.bro...@gmail.com wrote: On 5 juil, 17:08, Nik khristia...@gmail.com wrote: Hi, I'm new with GWT nad trying to write a simple XML-parser in Eclipse and really don't understand what url i have to use in my HTTP GET request. private void refreshtable() { // String url = http://127.0.0.1:9997/rate.xml;; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, rate.xml); try { Request request = builder.sendRequest(null, new RequestCallback() { .. now i have copied the file rate.xml to all of the folders, but the HTTP GET doen't see the file. I have also tried to puthttp://127.0.0.1:9997/rate.xml as url, where i can access it with my browser. Maybe someone has an advise? http://en.wikipedia.org/wiki/Same_origin_policy In other words: 1. deploy the XML on the same server as your GWT app 2. use a relative URL (i.e. /rate.xml or GWT.getHostPageBaseURL() +rate.xml) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Url to my data for HTTP GET request?
I'trying am deploying my App with eclipse and just trying to reach this data lying on a client side. On Jul 11, 6:43 pm, Nik khristia...@gmail.com wrote: Have tried both RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, /rate.xml); and RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, GWT.getHostPageBaseURL() +rate.xml); both do not work. If that was a SOP problem it would fire the at least the onError method. On Jul 5, 11:45 pm, Thomas Broyer t.bro...@gmail.com wrote: On 5 juil, 17:08, Nik khristia...@gmail.com wrote: Hi, I'm new with GWT nad trying to write a simple XML-parser in Eclipse and really don't understand what url i have to use in my HTTP GET request. private void refreshtable() { // String url = http://127.0.0.1:9997/rate.xml;; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, rate.xml); try { Request request = builder.sendRequest(null, new RequestCallback() { .. now i have copied the file rate.xml to all of the folders, but the HTTP GET doen't see the file. I have also tried to puthttp://127.0.0.1:9997/rate.xml as url, where i can access it with my browser. Maybe someone has an advise? http://en.wikipedia.org/wiki/Same_origin_policy In other words: 1. deploy the XML on the same server as your GWT app 2. use a relative URL (i.e. /rate.xml or GWT.getHostPageBaseURL() +rate.xml) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT RPC with Adobe AIR 2
Yeah you are right. It looks the gwt is generating some new Function(){...} constructs, what adobe air doesnt like. Anybody has a solution to this ? I m also really interested greets 2010/7/11 Joe Cole profilercorporat...@gmail.com On Jul 11, 1:39 pm, nino ekambi jazzmatad...@googlemail.com wrote: Why dont just use the RequestBuilder and send the response back as JSON or XML ? Because you have to write some of the conversion process manually which is automated with GWT. Unless you know of a project that is a drop-in replacement for RPC with no extra code required? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Universal Document Converter
Trying building something like an information management system, and would like to have an interoperability feature for amongst various formats. So that user can have the data in the desired format. That would help reduce dependence on underlying operating system. We will be using GWT for the interface so that it can reside on the cloud. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: TabPanel - 100% height for client widget?
Hi, sorry for repeating and posting in this thread without solution, but I must say that TabLayoutPanel is useless for me if its size cannot be maximized. So I'll have to build my own TabPanel, but this is not satisfactory since a framework should prevent me from building my own versions of things that should be already available. I cannot understand why TabLayoutPanel insists on having its content area squeezed at the top... Magnus On Jul 4, 12:24 am, Magnus alpineblas...@googlemail.com wrote: Thanks! I tried with dummy panels, VerticalPanel and SimplePanel. I tried absolute and relative sizes but nothing seems to have an effect. private void init () { TabPanel pnl = new TabPanel (); pnl.setSize (100%,100%); //pnl.setHeight (100px); SimplePanel p = new SimplePanel (); p.setPixelSize (100,200); HTML txt1 = new HTML(This isa Text 1.); p.add (txt1); // txt1.setPixelSize (200,200); pnl.add (p,Home 1); HTML txt2 = new HTML(This is Text 2.); pnl.add (txt2,Home 2); } Magnus On Jul 3, 6:43 pm, aditya sanas 007aditya.b...@gmail.com wrote: I think for that you will require to set its border explicitly. that will settle this issue. you can add a dummy panel on tab home1 or home2 and set its height but here if you set height using % then it will not work you will have to set height in pixels or any other like em... i hope this will work. -- Aditya On Sat, Jul 3, 2010 at 7:09 PM, Magnus alpineblas...@googlemail.com wrote: In addition, it would set the wrong height! The height of the TabPanel (pnl) is ok, it covers 100 % of the available space. But the VerticalPanel p that I add as the client panel to one of the tab pages is not affected. Look at this screenshot: http://yfrog.com/4rtabpanelp The TabPanel (red border) is ok. But its child panel (blue border) is crunched at the top. How can I get the blue border maximized to the red border? Thanks Magnus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellTable SimplePager and and UiBinder with provided=true
That should work... I don't remember why, but I end up doing it like this: CellTableJsBean table = new CellTableJsBean(); @UiField CrudPagerJsBean pager; @UiFactory CellTableJsBean getTable() { return table; } @UiFactory CrudPagerJsBean getPager() { return new CrudPagerJsBean(table); } 2010/7/11 Geraldo Lopes geraldo...@gmail.com Hi, I have a very simple UiBinder file : g:HTMLPanel Usuários c:CellTable ui:field=grid/c:CellTable c:SimplePager ui:field=paginador/c:SimplePager /g:HTMLPanel CellTable and SimplePager needs to be instantiated using generics, and SimplePager also needs a constructor parameter, so I used @UiField(provided=true) for both at java side: @UiField(provided=true) final CellTableUsuario grid; @UiField(provided=true) final SimplePagerUsuario paginador; private ArrayListUsuario dados = new ArrayListUsuario(); private ListViewAdapterUsuario adapter = new ListViewAdapterUsuario(); public Usuarios() { inicializaDados(); grid = new CellTableUsuario(); // - adapter.addView(grid); adapter.setList(dados); paginador = new SimplePagerUsuario(grid); // - initWidget(uiBinder.createAndBindUi(this)); // -- The strange behaviour is when I run this code I get: 10:50:26.196 [ERROR] [app] c:SimplePager ui:field='paginador' missing required attribute(s): location view Element c:SimplePager ui:field='paginador' (:13) It seems that something is missing (view Element) at UiBinder side, but I'm using provided=true which means I'm in control of instantiating, and I provided the view element. More strange is that with the same UiBinder file if I mix the instantiations methods using provided for CellTable and @UiFactory for SimplePager it works. @UiField(provided=true) final CellTableUsuario grid; @UiField SimplePagerUsuario paginador; // --- not using provided anymore private ArrayListUsuario dados = new ArrayListUsuario(); private ListViewAdapterUsuario adapter = new ListViewAdapterUsuario(); public Usuarios() { inicializaDados(); grid = new CellTableUsuario(); adapter.addView(grid); adapter.setList(dados); initWidget(uiBinder.createAndBindUi(this)); } @UiFactory SimplePagerUsuario criaSimplePager() { SimplePagerUsuario p = new SimplePagerUsuario(grid); return p; } I'm using GWT 2.1M2. From what I understand from docs @UiField(provided=true) and @UiFactory are interchangeable, so I wanted to use just one way for code clarity. Can you comment on this subject. Thanks in advance and sorry my english. Geraldo Lopes -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- http://gwtupdates.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CellTable SimplePager and and UiBinder with provided=true
I just tried this: @UiField(provided=true) CellTableJsBean table = new CellTableJsBean(); @UiField CrudPagerJsBean pager; @UiFactory CrudPagerJsBean getPager() { return new CrudPagerJsBean(table); } And still working ok! 2010/7/11 Gal Dolber gal.dol...@gmail.com That should work... I don't remember why, but I end up doing it like this: CellTableJsBean table = new CellTableJsBean(); @UiField CrudPagerJsBean pager; @UiFactory CellTableJsBean getTable() { return table; } @UiFactory CrudPagerJsBean getPager() { return new CrudPagerJsBean(table); } 2010/7/11 Geraldo Lopes geraldo...@gmail.com Hi, I have a very simple UiBinder file : g:HTMLPanel Usuários c:CellTable ui:field=grid/c:CellTable c:SimplePager ui:field=paginador/c:SimplePager /g:HTMLPanel CellTable and SimplePager needs to be instantiated using generics, and SimplePager also needs a constructor parameter, so I used @UiField(provided=true) for both at java side: @UiField(provided=true) final CellTableUsuario grid; @UiField(provided=true) final SimplePagerUsuario paginador; private ArrayListUsuario dados = new ArrayListUsuario(); private ListViewAdapterUsuario adapter = new ListViewAdapterUsuario(); public Usuarios() { inicializaDados(); grid = new CellTableUsuario(); // - adapter.addView(grid); adapter.setList(dados); paginador = new SimplePagerUsuario(grid); // - initWidget(uiBinder.createAndBindUi(this)); // -- The strange behaviour is when I run this code I get: 10:50:26.196 [ERROR] [app] c:SimplePager ui:field='paginador' missing required attribute(s): location view Element c:SimplePager ui:field='paginador' (:13) It seems that something is missing (view Element) at UiBinder side, but I'm using provided=true which means I'm in control of instantiating, and I provided the view element. More strange is that with the same UiBinder file if I mix the instantiations methods using provided for CellTable and @UiFactory for SimplePager it works. @UiField(provided=true) final CellTableUsuario grid; @UiField SimplePagerUsuario paginador; // --- not using provided anymore private ArrayListUsuario dados = new ArrayListUsuario(); private ListViewAdapterUsuario adapter = new ListViewAdapterUsuario(); public Usuarios() { inicializaDados(); grid = new CellTableUsuario(); adapter.addView(grid); adapter.setList(dados); initWidget(uiBinder.createAndBindUi(this)); } @UiFactory SimplePagerUsuario criaSimplePager() { SimplePagerUsuario p = new SimplePagerUsuario(grid); return p; } I'm using GWT 2.1M2. From what I understand from docs @UiField(provided=true) and @UiFactory are interchangeable, so I wanted to use just one way for code clarity. Can you comment on this subject. Thanks in advance and sorry my english. Geraldo Lopes -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- http://gwtupdates.blogspot.com/ -- http://gwtupdates.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
MVP Question.
Hi, i'm trying to make a view like the following that i paste. But i need to add click handlers to the links in the presenter. How could i do. I was looking the method getClickedCell in the mvp presentation but the problem is that my links are inside a FlowPanel that is inside a Vertical that is inside a Cell. What i need to do is to fire an event when the links are clicked, for example, when i press in the View link i need to populate the pnlCategoryImages with the result of my rpc. The only thing that i figure to do is to call the event bus from the view itself, but it doesn't look so pretty. Anyone have some ideas? This is part of my code in the setData() method. for(Category category: categories){ int tblCategoriesNumRow = tblCategories.getRowCount(); VerticalPanel pnlCategory = new VerticalPanel(); Hyperlink lnkAdd = new Hyperlink(Add, ); Hyperlink lnkRemove = new Hyperlink(Remove, ); Hyperlink lnkView = new Hyperlink(View, ); FlowPanel pnlCategoryButtons = new FlowPanel(); pnlCategoryButtons.add(lnkAdd); pnlCategoryButtons.add(lnkRemove); pnlCategoryButtons.add(lnkView); pnlCategory.add(pnlCategoryButtons); tblCategories.setWidget(tblCategoriesNumRow, 0, chkCategory); tblCategories.setWidget(tblCategoriesNumRow, 1, pnlCategory); tblCategoriesNumRow = tblCategories.getRowCount(); ScrollPanel pnlCategoryImages = new ScrollPanel(); tblCategories.setWidget(tblCategoriesNumRow, 0, pnlCategoryImages); } ... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: MVP Question.
try something like this from the presenter: view.setHandler(ViewHandler handler); interface ViewHandler { void onView(Category c); void onRemove(Category c); } whatever any one say to you, DO NOT USE GETTERS ON THE VIEW INTERFACE :) 2010/7/11 nacho vela.igna...@gmail.com Hi, i'm trying to make a view like the following that i paste. But i need to add click handlers to the links in the presenter. How could i do. I was looking the method getClickedCell in the mvp presentation but the problem is that my links are inside a FlowPanel that is inside a Vertical that is inside a Cell. What i need to do is to fire an event when the links are clicked, for example, when i press in the View link i need to populate the pnlCategoryImages with the result of my rpc. The only thing that i figure to do is to call the event bus from the view itself, but it doesn't look so pretty. Anyone have some ideas? This is part of my code in the setData() method. for(Category category: categories){ int tblCategoriesNumRow = tblCategories.getRowCount(); VerticalPanel pnlCategory = new VerticalPanel(); Hyperlink lnkAdd = new Hyperlink(Add, ); Hyperlink lnkRemove = new Hyperlink(Remove, ); Hyperlink lnkView = new Hyperlink(View, ); FlowPanel pnlCategoryButtons = new FlowPanel(); pnlCategoryButtons.add(lnkAdd); pnlCategoryButtons.add(lnkRemove); pnlCategoryButtons.add(lnkView); pnlCategory.add(pnlCategoryButtons); tblCategories.setWidget(tblCategoriesNumRow, 0, chkCategory); tblCategories.setWidget(tblCategoriesNumRow, 1, pnlCategory); tblCategoriesNumRow = tblCategories.getRowCount(); ScrollPanel pnlCategoryImages = new ScrollPanel(); tblCategories.setWidget(tblCategoriesNumRow, 0, pnlCategoryImages); } ... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- http://gwtupdates.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: MVP Question.
I think that from that handler i should call the eventBus in the onView and onRemove methods, right? But how do i connect every link to that handler? Should i put a onClickHandler on every lnk that i create in the view that calls those methods? Sorry if i am saying stupid things, i' am newby to mvp model :) On 11 jul, 16:15, Gal Dolber gal.dol...@gmail.com wrote: try something like this from the presenter: view.setHandler(ViewHandler handler); interface ViewHandler { void onView(Category c); void onRemove(Category c); } whatever any one say to you, DO NOT USE GETTERS ON THE VIEW INTERFACE :) 2010/7/11 nacho vela.igna...@gmail.com Hi, i'm trying to make a view like the following that i paste. But i need to add click handlers to the links in the presenter. How could i do. I was looking the method getClickedCell in the mvp presentation but the problem is that my links are inside a FlowPanel that is inside a Vertical that is inside a Cell. What i need to do is to fire an event when the links are clicked, for example, when i press in the View link i need to populate the pnlCategoryImages with the result of my rpc. The only thing that i figure to do is to call the event bus from the view itself, but it doesn't look so pretty. Anyone have some ideas? This is part of my code in the setData() method. for(Category category: categories){ int tblCategoriesNumRow = tblCategories.getRowCount(); VerticalPanel pnlCategory = new VerticalPanel(); Hyperlink lnkAdd = new Hyperlink(Add, ); Hyperlink lnkRemove = new Hyperlink(Remove, ); Hyperlink lnkView = new Hyperlink(View, ); FlowPanel pnlCategoryButtons = new FlowPanel(); pnlCategoryButtons.add(lnkAdd); pnlCategoryButtons.add(lnkRemove); pnlCategoryButtons.add(lnkView); pnlCategory.add(pnlCategoryButtons); tblCategories.setWidget(tblCategoriesNumRow, 0, chkCategory); tblCategories.setWidget(tblCategoriesNumRow, 1, pnlCategory); tblCategoriesNumRow = tblCategories.getRowCount(); ScrollPanel pnlCategoryImages = new ScrollPanel(); tblCategories.setWidget(tblCategoriesNumRow, 0, pnlCategoryImages); } ... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. --http://gwtupdates.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: MVP Question.
There no right or wrong way to implement MVP, its just a pattern and you can implement it as you like. The only points I think are important are: - (As I already said) The view interface shouldn't have getters. This makes mocking easy peasy. - Do not handle Widgets on the presenter (any widget code makes your presenter no longer testeable). This means that the methods on the ViewHandlers shouldn't have widget type parameters - Do not abuse of Event bus, at least I try no to do it.. in general if you need to notice one presenter only of an event find the way to get a reference to it. Try to use eventbus only when you need more than one presenters to handle that event. Just implement that handlers in the presenter. class YourPresenter implements YourViewHandler { void onView(Category c) { //HERE YOUR CODE } void onRemove(Category c) { //HERE YOUR CODE } // In the constructor: view.setHandlers(this); } And in the view add a click handler to each hyperlink and trigger the viewhandler method In the view you are right, you just add a click handler to each Hyperlink and trigger the method of the handler. 2010/7/11 nacho vela.igna...@gmail.com I think that from that handler i should call the eventBus in the onView and onRemove methods, right? But how do i connect every link to that handler? Should i put a onClickHandler on every lnk that i create in the view that calls those methods? Sorry if i am saying stupid things, i' am newby to mvp model :) On 11 jul, 16:15, Gal Dolber gal.dol...@gmail.com wrote: try something like this from the presenter: view.setHandler(ViewHandler handler); interface ViewHandler { void onView(Category c); void onRemove(Category c); } whatever any one say to you, DO NOT USE GETTERS ON THE VIEW INTERFACE :) 2010/7/11 nacho vela.igna...@gmail.com Hi, i'm trying to make a view like the following that i paste. But i need to add click handlers to the links in the presenter. How could i do. I was looking the method getClickedCell in the mvp presentation but the problem is that my links are inside a FlowPanel that is inside a Vertical that is inside a Cell. What i need to do is to fire an event when the links are clicked, for example, when i press in the View link i need to populate the pnlCategoryImages with the result of my rpc. The only thing that i figure to do is to call the event bus from the view itself, but it doesn't look so pretty. Anyone have some ideas? This is part of my code in the setData() method. for(Category category: categories){ int tblCategoriesNumRow = tblCategories.getRowCount(); VerticalPanel pnlCategory = new VerticalPanel(); Hyperlink lnkAdd = new Hyperlink(Add, ); Hyperlink lnkRemove = new Hyperlink(Remove, ); Hyperlink lnkView = new Hyperlink(View, ); FlowPanel pnlCategoryButtons = new FlowPanel(); pnlCategoryButtons.add(lnkAdd); pnlCategoryButtons.add(lnkRemove); pnlCategoryButtons.add(lnkView); pnlCategory.add(pnlCategoryButtons); tblCategories.setWidget(tblCategoriesNumRow, 0, chkCategory); tblCategories.setWidget(tblCategoriesNumRow, 1, pnlCategory); tblCategoriesNumRow = tblCategories.getRowCount(); ScrollPanel pnlCategoryImages = new ScrollPanel(); tblCategories.setWidget(tblCategoriesNumRow, 0, pnlCategoryImages); } ... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. --http://gwtupdates.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- http://gwtupdates.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to
Google Web Toolkit Lagging
Since somewhere last week, whenever I try and run a application I build in debug mode, the application is heavy lagging. This is the case in any browser that I use, and was not the case until a few days ago. Over the past few days there have been no major changes to the source code of the application. On top of that, if I compile the application and deploy on Apache Tomcat the speed of the application is back to normal. Has anyone else experienced this problem? Is it due to some GWT update? Anyone who has encountered it managed to fix it? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Eclipse - Google Addons are gone after update
Hi, I just upgraded my GWT plugin in Eclipse 3.5 and I encounter the following: The upgrade succeeds, but after restarting Eclipse all the GWT menu items are gone, e. g. Run As... does not offer Google Web Application anymore. I already saw this earlier and I always had to completely reinstall eclipse in order to get the GWT specific menu items again. Can you help? Thank you Magnus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.