When Migrating JsInterop from GWT-Exporter to @JsInterface, JSORestrictionsChecker throws NullPointerException

2014-06-06 Thread 田传武
Hello, I tried converted two projects we are currently using GWT Exporter to @JsInterface for interoperate with JS. The *first project* https://github.com/goodow/realtime-channel/commit/e809e7cf9ee81fb4f470336212abfe113550ac8d only exports three interfaces, and translated successfully. The

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Thomas Broyer
On Friday, June 6, 2014 6:16:23 AM UTC+2, Tom wrote: we need a lot of parameter for our gwt app for handling the history, if the url length is limited then the GWT history function also got limited, Be careful not to confuse state and history: if you have that many parameters, I suppose

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Tom
Sorry i did not state my app clearly, but generally it likes this: let imagine this app, u have a page that have lot of checkboxes users may click 5,10 or more checkboxes randomly, last time when user visit the page they should be able to see exactly the number checkboxed that was checked in

Send a arraylist of objects through rpc

2014-06-06 Thread 'Leung' via Google Web Toolkit
Hi If I want to send an arraylist of objects through rpc, what will be the best way to do it? I would like to put the rpc call in a loop, but how can I make the rpc call synchronized each other? That means send the rpc request one after one, and I dont want to build a messy rpc nest. Or,

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Tom
Other solution is encoding. Can we build an encoding system that can encode 121212_465465_5456456_321513_21231_5341313..long list of number... into a very short number like HUFG545? then we just build the encoding system at the client the system just take the encoded param from url decode

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Jens
let imagine this app, u have a page that have lot of checkboxes users may click 5,10 or more checkboxes randomly, last time when user visit the page they should be able to see exactly the number checkboxed that was checked in the exact locations that they did last time. For example,

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Tom
the checkbox info is not too important to a level that I need to store them into DB. For example, 3 checkboxes were checked to show the last revenues in 3 years... If the check boxes were not checked then user can still figure out can check by themselves. But if the url can tell exactly which

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread David
It looks to me that you need to store this as a preference in the database for that particular screen instead of jamming it in the URL. You could put it in a cookie if you don't want to put it in the database. If you update the URL for every click or string the user enters the browser history is

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Jens
the checkbox info is not too important to a level that I need to store them into DB. For example, 3 checkboxes were checked to show the last revenues in 3 years... IMHO then I would try to encode last revenues in 3 years and not the state of all checkboxes. In general I tend avoid

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Jens
If you update the URL for every click or string the user enters the browser history is going to be flooded with a lot of items. This basically makes the browser back/forward useless. I certainly hate websites who do this. I try to limit history changes only when the user does actions that

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Vassilis Virvilis
Unless you manage to implement undo/redo as back/forward which is very cool IMO. On Fri, Jun 6, 2014 at 1:28 PM, Jens jens.nehlme...@gmail.com wrote: If you update the URL for every click or string the user enters the browser history is going to be flooded with a lot of items. This basically

Why br tag was not parsed inside custom HTMLColumn in GWT?

