Re: GWT Module not loaded on app engine

2010-04-24 Thread Vik
plz someone advise on this...

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


On Fri, Apr 23, 2010 at 7:05 PM, Vik  wrote:

> Hie
>
> Any one on this please? ?Its a blocking issue for us.
>
>
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> www.sakshum.blogspot.com
>
>
> On Thu, Apr 22, 2010 at 2:59 PM, Vik  wrote:
>
>> Hie
>>
>> Yes I know i dont need it when deploying to demoApp. The problem is my
>> page is not rendering when i deploy the app to appengine.
>>
>> Thankx and Regards
>>
>> Vik
>> Founder
>> www.sakshum.com
>> www.sakshum.blogspot.com
>>
>>
>> On Thu, Apr 22, 2010 at 1:29 PM, branflake2267 
>> wrote:
>>
>>>
>>> If this is what the debugger starts as:
>>> http://127.0.0.1:/DemoJSNI.html?gwt.codesvr=127.0.0.1:9997
>>> then
>>> http://127.0.0.1:/MyPage.jsp is the location of it. you don't need
>>> the gwt.cod... to get it to run.
>>>
>>> You can change the start page in web.xml
>>>
>>> Hope that helps, Brandon
>>>
>>> On Apr 21, 9:32 pm, Vik  wrote:
>>> > Hie
>>> >
>>> > In my app i have two modules.
>>> >
>>> > Module one shows a login popup and module 2 shows a admindashboard
>>> build
>>> > using GWT and embedded into AdminDashBoard.jsp using div.
>>> >
>>> > After sucessful login it navigates to module to
>>> > using: Window.Location.replace("/ui/page/AdminDashBoard.jsp");
>>> >
>>> > When i run it from eclipse obviously it loads a blank page and on
>>> appending
>>> >  ?gwt.codesvr=127.0.0.1:9997 and reloading url gives me the gwt built
>>> page.
>>> >
>>> > But on hosted mode this is not happening. I dont see any error in admin
>>> > logs. I just see a blank page after login .
>>> >
>>> > Any advise please
>>> >
>>> > Thankx and Regards
>>> >
>>> > Vik
>>> > Founderwww.sakshum.comwww.sakshum.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 athttp://
>>> 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-toolkit@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.
>>>
>>>
>>
>

-- 
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: Adding custom code before making RPC calls to server,,,,

2010-04-24 Thread mmoossen
hi samurai!

check out this thread:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/beea0609e288fa56/6b304eb69b5c92ee

HTH
Michael

On Apr 24, 9:09 pm, keyboard_samurai  wrote:
> Hi ,
>
> I need to know if there is a way we can inject in a piece of code when
> the RPC call is made to server. Basically in a typical example call
> using RPC would have something like RemoteService.getData(String
> param, AsyncCallback callback). Here on call to getData i would like
> to transparently add in a piece of code which gets called whenever
> call is being made to server via RPC. I understand the AsyncCall code
> is being written by GWT during compile time. Is there a way we can
> modify to get a custom code in ???
>
> Let me Know ... Hope my problem statement was clear
>
> Thanks !
>
> --
> 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 
> athttp://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: TabBar

2010-04-24 Thread kozura
If you're looking to use a normal tab pane where the tab bar is
directly above the content, then it's much easier to just use TabPanel
directly, which combines the tab bar and content switching logic.  If
you really are doing a tab bar separate from the content, you might
still look at the TabPanel code to see how it is implemented.

On Apr 24, 1:08 pm, İNGİLTERE EMRE BEY 
wrote:
> hi,
>
> I am new to GWT, basically i am triying to do using dockpanel and tab
> bar to load page in dockpanel center page,
>
> example of my code blow
>
> TabBar bar = new TabBar();
>                  bar.addTab("Books");
>                  bar.addTab("Home");
>
>                  bar.addSelectionHandler(new SelectionHandler(){
>
>                         @Override
>                         public void onSelection(SelectionEvent 
> event) {
>                                 // TODO Auto-generated method stub
>                                 if(event.getSelectedItem()==0) pan.add(new 
> Page1(),
> DockPanel.CENTER);
>                                 if(event.getSelectedItem()==1) pan.add(new 
> Page2(),
> DockPanel.CENTER);
>                         }
>
> can you please suggest better way of doing this or how to i manage to
> run this one
>
> thanks
>
> --
> 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 
> athttp://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: (OT somewhat) tab order on mac

2010-04-24 Thread Thomas Broyer


On Apr 24, 10:47 pm, Larry White  wrote:
> I use a mac and (of course) can't get tabbing to work "right" with GWT forms
> because I haven't changed my System properties to tell it to NOT skip over
> radio buttons, standard buttons, etc. My question is that the SmartGWT
> actually tabs correctly (IMHO) on the mac _without_ any system preference
> changes.  Does anybody know how that could be done with the standard GWT
> widget set? Setting tabIndex() doesn't work.

AFAICT, from their showcase, SmartGWT uses "custom" checkboxes and
buttons, which are not true checkboxes and buttons (the checkbox is an
image, and there's a hidden textarea to handle focusability; and the
button is done using a table).
You could do the same in "standard GWT widget set" using a PushButton
(button), ToggleButton (checkbox) and/or CustomButton (custom "faces"
which could look like a checkbox if you like).

-- 
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.



Tab Bar

2010-04-24 Thread İNGİLTERE EMRE BEY
hi every1,

Can anyone give me example how to implement Tab bar and event
handling.

Thanks

-- 
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.



(OT somewhat) tab order on mac

2010-04-24 Thread Larry White
I use a mac and (of course) can't get tabbing to work "right" with GWT forms
because I haven't changed my System properties to tell it to NOT skip over
radio buttons, standard buttons, etc. My question is that the SmartGWT
actually tabs correctly (IMHO) on the mac _without_ any system preference
changes.  Does anybody know how that could be done with the standard GWT
widget set? Setting tabIndex() doesn't work.

thanks much

-- 
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.



Adding custom code before making RPC calls to server,,,,

2010-04-24 Thread keyboard_samurai
Hi ,

I need to know if there is a way we can inject in a piece of code when
the RPC call is made to server. Basically in a typical example call
using RPC would have something like RemoteService.getData(String
param, AsyncCallback callback). Here on call to getData i would like
to transparently add in a piece of code which gets called whenever
call is being made to server via RPC. I understand the AsyncCall code
is being written by GWT during compile time. Is there a way we can
modify to get a custom code in ???

Let me Know ... Hope my problem statement was clear

Thanks !

-- 
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.



TabBar

2010-04-24 Thread İNGİLTERE EMRE BEY
hi,

I am new to GWT, basically i am triying to do using dockpanel and tab
bar to load page in dockpanel center page,

example of my code blow

TabBar bar = new TabBar();
 bar.addTab("Books");
 bar.addTab("Home");

 bar.addSelectionHandler(new SelectionHandler(){

@Override
public void onSelection(SelectionEvent event) {
// TODO Auto-generated method stub
if(event.getSelectedItem()==0) pan.add(new 
Page1(),
DockPanel.CENTER);
if(event.getSelectedItem()==1) pan.add(new 
Page2(),
DockPanel.CENTER);
}

can you please suggest better way of doing this or how to i manage to
run this one

thanks

-- 
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: Reading from properties file

2010-04-24 Thread mmoossen
you could also put a json object representing the properties file on
the host page while generating it (for instance, using jsp) and then
use Dictionary or JavaScriptObject to access it.

HTH
Michael

On Apr 24, 6:14 pm, Stefan Bachert  wrote:
> Hi,
>
> when this properties file is valid at compile time, the you can use
> DataResource/ClientBundle, too.
>
> when this properties file will change after compile time, you may
> create an GWT-RPC requesting it from client side.
>
> Stefan Bacherthttp://gwtworld.de
>
> On 23 Apr., 10:56, pragupt  wrote:
>
> > Hi,
> > I am new to GWT and dont know how to read a properties file located in
> > a server side location.
> > please can you suggest some ways to do this
>
> > --
> > 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 
> > athttp://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 
> athttp://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: RPC Obfuscation

2010-04-24 Thread mmoossen
good hint Thomas, i did now about that.
i will try it now.

thanks
Michael

On Apr 24, 11:28 am, Thomas Broyer  wrote:
> On Apr 24, 10:02 am, mmoossen  wrote:
>
>
>
> > > Well, I don't have an answer for your question, but why don't you
> > > use SSL?
>
> > it is not about security, it is just about hiding a bit the
> > implementation details.
> > base64 encoding would be more than enough for me.
>
> > > ..., but wait, unless i could explicetely call the
> > > serialization/deserialization methods from gwt... mmm.. interesting...
> > > i will try it now...
>
> > to no avail, i would need to call the generated Serializer for the RPC
> > service, and i have no idea how could i achieve that :(
> > and anyhow it would be better to directly manipulate the payload so
> > method signature can stay as it is.
>
> > > but how do i implement
> > > the client side counterpart of
> > > RemoteServiceServlet#onBeforeRequestDeserialized??
>
> > is there really no client-side counterpart for this? i mean what is
> > the sense of manipulating the serialized payload on the server-side if
> > there is no way to do it revert your manipulation on the client?
>
> You can provide your own RpcRequestBuilder and use it to wrap the
> RequestCallback so you can manipulate the response.getText() before
> delegating to the wrapped RPC callback.
>
> --
> 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 
> athttp://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.



Hosted mode debugging after navigating to a different path in your web app?

2010-04-24 Thread markww
Hi,

When we're running our apps in hosted mode, we get a url to run like:

http://localhost:/projectname.jsp?gwt.codesvr=192.168.1.2:9997

in my app, I have some links which will send the user to another page
on my site, something like:

http://localhost:/about

once this happens though, the debugging connection is lost. I'm
actually serving the same app at:

http://localhost:

 and

http://localhost:/about

my app just checks the url path and creates the correct panels
accordingly. But is there a way to reestablish the debugging
connection after navigating away from the original url?

Thanks

-- 
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: Performing logout on single tab close in multitab browsers

2010-04-24 Thread Stefan Bachert
Hi,

Your requirements are far from what browser could allow (due to
security issues and http).
No browser will allow you to control or even know about other opened
pages.

None of the "problems" is an GWT issue. GWT could do everything what
browsers and http do allow.

When your requirements are mandatory for you, you need to build a
native application (without having the advantages of a browser based
application)
Or you accept the limitations (because of possible abuse)

Stefan Bachert
http://gwtworld.de

On 22 Apr., 06:01, Pankhuri  wrote:
> Hi All,
>
> I am developing an application in which no content can be seen without
> successful login.
> The session is maintained on client side via session cookie. I do not
> have any external hyperlinks in my application.
>
> 1. I want to logout when user navigates to some other site through
> browser back button or by manually typing the url or bookmark manager
> etc
>
> 2. I do not want to logout on refresh
>
> 3. I want to logout when the single tab containing my application is
> closed without performing logout.
>
> 4. I do not want to logout when a single tab is closed in multitab
> browser if the application is open in some other tab as well
>
> What is the common place where i can look for solutions to all these
> problems? Which classes will provide me the chance to detect these
> events individually?
>
> windowClosingHandler : it doesn't allow me to choose different
> behaviour for back button and refresh button
> History.valueChangeHandler : doesn't detect closing of tab
>
> Thanks
>
> --
> 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 
> athttp://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: new GWT MVP article (part 2)

2010-04-24 Thread Chris Ramsdale
On Thu, Apr 22, 2010 at 3:27 AM, interdev  wrote:

> Hello everyone,
> have you seen the new MVP Architecture article from google ?
> http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
>
> they have changed the structure slightly, instead of having a View and
> a Presenter which has an inner Interface (Display), aside from the
> UiBinder part, they now have a View interface which has an inner
> Presenter interface !
>
> 1- what do you all think ? are these yet another level of abstraction/
> indirection necessary ?
>

It's not necessary, but it's something we've learned from the Wave team, and
internally find more flexible and easy to test. There are many ways to wire
up your views and presenters, and the technique that you use is largely
driven by the application that you are developing. For example, while Ad
Words and Wave extensively use the MVP pattern, the Ad Words architecture is
more inline with the techniques discussed in part I, and Wave with part II.
That said, the one characteristic that they both share is the need to test
as much as they possible can with vanilla JRE tests. Nothing against
GwtTestCase, but we all know it's slow.


> 2- when google wants to address problem of Nested/Layered presenters ?
> header/body/footer, and body having its own dockpanellayout structure.
>

We use the technique described in part II. Composite views are responsible
for instantiating their own children, and making them available for the
parallel composite presenters.


>
> 3- what do you think of "presenter.go(container)" ? and navigation/
> history token inside multiple IF statements ?
>
> i think these are more serious to address than introducing an
> additional view interface which has an inner interface !


> 4- what do you think of DTO solution presented in the article, is it
> scalable ? do you follow it or stick with your twig, gilead
> framework ?
>

If you're referring to the ColumnDefinitions, we know they'll scale. One, it
requires minimal widget overhead and is fast. No more embedding hundreds of
widgets within a table. Two, it's extensible, and testable. As your model
grows, your ColumnDefinitions grow, not your views.  ColumnDefinitions are
quite trivial, the bulk of the code dedicated to generating HTML, and don't
require a GwtTestCase.


>
> --
> 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.
>
>

-- 
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: Reading from properties file

2010-04-24 Thread Stefan Bachert
Hi,

when this properties file is valid at compile time, the you can use
DataResource/ClientBundle, too.

when this properties file will change after compile time, you may
create an GWT-RPC requesting it from client side.

Stefan Bachert
http://gwtworld.de

On 23 Apr., 10:56, pragupt  wrote:
> Hi,
> I am new to GWT and dont know how to read a properties file located in
> a server side location.
> please can you suggest some ways to do this
>
> --
> 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 
> athttp://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: new GWT MVP article (part 2)

2010-04-24 Thread Stephen Haberman

> I like the model-view-presenter architecture. However I am not at all
> sold on mocking out the view and testing just the presenter. The
> problems is that you are not testing 3 of the potentially most error
> prone parts of the system: 1) The browser and DOM, 2) The GWT widget
> library and 3) the GWT java to javascript conversion.

True, you need to test these integration tests. But I also agree with
Thomas, having extremely quick presenter-only tests is worthwhile.

You have to grow in to it though; at first I did not trust any of GWT,
nor my usage of GWT, because I was new to it and it'll all fairly
magical. So I had no idea, presenter-only tests or not, what
presenters were actually going to do when the real view was hooked up.

But after I'd worked with the app/GWT/etc. for awhile, I realized that
its very unlikely that GWT would suddenly stop working while I tweaked
some presenter business logic. At which point I started having faith
in presenter-only tests.

Not blind faith, of course, because I still have some browser-based
integration tests, but enough faith to use presenter-only tests for my
primary red/green TDD cycle.

- Stephen

-- 
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: IsTextBox/widget-specific interfaces

2010-04-24 Thread Stephen Haberman

> You wouldn't have a MyView.fooAnchor() getter but a
> MyView.setFooAnchorTarget(String) setter.

Yes, I understand that is how you're supposed to do things now. I'm
saying its annoying to re-type so much boilerplate presenter <->
widget abstraction code into every view in an app.

With IsXxx interfaces on widgets, the abstraction is inherent and
presenters can directly manipulate IsXxx widgets even while in junit
tests. UiBinder-driven views become so boilerplate (because all they
have to do is expose each @UiField as its corresponding IsXxx
interface) that I can generate the entire thing.

- Stephen

-- 
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: Does GWT provide support for themes ?

2010-04-24 Thread Stefan Bachert
Hi,

It depends what you understand under theming support.

You can select one of three standard themes within the module.xml.
And you can create your own if you like.

When you want to exchange the css (at runtime), you already have the
sample downloaded in GWT 2.0.3.
It is called "Showcase".

To make a decision between JSF/RF and GWT depend on theming support
sounds somewhat irrational.
It is like to choose between car or boat because of the color of the
vehicle.

By the way, JSF/RF is not officially supported by Google, and RF is an
implementation of JSF.

Stefan Bachert
http://gwtworld.de

On 23 Apr., 03:17, Shahzeb Khan  wrote:
> Does GWT provide support for themes like whe JSF or rich faces ?
>
> We are evaluating GWT for using it as the presentation layer over
> JSF . Other option we have is Richfaces .
>
> So far we love GWT but support for themes will be the deal breaker or
> maker . I have noticed some third party gwt support sites provide it
> but we would not be using any thing else not officically coming from
> google .
>
> Thanks 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 
> athttp://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: prefix styles in CssResource?

2010-04-24 Thread Ed Bras
Hi Stefan,

Yep, it makes more sence.
I am playing with it as we speak.
At the moment I don't really understand how to include an existing component
with his own styles.
Suppose I have a datePicker that has his own set of styles...
I think I need to define a DatePickerClientBundle, DatePickerCssResource and
datepicker.css for it ? Or not.
That's what I am playing with now, but not working yet.. (bunch of
errors)...

But then I want to use the datepicker in another place and use a nested
selector, something like:
.mypanel .datepicker {
 padding: 20px/* just an example */
}

So I define another ProjectClientBundle, ProjectCssResource and project.css.
But how do I integrate this with the datepicker interfaces such that I can
use the above styles :( ?
I think I have to let ProjectCssResource extends DatePickerCssResource ...
but then ?
Or must I use the @Import construction such that I have something like:
.mypanel-datepicker {
 padding: 20px/* just an example */
}


The idea is (desired situation): include a widget, that has own set of
styles, in another panel that influence the styles of the nested widget like
shown in the above css examples.

Your ideas are more then welcome.
Ed




On Sat, Apr 24, 2010 at 4:59 PM, Stefan Bachert wrote:

> Hi Ed,
>
> > // The part I don't understand:...
> > .panel .content {
> >   padding: 10px;
> >  }
>
> This part is not special to GWT. This is pure CSS. This technique is
> called "selector".
> http://www.w3.org/TR/CSS2/selector.html
>
> It means that a tag with with a class named "content" gets a padding
> of 10px when it lay within a tag with a class named "panel".
>  ".panel .content" is NOT a third class, it is just a nestling of two
> classes
>
> This example makes more sense if you define a padding for content
> only, too.
>
> .content {
>   padding: 20px;
> }
>
> Then it mean, normally content gets 20px padding, but when it lays
> within a panel (class) it gets 10px
>
> Does this make sense to you?
>
> Stefan Bachert
> http://gwtworld.de
>
>
>
> On 24 Apr., 07:01, Ed Bras  wrote:
> > Hi Stefan,
> >
> > Thanks for your reaction.
> > Let me tell you a bit more.
> > I am starting to use styles through CssResource in my code now.
> > I know how to use a single style, but have no idea how to use a prefixed
> > style.
> > Example:
> > Suppose I have the following stylesheet:
> > I am trying to use a style like:
> >
> > .panel  {
> >   width: 10px;
> >  }
> >
> > .content  {
> >   font-size: 10;
> >  }
> >
> > // The part I don't understand:...
> > .panel .content {
> >   padding: 10px;
> >  }
> >
> > And my CssResource interface:
> > interface MyCssResource extends CssResource {
> >  public MyCssResource INSTANCE = GWT.create(MyCssResource.class);
> >
> > @ClassName("panel")
> > String panel();
> >
> > @ClassName("content")
> > String content();
> >
> > }
> >
> > So in my code I do something like this:
> > ...
> > SimplePanel panel = new SimplePanel();
> > panel.setStyleName(MyCssResource.INSTANCE.panel());
> >
> > Label content = new Label("someText");
> > content.setStyleName(MyCssResource.INSTANCE.content);
> >
> > So how is this prefixed style ".panel .content" used and obfuscated ?...
> > Should I use the @import annoation for this ? .. and how ? :(... A bit
> > confusing
> >
> > In the doc they use several sheets. Maybe I should use that?.. But how do
> I
> > link these to the client bundle :(...
> >
> > Ed
> >
> > --
> > 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-toolkit@googlegroups.com
> .
> > To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> > For more options, visit this group athttp://
> 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.
>
>

-- 
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 MVP architecture redirect link page with URL parameters passing

2010-04-24 Thread Mahmoud
That's parameter passing within the web application, what about the
first part of my question? the most important one to me

On Apr 24, 7:46 am, Paul Stockley  wrote:
> Use something like History.newItem("page3?param1=a¶m2=b");
>
> This will rewrite the currentURLand store it in the browsers
> history. The onChange history event will then be fired.
>
> On Apr 23, 11:38 pm, Mahmoud  wrote:
>
>
>
>
>
> > Hello,
> > I have followed the MVP structure while developing my project.
> > Once I hit the siteURL, the History Manager loads the module by
> > inserting the default token to the history stack and then from there
> > the user can redirect himself to any part of the application by
> > changing the History token, which is basically the bit that comes
> > after the pound symbol (#) in theURL
>
> > My problem is: I'm unable to redirect a user to a specific token
> > without having to go through the default token and from there to
> > anywhere I want.
>
> > In other words, the URLs history usual follows 
> > this:http://domain#defaultToken
> > and from there I can go tohttp://domain#page1orhttp://domain#page2
> > without any problem.
>
> > But if i want to go directly tohttp://domain#page1iwill be
> > redirected to the default token which ishttp://domain#defaultToken...
> > mainly due to this snippet of code:
>
> >                 this.container = container;
>
> >                 if ("".equals(History.getToken())) {
> >                         History.newItem("defaultToken");
> >                 } else {
> >                         History.fireCurrentHistoryState();
> >                 }
>
> > So my question is: Is it possible to redirect a user to any part of
> > the application without having to start from the defaultToken page?
> > And can we pass in parameters using theURLonly (i.e: how can the
> > user hit the following link without 
> > errors?:http://domain#page3?param1=a¶m2=b)
> > ? How those it work?
>
> > To concertize the problem, I'm trying to implement an "activation"
> > link that if once the user clicks on it he will activate his account
> > given the userID and a encrypted code 
> > (i.e:http://domain#activate?userID=12&code=ht2oj34j2k5j6pk3
> > )
>
> > Any advice will do,
> > Cheers,
> > Mahmoud
>
> > --
> > 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 
> > athttp://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 
> athttp://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: java.io, java.nio emulation?

2010-04-24 Thread David Given
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 24/04/10 12:06, خليل بولو  wrote:
[...]
> كنت في الماضي القريب اناقش واتصفح ونشاط حاسم ولاكن بعد الشريط الامن لم
> اتمكن من رؤية البريد الوارد ليكن اختلاط بين القياسين وغير امن
> لطفا منكم ان تساعدني وهاذة رسالة اعتبرها انضمام الى مجموعتكم للاطلاع
> على ملفاتكم

Sorry, I don't read Arabic, and I can't find an online translator that
makes sense of Arabic. Can you try in English, please?

- -- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ "I love the way Microsoft follows standards. In much the same manner
│ that fish follow migrating caribou." --- Paul Tomblin
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFL0wfef9E0noFvlzgRApbKAKDdcFdIUZROq7wtJollbvI6MQYwLQCfVf80
XoxQrcoEJVKCToUJiUd2VvI=
=qbVx
-END PGP SIGNATURE-

-- 
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: prefix styles in CssResource?

2010-04-24 Thread Stefan Bachert
Hi Ed,

> // The part I don't understand:...
> .panel .content {
>   padding: 10px;
>  }

This part is not special to GWT. This is pure CSS. This technique is
called "selector".
http://www.w3.org/TR/CSS2/selector.html

It means that a tag with with a class named "content" gets a padding
of 10px when it lay within a tag with a class named "panel".
 ".panel .content" is NOT a third class, it is just a nestling of two
classes

This example makes more sense if you define a padding for content
only, too.

.content {
   padding: 20px;
}

Then it mean, normally content gets 20px padding, but when it lays
within a panel (class) it gets 10px

Does this make sense to you?

Stefan Bachert
http://gwtworld.de



On 24 Apr., 07:01, Ed Bras  wrote:
> Hi Stefan,
>
> Thanks for your reaction.
> Let me tell you a bit more.
> I am starting to use styles through CssResource in my code now.
> I know how to use a single style, but have no idea how to use a prefixed
> style.
> Example:
> Suppose I have the following stylesheet:
> I am trying to use a style like:
>
> .panel  {
>   width: 10px;
>  }
>
> .content  {
>   font-size: 10;
>  }
>
> // The part I don't understand:...
> .panel .content {
>   padding: 10px;
>  }
>
> And my CssResource interface:
> interface MyCssResource extends CssResource {
>  public MyCssResource INSTANCE = GWT.create(MyCssResource.class);
>
>     @ClassName("panel")
>     String panel();
>
>     @ClassName("content")
>     String content();
>
> }
>
> So in my code I do something like this:
> ...
> SimplePanel panel = new SimplePanel();
> panel.setStyleName(MyCssResource.INSTANCE.panel());
>
> Label content = new Label("someText");
> content.setStyleName(MyCssResource.INSTANCE.content);
>
> So how is this prefixed style ".panel .content" used and obfuscated ?...
> Should I use the @import annoation for this ? .. and how ? :(... A bit
> confusing
>
> In the doc they use several sheets. Maybe I should use that?.. But how do I
> link these to the client bundle :(...
>
> Ed
>
> --
> 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 
> athttp://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: closing port

2010-04-24 Thread Mahmoud Abou-Nassif
If you're using eclipse you can terminate the execution by clicking on the
red square in the console window and the development console window.

On Mon, Mar 29, 2010 at 11:41 AM, Rajeev Dayal  wrote:

> Are you using the Google Plugin for Eclipse?
>
> When you say that the project did not terminate normally, what exactly
> happened? Did you kill the GWT Java process?
>
>
> On Fri, Mar 26, 2010 at 1:28 PM, imgnik  wrote:
>
>> if my gwt project did not terminate properly, the localhost port will
>> still be occupied.
>>
>> how do i close that manually? it is giving me error saying port is in
>> use.
>>
>> --
>> 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.
>>
>>
>  --
> 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.
>

-- 
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: java.io, java.nio emulation?

2010-04-24 Thread خليل بولو
google-web-toolkit@googlegroups.com
كنت في الماضي القريب اناقش واتصفح ونشاط حاسم ولاكن بعد الشريط الامن لم
اتمكن من رؤية البريد الوارد ليكن اختلاط بين القياسين وغير امن
لطفا منكم ان تساعدني وهاذة رسالة اعتبرها انضمام الى مجموعتكم للاطلاع
على ملفاتكم
www.abuawad@gmail.com

2010/4/24, David Given :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I have a requirement to parse MIME email messages on the client. I've
> found a nice Java library to do this --- mime4j --- but it has
> dependencies on java.io (string and byte buffer based streams and
> readers) and java.nio (character set conversion).
>
> Does anyone know of any emulation packages for these that will work in GWT?
>
> I've seen a few references to people who've written their own, and would
> rather not reinvent the wheel...
>
> - --
> ┌─── dg@cowlark.com ─ http://www.cowlark.com ─
> │
> │ "In the beginning was the word.
> │ And the word was: Content-type: text/plain" --- Unknown sage
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iD8DBQFL0fvqf9E0noFvlzgRArlbAKDOi/dlPsnan9dHGMqkMqafEBu8SwCggTx2
> f6UrJBR1nVEsk86SetQCLss=
> =cPec
> -END PGP SIGNATURE-
>
> --
> 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.
>
>


-- 
www.abuawad.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: GWT MVP architecture redirect link page with URL parameters passing

2010-04-24 Thread Paul Stockley
Use something like History.newItem("page3?param1=a¶m2=b");

This will rewrite the current URL and store it in the browsers
history. The onChange history event will then be fired.

On Apr 23, 11:38 pm, Mahmoud  wrote:
> Hello,
> I have followed the MVP structure while developing my project.
> Once I hit the site URL, the History Manager loads the module by
> inserting the default token to the history stack and then from there
> the user can redirect himself to any part of the application by
> changing the History token, which is basically the bit that comes
> after the pound symbol (#) in the URL
>
> My problem is: I'm unable to redirect a user to a specific token
> without having to go through the default token and from there to
> anywhere I want.
>
> In other words, the URLs history usual follows this:http://domain#defaultToken
> and from there I can go tohttp://domain#page1orhttp://domain#page2
> without any problem.
>
> But if i want to go directly tohttp://domain#page1i will be
> redirected to the default token which ishttp://domain#defaultToken...
> mainly due to this snippet of code:
>
>                 this.container = container;
>
>                 if ("".equals(History.getToken())) {
>                         History.newItem("defaultToken");
>                 } else {
>                         History.fireCurrentHistoryState();
>                 }
>
> So my question is: Is it possible to redirect a user to any part of
> the application without having to start from the defaultToken page?
> And can we pass in parameters using the URL only (i.e: how can the
> user hit the following link without 
> errors?:http://domain#page3?param1=a¶m2=b)
> ? How those it work?
>
> To concertize the problem, I'm trying to implement an "activation"
> link that if once the user clicks on it he will activate his account
> given the userID and a encrypted code 
> (i.e:http://domain#activate?userID=12&code=ht2oj34j2k5j6pk3
> )
>
> Any advice will do,
> Cheers,
> Mahmoud
>
> --
> 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 
> athttp://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: prefix styles in CssResource?

2010-04-24 Thread Ed Bras
Hi Stefan,

Thanks for your reaction.
Let me tell you a bit more.
I am starting to use styles through CssResource in my code now.
I know how to use a single style, but have no idea how to use a prefixed
style.
Example:
Suppose I have the following stylesheet:
I am trying to use a style like:

.panel  {
  width: 10px;
 }

.content  {
  font-size: 10;
 }

// The part I don't understand:...
.panel .content {
  padding: 10px;
 }

And my CssResource interface:
interface MyCssResource extends CssResource {
 public MyCssResource INSTANCE = GWT.create(MyCssResource.class);

@ClassName("panel")
String panel();

@ClassName("content")
String content();
}

So in my code I do something like this:
...
SimplePanel panel = new SimplePanel();
panel.setStyleName(MyCssResource.INSTANCE.panel());

Label content = new Label("someText");
content.setStyleName(MyCssResource.INSTANCE.content);

So how is this prefixed style ".panel .content" used and obfuscated ?...
Should I use the @import annoation for this ? .. and how ? :(... A bit
confusing

In the doc they use several sheets. Maybe I should use that?.. But how do I
link these to the client bundle :(...

Ed

-- 
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: IsTextBox/widget-specific interfaces

2010-04-24 Thread Thomas Broyer


On Apr 23, 11:45 pm, Stephen Haberman 
wrote:
> > Or you could use a "delegate", as enlightened in the GWT MVP tutorial
> > Part II published earlier this 
> > week:http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
> > (the Presenter interface).
>
> Hm? I'm not seeing how a Presenter interface would let my presenter
> call, say, the Anchor.setTarget method.
>
> If IsAnchor existed, I could have a "IsAnchor MyView.fooAnchor()"
> method and do "display.fooAnchor().setTarget(...)" from my presenter.

You wouldn't have a MyView.fooAnchor() getter but a
MyView.setFooAnchorTarget(String) setter.

-- 
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: RPC Obfuscation

2010-04-24 Thread Thomas Broyer


On Apr 24, 10:02 am, mmoossen  wrote:
> > Well, I don't have an answer for your question, but why don't you
> > use SSL?
>
> it is not about security, it is just about hiding a bit the
> implementation details.
> base64 encoding would be more than enough for me.
>
> > ..., but wait, unless i could explicetely call the
> > serialization/deserialization methods from gwt... mmm.. interesting...
> > i will try it now...
>
> to no avail, i would need to call the generated Serializer for the RPC
> service, and i have no idea how could i achieve that :(
> and anyhow it would be better to directly manipulate the payload so
> method signature can stay as it is.
>
> > but how do i implement
> > the client side counterpart of
> > RemoteServiceServlet#onBeforeRequestDeserialized??
>
> is there really no client-side counterpart for this? i mean what is
> the sense of manipulating the serialized payload on the server-side if
> there is no way to do it revert your manipulation on the client?

You can provide your own RpcRequestBuilder and use it to wrap the
RequestCallback so you can manipulate the response.getText() before
delegating to the wrapped RPC callback.

-- 
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: Is GWT's rpc eval() call safe?

2010-04-24 Thread Sripathi Krishnan
>
> Is GWT's rpc eval() call safe?
>
Yes, it is safe. In general, calling eval() is safe as long as you are sure
that the person generating json is properly escaping untrusted data.

Unfortunately I haven't been able to find how this response is encoded.
>
In the case of GWTs RPC (or rather, deRPC), this is done by one of the
CommandSink classes. SimplePayloadSink and WebModePayloadSink both call
EscapeUtil.escape() on any untrusted data. This makes sure that malicious
code injection is not possible.

I've also noticed that while the rpc response is json, it also begins
> with a //OK string.  Does this protect rpc calls from executing
> malicious javascript, if not, what does?
>
See above. Escaping untrusted data while constructing the JSON on the server
side gives you protecion against malicious javascript.

--Sri



On 23 April 2010 21:59, bconoly  wrote:

> Hey All,
>I've been looking through the gwt code in an attempt to figure out
> if its call to the javascript eval() function is safe on rpc
> responses.  So far I've seen that it natively calls the eval function
> in the ClientSerializationStreamReader class with an encoded
> response.  Unfortunately I haven't been able to find how this response
> is encoded.
>
> I've also noticed that while the rpc response is json, it also begins
> with a //OK string.  Does this protect rpc calls from executing
> malicious javascript, if not, what does?
>
> Thanks 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.
>
>

-- 
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: new GWT MVP article (part 2)

2010-04-24 Thread Thomas Broyer


On Apr 24, 2:04 am, Paul Stockley  wrote:
> I like the model-view-presenter architecture. However I am not at all
> sold on mocking out the view and testing just the presenter. The
> problems is that you are not testing 3 of the potentially most error
> prone parts of the system: 1) The browser and DOM, 2) The GWT widget
> library and 3) the GWT java to javascript conversion. So you still
> need to test these otherwise you are fooling yourself about the
> reliability of your code. I would rather discared the interfaces, unit
> test my rpc services using junit and use something like webdriver to
> test the front end.

One of the goal of using MVP is to unit test in "pure java", which is
waaay faster than using a GWTTestCase or WebDriver.
But of course it only tests the "presentation logic" (the presenter),
which means you SHOULD do other tests, automated using GWTTestCase or
WebDriver, or manual tests.

-- 
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: new GWT MVP article (part 2)

2010-04-24 Thread Thomas Broyer


On Apr 22, 9:27 am, interdev  wrote:
> Hello everyone,
> have you seen the new MVP Architecture article from google 
> ?http://code.google.com/webtoolkit/articles/mvp-architecture-2.html

First, I only read it quickly, I didn't download and looked at the
sample project.

> they have changed the structure slightly, instead of having a View and
> a Presenter which has an inner Interface (Display), aside from the
> UiBinder part, they now have a View interface which has an inner
> Presenter interface !
>
> 1- what do you all think ? are these yet another level of abstraction/
> indirection necessary ?

Not strictly necessary but it makes things simpler in the end (from
experience: I initially followed the same approach as Ray Ryan
explained at Google I/O 2009 and switch to a very similar approach to
this Part II a few weeks ago; it really gives you more flexibility and
makes the code, including unit tests, much easier to read).

In my project, the interfaces are all defined within the presenter
class, and the presenter interface (which I call Listener in my code)
is implemented by a private inner class. But the overall approach is
the same.

> 2- when google wants to address problem of Nested/Layered presenters ?
> header/body/footer, and body having its own dockpanellayout structure.

There are many ways of approaching the problem; just like with MVP
(the Display interface exposing HasXxxHandlers as in Part I vs. the
View and Presenter interfaces as in Part II). In our app, in effect,
each "parent presenter" also plays the role of "app controller"; but
because we have the presenter/view dichotomy, the view exposes
setSomeWidget(...) methods that the presenter calls; e.g.
setHeader(...), setBody(...), setFooter(...).

> 3- what do you think of "presenter.go(container)" ?

We do it the other way around: our presenters have a getView() method
and the parent calls container.add((Widget) child.getView()). This is
actually split between the presenter and the view, see above:
view.setHeader(childPresenter.getView()) in the presenter, and
containerWidget.add((Widget) child) in the view.

The only "issue" with presenter.go(container) is that container must
be a "simple" container, which means that when it's meant to be a dock
(layout) panel, tab panel, or some other complex panel (or an absolute
panel and you want to add with coordinates), you actually have to add
a SimplePanel first and pass it as the "container" to the go() method.
Otherwise, I can't see a problem with presenter.go(container).

> and navigation/
> history token inside multiple IF statements ?

I'm using a very similar approach as the one in bikeshed:
http://code.google.com/p/google-web-toolkit/source/browse/trunk/bikeshed/src/com/google/gwt/app/place/

> i think these are more serious to address than introducing an
> additional view interface which has an inner interface !

But they highly depends how your app is organized re. "navigation".
For instance, in Google Wave, there's no "switching of views" in the
"app controller", though there obviously is at lower levels. And given
how the history token is built, there probably isn't "history token
inside multiple IF statements".

> 4- what do you think of DTO solution presented in the article, is it
> scalable ? do you follow it or stick with your twig, gilead
> framework ?

You mean what's explained in the "dumb view" sections? How is it
related to any ORM/persistence layer/framework?

-- 
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: RPC Obfuscation

2010-04-24 Thread Sripathi Krishnan
GWT has in-built obfuscation of type names in RPC calls, though I am not
sure how well tested it is.

Put this line in your module.xml to see it working -


I haven't tried it out, but going through the code, it seems to be doing the
right thing. If you are interested in going through code, search for the
following key words - gwt.elideTypeNamesFromRPC,
GWT_ELIDE_TYPE_NAMES_FROM_RPC and FLAG_ELIDE_TYPE_NAMES.


--Sri



On 24 April 2010 13:32, mmoossen  wrote:

> > Well, I don't have an answer for your question, but why don't you
> > use SSL?
> it is not about security, it is just about hiding a bit the
> implementation details.
> base64 encoding would be more than enough for me.
>
> > ..., but wait, unless i could explicetely call the
> > serialization/deserialization methods from gwt... mmm.. interesting...
> > i will try it now...
> to no avail, i would need to call the generated Serializer for the RPC
> service, and i have no idea how could i achieve that :(
> and anyhow it would be better to directly manipulate the payload so
> method signature can stay as it is.
>
> > but how do i implement
> > the client side counterpart of
> > RemoteServiceServlet#onBeforeRequestDeserialized??
> is there really no client-side counterpart for this? i mean what is
> the sense of manipulating the serialized payload on the server-side if
> there is no way to do it revert your manipulation on the client?
> could somebody explain me how these methods are intended to be used??
>
> thanks
> Michael
>
>
>
>
>
> On Apr 24, 12:22 am, nacho  wrote:
> > I would like to know too if there anyway to ofuscate the methods
> >
> > On 23 abr, 15:04, Tercio  wrote:
> >
> >
> >
> > > Well, I don't have an answer for your question, but why don't you use
> > > SSL?
> >
> > > I can't trust my data going and coming without been encrypted.
> >
> > > This way you don't need to worry about obfuscation.
> >
> > > Hope can help.
> >
> > > Regards.
> >
> > > Tercio
> >
> > > On Apr 22, 10:47 am, mmoossen  wrote:
> >
> > > > dear all!
> >
> > > > i am preparing for going online, so i started to try out the RPC
> > > > obfuscation mechanism:
> > > >  /
> >
> > > > and to my surprise (or not, if you stop to read the module name) only
> > > > classnames get obfuscated but not method names (from the service
> > > > class).
> >
> > > > so, is there any way to obfuscate also the method names?
> >
> > > > and more over, there are some few service calls that i would like to
> > > > completely obfuscate so it is not so easy to read the transferred
> > > > data.
> > > > is there any way to tell GWT to obfuscate a whole service call
> > > > response?
> >
> > > > i started with the idea to obfuscate the serialized response in
> > > > RemoteServiceServlet#onAfterResponseSerialized, but how do i
> implement
> > > > the client side counterpart of
> > > > RemoteServiceServlet#onBeforeRequestDeserialized??
> >
> > > > the other option is to have a service call that returns only an
> > > > obfuscated string, but then i would have to do all the serialization/
> > > > deserialization for the objects to use by myself which is just
> > > > reinventing the wheel, but wait, unless i could explicetely call the
> > > > serialization/deserialization methods from gwt... mmm..
> interesting...
> > > > i will try it now...
> >
> > > > but, it would be really great to have such an option out of the box!
> >
> > > > thanks for reading
> > > > Michael
> >
> > > > --
> > > > 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 athttp://
> 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 athttp://
> 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-toolkit@googlegroups.com
> .
> > To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> > For more options, visit this group athttp://
> 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, visi

Re: RPC Obfuscation

2010-04-24 Thread mmoossen
> Well, I don't have an answer for your question, but why don't you
> use SSL?
it is not about security, it is just about hiding a bit the
implementation details.
base64 encoding would be more than enough for me.

> ..., but wait, unless i could explicetely call the
> serialization/deserialization methods from gwt... mmm.. interesting...
> i will try it now...
to no avail, i would need to call the generated Serializer for the RPC
service, and i have no idea how could i achieve that :(
and anyhow it would be better to directly manipulate the payload so
method signature can stay as it is.

> but how do i implement
> the client side counterpart of
> RemoteServiceServlet#onBeforeRequestDeserialized??
is there really no client-side counterpart for this? i mean what is
the sense of manipulating the serialized payload on the server-side if
there is no way to do it revert your manipulation on the client?
could somebody explain me how these methods are intended to be used??

thanks
Michael





On Apr 24, 12:22 am, nacho  wrote:
> I would like to know too if there anyway to ofuscate the methods
>
> On 23 abr, 15:04, Tercio  wrote:
>
>
>
> > Well, I don't have an answer for your question, but why don't you use
> > SSL?
>
> > I can't trust my data going and coming without been encrypted.
>
> > This way you don't need to worry about obfuscation.
>
> > Hope can help.
>
> > Regards.
>
> > Tercio
>
> > On Apr 22, 10:47 am, mmoossen  wrote:
>
> > > dear all!
>
> > > i am preparing for going online, so i started to try out the RPC
> > > obfuscation mechanism:
> > > 
> > > and to my surprise (or not, if you stop to read the module name) only
> > > classnames get obfuscated but not method names (from the service
> > > class).
>
> > > so, is there any way to obfuscate also the method names?
>
> > > and more over, there are some few service calls that i would like to
> > > completely obfuscate so it is not so easy to read the transferred
> > > data.
> > > is there any way to tell GWT to obfuscate a whole service call
> > > response?
>
> > > i started with the idea to obfuscate the serialized response in
> > > RemoteServiceServlet#onAfterResponseSerialized, but how do i implement
> > > the client side counterpart of
> > > RemoteServiceServlet#onBeforeRequestDeserialized??
>
> > > the other option is to have a service call that returns only an
> > > obfuscated string, but then i would have to do all the serialization/
> > > deserialization for the objects to use by myself which is just
> > > reinventing the wheel, but wait, unless i could explicetely call the
> > > serialization/deserialization methods from gwt... mmm.. interesting...
> > > i will try it now...
>
> > > but, it would be really great to have such an option out of the box!
>
> > > thanks for reading
> > > Michael
>
> > > --
> > > 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 
> > > athttp://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 
> > athttp://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 
> athttp://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.