2014-06-06 Thread Tom
Ok, I have a HTML column which should parse any textcell that contain html tag into HTML value: public class HTMLColumn extends ColumnListString, String{ public HTMLColumn(){ super(new ClickableTextCell(){ public void render(Context context,

Re: Why br tag was not parsed inside custom HTMLColumn in GWT?

2014-06-06 Thread Lothar Kimmeringer
Am 06.06.2014 13:01, schrieb Tom: ok, when testing with the text contain |carbrbike|, i can see the whole text got bold so |sb.appendHtmlConstant| seem to be ok, but it did not make the |bike| to be in new line. It rendered the text like this: bold |carbrbike|. That mean |br| was not

Re: Why br tag was not parsed inside custom HTMLColumn in GWT?

2014-06-06 Thread Jens
SafeHtml.asString() escapes HTML entities to secure you from XSS attacks, thats the point of using it. In your example, if your br should not be escaped you must create a SafeHtml instance using SafeHtmlBuilder b = .. b.appendEscaped(car); b.appendHtmlConstant(br); b.appendEscaped(bike); OR

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Jens
Unless you manage to implement undo/redo as back/forward which is very cool IMO. Which would mean users of your app now have one feature less: Navigating through your app via back/forward like on any other website. Thus your app is now the exception to everything on the web which totally

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Vassilis Virvilis
I can see from where you are coming and there is truth in what you say. Now consider applications (as opposed to pages) with very rich state of undo/redo like a content creation app (i.e. editor). It is entirely possible for the user to hit the back button (looking for undo) and the result will

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread Jens
Now consider applications (as opposed to pages) with very rich state of undo/redo like a content creation app (i.e. editor). Then the content creation/edit tool should have undo/redo controls. Because thats where they belong to. It is entirely possible for the user to hit the back

Re: Why br tag was not parsed inside custom HTMLColumn in GWT?

2014-06-06 Thread Tom
Thax you Jens, it's fase data only vip can input html On Friday, June 6, 2014 9:15:14 PM UTC+10, Jens wrote: SafeHtml.asString() escapes HTML entities to secure you from XSS attacks, thats the point of using it. In your example, if your br should not be escaped you must create a SafeHtml

Re: Send a arraylist of objects through rpc

2014-06-06 Thread Paul Robinson
Unless each rpc call sends a large amount of data, chaining the rpc calls in the way you suggest will be much slower than sending a single ArrayList. It will also be more complicated code. So in general, you should send an ArrayList in a single rpc call. You'd have to have a good reason to do it

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

2014-06-06 Thread jhulford
On Friday, June 6, 2014 5:19:26 AM UTC-5, stuckagain wrote: It looks to me that you need to store this as a preference in the database for that particular screen instead of jamming it in the URL. You could put it in a cookie if you don't want to put it in the database. I'm assuming that

Re: Debugging in production mode

2014-06-06 Thread Grace Yeung
I tried SuperDevMode and I can access URL: http://localhost:9876/ But I am geting this: Can't find any GWT Modules on this page. I already updated my .gwt.xml with the following add-linker name=*xsiframe* / set-configuration-property name=*devModeRedirectEnabled* value=*true*/ !-- enable

Re: GWT 2.4 timezone issue

2014-06-06 Thread Andrei
Date object does not have a time zone information. You see a time zone when you print/display the date object, and the machine is using its own time zone by default. I save all dates in the datastore as Long values: date.getTime(). When I need to display a date in a browser, I pass the GWT

Re: When Migrating JsInterop from GWT-Exporter to @JsInterface, JSORestrictionsChecker throws NullPointerException

2014-06-06 Thread 'Ray Cromwell' via Google Web Toolkit
JsInterop is only half implemented and not for use right now. There are several big patches that are going to land soon which change a lot about it. I would hold off using it until then. On Fri, Jun 6, 2014 at 1:24 AM, 田传武 i...@goodow.com wrote: Hello, I tried converted two projects we are

Re: Debugging in production mode

2014-06-06 Thread Thomas Broyer
On Friday, June 6, 2014 4:47:44 PM UTC+2, Grace Yeung wrote: I tried SuperDevMode and I can access URL: http://localhost:9876/ But I am geting this: Can't find any GWT Modules on this page. Are you clicking the Dev Mode On button on that page? Carefully read what's written: put those

Re: Debugging in production mode

2014-06-06 Thread Grace Yeung
I did put those links in my bookmarks (called favorites in IE), and click them when you're on your application in prod mode. The main reason why I am trying to use Super Dev Mode is for debugging my code. I have two modules: one is working fine with both dev and production mode. I want to

Re: Making browser save userneme password

2014-06-06 Thread Blake McBride
Thanks for you input. I did see those posts, and to the best of my ability, I tried to do what some of them said. The exact code I tried is in my first email. That code was taken from the net. Is that code far off? Without the line: fLoginForm.getElement().setAttribute(onsubmit,

Re: Debugging in production mode

2014-06-06 Thread Grace Yeung
I read what's written again. Do I actually need to have bookmarklets for my browser? In fact, I think the browser (IE) I am using at work doesn't support it. For security reason, we are not even able to download sofftware at work, including GWT... Anyway, can I still use super dev mode if I

Re: Debugging in production mode

2014-06-06 Thread Grace Yeung
https://lh6.googleusercontent.com/-oXOpNT5YYGQ/U5IiNWx6XqI/ABk/tZeG3EnXQZo/s1600/Capture.JPG I actually put those links in my bookmarks already ... On Friday, June 6, 2014 12:05:45 PM UTC-4, Thomas Broyer wrote: On Friday, June 6, 2014 4:47:44 PM UTC+2, Grace Yeung wrote: I

Re: Preview Image before file upload in Gwt

2014-06-06 Thread Thad Humphries
None that I can think of. Basic rule of thumb--if it cannot be done in a standards compliant browser with HTML and JavaScript, it cannot be done in GWT. On Thursday, June 5, 2014 4:22:36 AM UTC-4, Piyush Srivastava wrote: Is thier any way in GWT to preview an image on cli*ent side and g*et

Re: Making browser save userneme password

2014-06-06 Thread Thad Humphries
Can you use HTML5? If so, then why not use com.google.gwt.storage.client.Storage? For example in my newer apps, if the login is successful and a checkbox is set, the app remembers the target server and username: // set/clear local storage final Storage storage =

Re: Making browser save userneme password

2014-06-06 Thread Blake McBride
Thanks a lot for your input! I thought about doing it this way, and I like it a lot for all the reasons you state. This would be the best and easiest approach. My only problem with it was that I fear security. I really don't understand cookies and local storage well. I could encrypt the

[gwt-contrib] When Migrating JsInterop from GWT-Exporter to @JsInterface, JSORestrictionsChecker throws NullPointerException

2014-06-06 Thread 田传武
Hello, I tried converted two projects we are currently using GWT Exporter to @JsInterface for interoperate with JS. The *first project* https://github.com/goodow/realtime-channel/commit/e809e7cf9ee81fb4f470336212abfe113550ac8d only exports three interfaces, and translated successfully. The

[gwt-contrib] Re: Questions about initial contributor configuration - build errors in Eclipse

2014-06-06 Thread Jens
*Actually, I was just able to fix it* *by changing the Project-Properties-Java Compiler-AnnotationProcessor-Factory Path to GWT_ROOT/build/lib/requestfactory-apt.jar.* You actually always need to do that because requestfactory-apt.jar in GWT_TOOLS is outdated. Thomas has a pending patch

[gwt-contrib] Re: When Migrating JsInterop from GWT-Exporter to @JsInterface, JSORestrictionsChecker throws NullPointerException

2014-06-06 Thread 'Ray Cromwell' via GWT Contributors
JsInterop is only half implemented and not for use right now. There are several big patches that are going to land soon which change a lot about it. I would hold off using it until then. On Fri, Jun 6, 2014 at 1:24 AM, 田传武 i...@goodow.com wrote: Hello, I tried converted two projects we are