Thursday, January 31, 2013

Re: DialogBox won't get CSS attribute box-shadow

If you have animation applied to dialog box, then "clip" property is applied to dialog box, thus preventing shadow to appear. remove animation or manually override clip property.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: GWT 2.5.0-rc1 on IPad not firing click events

We have recently upgraded from 2.4 to 2.5(GA) and having this issue. Does anyone have found a solution or work-around? We are not using mgwt.

thanks, Kenny

On Thursday, September 27, 2012 8:52:50 AM UTC+10, Kevin Campbell wrote:
I'm seeing this as well. It's happening on all iOS devices I've tested, and is also preventing focus on input elements.

On Wednesday, August 22, 2012 8:45:17 AM UTC-7, Casey Rodgers wrote:
In GWT 2.5.0-rc1 buttons (and anchors) will only fire the click event every few clicks.  Meaning you have to click on buttons multiple times to get them to fire.

Is anyone else having this issue?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

RequestFactory - AutoBean has been frozen - Reloading and editing

I realize this topic has been discussed before but I am having trouble finding a solution to my problem.  Basically I have an editor that needs to edit the same entity in the database multiple times.  I can edit the entity the first time but subsequent edits create the "AutoBean has been frozen" exception.  The whole idea of this code it to load an entity, save the entity, reload the entity, save the entity.... On the server I am just looking up the entity from the database and returning the result.

Here is the relevant code:

....
        editor.addSaveHandler(new SaveHandler() {
            @Override
            public void onSave(final SaveEvent event) {
                save();
            }
        });
        edit();
    ....

    public void edit() {
        driver = GWT.create(Driver.class);
        driver.initialize(factory, editor);
        context = factory.context();
        context.getRegisteredCompany().with(driver.getPaths())
            .fire(new RFReceiver<RegisteredCompanyProxy>(eventBus, driver) {
                @Override
                public void onSuccess(final RegisteredCompanyProxy company) {
                    context = factory.context();
                    driver.edit(company, context);
                    context.save(company);
                }
            });
    }

    public void save() {
        RequestContext ctx = driver.flush();
        if (!driver.hasErrors()) {
            ctx.fire(new RFReceiver<Void>(eventBus, driver) {
                @Override
                public void onSuccess(final Void response) {
                    edit();
                }
            });
        }
    }

Is there something that I am doing wrong with this code?

Thanks!
Steve

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

RequestFactory throws Exception when returning an entity with a null Proxy relationship

It is *not* the expected behavior. What does the server side stacktrace looks like?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

GWT 2.5 compiler is running out of memory

I've got a rather large GWT build using Maven and the gwt-maven-plugin and I'm getting out of memory errors building now.  I'm not sure what's changed, it used to take considerable memory but now its taking so much I can't build.  I'm running Windows 7 64 bit with 8GB RAM and using Java 7 64 bit to compile, here are some of my settings:

MAVEN_OPTS=-Xms128m -Xmx1024m -XX:MaxPermSize=256m

Then in the gwt-maven-plugin configuration I have <extraJvmArgs>-Xmx2048m -Xmx2048m -XX:MaxPermSize=512m</extraJvmArgs>

I've tried several combinations of values here with no luck...with these values...
- When I start the maven command line build the system has about 3GB of memory used
- When it it starts the GWT part of the build its at about 4GB used.
- The I have lots of rebind operations going on generating code...during this time it goes to about 5GB used.
- Then when it hits the permutations step this is where it breaks down...it very quickly goes to about 7.5 GB used.  Then I get out of memory errors and the build fails.

So there seems to be a couple of issues, first the GWT compiler doesn't seem to work within the -Xmx2048m value, I used to use -Xmx1024m and it does about the same thing...it uses a lot more memory than that...and then fails.  In this case it used 3.5 GB before it failed.  And secondly, I can't give GWT more memory because my system doesn't have more to give it...this was with almost all other programs closed...and it still failed.

Does anyone have an idea why my build might be using so much memory and how to limit this?

Btw, at the start of the permutation compile step sometimes it reports 6 permutations and sometimes 12...seems to have the same problem in both cases but I'm not sure why it sometimes has 12 and other times 6.

-Dave



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: State of client-side pdf file generation

Gwt4air only supported client side file generation inside Adobe AIR or via Flex inside the regular browser.

 And like you see the 2 examples use Flex.
So there is no (and there has never been)  solution that dont require Flex in a regular web app.

But like i said Flash4j 3.1 will implement a  GWT Widget that will help you generate files(Excel + PDF) on the client without Flex (Flash will still be required though).




2013/1/31 El Mentecato Mayor <rogelio.flores@gmail.com>
Thanks for your answer nino.

So did the gwt4air project ever support the pdf-generation from withing GWT projects?
Looking at pages like these ones (below) made me have some hope that it did or does if I use that project's code, even if it's old or outdated:


 

On Thursday, January 31, 2013 11:45:59 AM UTC-5, nino wrote:
Yes the most uptodate version is the one on that link.

At the moment clientside file generation is only supported in Flex based projects.
3.1 will have it for  regular  GWT based projects.





2013/1/31 El Mentecato Mayor <rogelio...@gmail.com>
Some time ago, the gwt4air project to do client-side file generation was mentioned (see https://groups.google.com/d/topic/google-web-toolkit/nhevJ3qxtMs/discussion). Now emitrom has taken ownership of that project according to the project's website (http://code.google.com/p/gwt4air/).

I'm wondering if the most up-to-date version of this library is now flex4j (http://www.emitrom.com/flex4j).

Can anyone comment on that? I'm interested in pdf file generation on the client side and possibly excel file generation which seems to be supported as well. Alternatively, is anybody aware of other libraries or ways to accomplish the same thing (if you think there's a better way/library)?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

RequestFactory throws Exception when returning an entity with a null Proxy relationship

I have an entity that has an optional entity that is specified in the with() method of the call (e.g. bookRequest().findByDate(date).with("author")).  When author is null, it throws an exception.  Is this the expected behavior?  Is there any way to return an object with an optional relationship?

Stacktrace: 
http://pastebin.com/y80E2GMT

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Geocoding Question

I have an ASP script that takes a zip code and derives latitude/longitude coordinates. As you can see it is a simple integration. With such an integration I am allowed 2500 queries per day. I am going over that and would like to convert it to where I am using API credentials. I have looked and looked and cannot figure this one out. I know it is simple but just cannot find any code or a solution. 

Here is the existing code. I am passing a five (5) digit zip code into this ASP sub-routine.

Sub getLatLon(vAddress,latitude,longitude)        
                
        Set xmlhttp = Server.Createobject("MSXML2.ServerXMLHTTP")
' create url to post
urlToPost = "http://maps.googleapis.com/maps/api/geocode/xml?address=" & vAddress & ""
xmlhttp.Open "POST",urlToPost, false
        xmlhttp.Send
        strRetval = xmlhttp.ResponseText
        
        print "xmlhttp.ResponseText:" & xmlhttp.ResponseText & br
        
        Set xmlhttp = nothing

       Set objXMLDoc = CreateObject("Microsoft.XMLDOM") 
       objXMLDoc.async = False 
       objXMLDoc.loadXML(strRetval) 
       
       Set lat = objXMLDoc.documentElement.selectSingleNode("//lat")
       latitude = lat.Text
       Set lon = objXMLDoc.documentElement.selectSingleNode("//lng")
       longitude = lon.Text
End Sub
 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: State of client-side pdf file generation

Thanks for your answer nino.

So did the gwt4air project ever support the pdf-generation from withing GWT projects?
Looking at pages like these ones (below) made me have some hope that it did or does if I use that project's code, even if it's old or outdated:


 

On Thursday, January 31, 2013 11:45:59 AM UTC-5, nino wrote:
Yes the most uptodate version is the one on that link.

At the moment clientside file generation is only supported in Flex based projects.
3.1 will have it for  regular  GWT based projects.





2013/1/31 El Mentecato Mayor <rogelio...@gmail.com>
Some time ago, the gwt4air project to do client-side file generation was mentioned (see https://groups.google.com/d/topic/google-web-toolkit/nhevJ3qxtMs/discussion). Now emitrom has taken ownership of that project according to the project's website (http://code.google.com/p/gwt4air/).

I'm wondering if the most up-to-date version of this library is now flex4j (http://www.emitrom.com/flex4j).

Can anyone comment on that? I'm interested in pdf file generation on the client side and possibly excel file generation which seems to be supported as well. Alternatively, is anybody aware of other libraries or ways to accomplish the same thing (if you think there's a better way/library)?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Gwt and user role based security

the following of you, about my site
http://globalcyber.pun.bz/ekiosku-com-jual-beli-online-aman-menyen.xhtml

On 1/31/13, siva vasanta <svasanta.tez@gmail.com> wrote:
> It depends on the container you are using. For tomcat you can check this
> link http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html
>
>
> On Thursday, January 31, 2013 7:04:25 PM UTC+5:30, Plamen Tenev wrote:
>>
>> Greetings!
>>
>> I'm developing a sample application. I want to make role based security
>> but i'm not quite familiar with it. I have defined security constraints in
>>
>> the web.xml. There are two roles, one for administrator and one for
>> ordinary user. Where and how should I set the roles for each user? How
>> should I retrieve them?
>> I have searched the web for various tutorials but haven't found anything I
>>
>> can stick on. Could you please give me some directions how to do it?
>>
>> Thanks in advance!
>>
>> Regards,
>> Plamen
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscribe@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

LogRecord in JRE Emulation

Hi,  
I have a question regarding the logging in GWT.

Why does the JRE-Emulation of java.util.logging.LogRecord does not include the following methods:
  // public void setSourceClassName(String sourceClassName) {}     // public void setSourceMethodName(String sourceMethodName) {}
It would be really helpful, if I could log the source of the message. For me it would be OK, if these information will only be present if I compile my application with Stacktrace information.

Regards,
Christian




--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Gwt and user role based security

It depends on the container you are using. For tomcat you can check this link http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html


On Thursday, January 31, 2013 7:04:25 PM UTC+5:30, Plamen Tenev wrote:
Greetings!

I'm developing a sample application. I want to make role based security but i'm not quite familiar with it. I have defined security constraints in the web.xml. There are two roles, one for administrator and one for ordinary user. Where and how should I set the roles for each user? How should I retrieve them?
I have searched the web for various tutorials but haven't found anything I can stick on. Could you please give me some directions how to do it?

Thanks in advance!

Regards,
Plamen

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Cancel CellList selection

I also realized that the overriden setSelected method is called two times in PromptingSelectionModel. So if I selected Cell 7 and Cell 7 is currently selected and if I click on Cell 10, the the cell selection is about to changed the first call to overriden setSelected method passes Cell 7 object and selected flag as false and second call passed Cell 10 object and selected flag now is true. So having that unsavedFlag check shows me two Confirm dialog boxes assuming the form data on Cell 7 has changed. Hitting cancel twice keeps the Cell 7 selected but it also shows a mild yellow selection color on Cell 10. 

So it seems when a selection is changed GWT removes the first selection (selected off) and selects the next selection (selected true). So when I override the setSelected method, I somehow need to stop the second call if my form is not saved. Not sure how do I do that.


On Thursday, November 10, 2011 5:12:57 AM UTC-6, Thomas Broyer wrote:
It's not about cancelling the event; it's about *not* routing it to a DefaultSelectionEventManager (which changes selection depending on the event). It also means you shouldn't addCellPreviewHandler, but instead use the two-argument overload of setSelectionModel.

It's as easy as:
myCellList.setSelectionModel(mySelectionModel, CellPreviewEvent.Handler<MyObject>() {
   private final CellPreviewEvent.Handler<MyObject> defaultSelectionManager = DefaultSelectionEventManager.createDefaultManager();
   @Override
   public void onCellPreview(CellPreviewEvent<MyObject> event) {
      if (hasUnsavedChanged() && !Window.prompt("There are unsaved changes, are you sure you want to continue?") {
         return;
      }
      return defaultSelectionManager.onCellPreview(event);
   }
});

Beware though, if you have a cell that "handlesSelection()", you'll have to handle the case there (so that it doesn't change selection if there are unsaved changes).

Oh, and it just occurred to me that you could also simply code that within your SelectionModel too:
class PromptingSelectionModel<T> extends SingleSelectionModel<T> {
   @Override
   public void setSelected(T object, boolean selected) {
      if (hasUnsavedChanged() && !Window.prompt("There are unsaved changes, are you sure you want to continue?") {
         return;
      }
      super.setSelected(object, selected);
   }
}

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Cell List Example on GWT Showcase of Features

I have the StockWatch  roject working.  The issue is the example for the composite page with the cell list and form.  I can't find a onModuleLoad() in the example, and the compiler is complaining.  I don't know what div to put in the html file because I can't find RootPanel anywhere, so the example isn't working like the StockWatch project.

Did you ever get the example to work?

Maffy


On Thu, Jan 31, 2013 at 6:48 AM, Marko Mišković <misko23@gmail.com> wrote:
Maybe it's best to start with GWT example project in tutorial section. StockWatch is the name of project. There, you'll learn how GWT project looks like.


On Sunday, 17 July 2011 15:17:28 UTC+2, Berkan wrote:
Hello,

I am quite new to GWT. I am trying to come up with an application
similar to this:

http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellList

I understand that these examples come with their source codes but the
source code consists of many different classes and I do not know how I
can convert this to a working example, i.e. where the components fit
in the project hierarchy.

Is there anyway to download this example as a (stand-alone) web
application project with its entry point class and all other necessary
classes?

Thanks,
Berkan

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
"Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity."
Dr. Martin Luther King

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Navigating to static HTML page on button click

  1. You don't have a callback set for your RequestBuilder so you won't be notified when the response comes back
  2. You're actually probably looking for Window.Location.assign(url) rather than using RequestBuilder.

On Thursday, January 31, 2013 4:44:00 PM UTC+1, siva vasanta wrote:
Hi, 
I am new to GWT.   In my GWT application, I want send a direct request for static html up on a button click and the HTML page should be displayed. I tried below code. I can see that URL is correct but nothing is happening. I expected browser to display static html page but it remains on same page.  How can I do this ?

Code:
 TextButton signoutButton = new TextButton(messages.signoutButton());
        signoutButton.setDecoration(Decoration.PRIMARY);
        signoutButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
String url = GWT.getHostPageBaseURL() + "logout.html";
RequestBuilder builder = new RequestBuilder( RequestBuilder.GET, url);
try {
Window.alert("URL" + url);
builder.send();
} catch (RequestException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
};
});

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Cancel CellList selection

Thanks Thomas. Unfortunately we are not using any DI framework. So we are going by traditional GWT Activities and Places framework with ClientFactory being passed to my Activity from AppActivityMapper. 

Interesting. I never thought declaration of SingleSelectionModel model should be in Activity although I understand we can mock SingleSelectionModel for testing. So I guess the selectionModel.addSelectionChangeHandler code will also go in Activity/Presenter class right? 

The reason I put the flag it in ClientFactory is I wanted to make it a global variable so that it could be reusable from different Views that has List-Details screens. When user arrives on the form, reset the flag in ClientFactory to false. When user saves the form successfully, reset that flag to false as there are not unsaved changes. When user update the form set the value to true onValueChange event of its GWT widgets(textbox, SelectBox, etc). That way not only I can show that pop-up alert message if the user clicks on different cell in the Cell List within the same view but also if the user tries to navigate away to a different tab in my app, I can check that variable globally thru some PlaceChangeEvent. I thought putting a global variable would be easier than having every view to handle logic of updating the local flag within its presenter. 



On Thursday, January 31, 2013 5:22:13 AM UTC-6, Thomas Broyer wrote:


On Tuesday, January 29, 2013 6:43:11 PM UTC+1, BM wrote:
I was looking something similar and your example is perfect. I am going with approach of having my custom SingleSelectionHandler i.e PromptingSelectionModel . My view is more like GWT Showcase CellList-DetailForm example. If I click on my cell, my code populates the form elements. My Form is a separate GWT custom widget FormAWidget with its own presenter FormAPresenter. 

So with that being said, I probably will be storing a variable "hasUnsavedChanged" in ClientFactory which gets updated whenever my form data is changed. How do I get that variable inside my PromptingSelectionModel class so that I can check that variable in my overridden setSelected method? Since I use GWT MVP structure my ViewA holds declaration of CellList and PromptingSelectionModel. The ActivityA has reference to ClientFactory, the only way I can think of is passing the ClientFactory to my ViewA class with setClientFactory(ClientFactory cf) and pass that ClientFactory object to PromptingSelectionModel constructor. I don't like the idea of my views now having reference of ClientFactory.

"ClientFactory" (if you copied it form the Dev Guide) is supposed to be about "manual dependency injection". You shouldn't pass it around (if you were using a JSR330 DI framework or similar, such as GIN, you wouldn't even pass it to the activities, you'd instead inject a Provider<HelloView>). If you happen to need it in the view, then give it to the view when it's constructed (the view is constructed by the ClientFactory, right?)

That said, I believe the selection model should live in the presenter: it's part of the "presentation logic".

Please advise if you can see any better way of doing this.


Avoid global shared state. Don't put "hasUnsavedChanges" in your ClientFactory. That information belongs to your form (and in this case, its presenter). Then inject objects into each other as needed so they have access to the information.

 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Cancel CellList selection

I tried to use the similar code for PromptingSelectionModel class. It works but the only different is that for unsaved form data, although it prevents the selection of next cell it leaves a mild yellow selection on. So I see blue selection of first cell and mild yellow selection on second cell. Do I need to clear that selection on second cell if unsaved form data and window.confirm yields true?

On Thursday, November 10, 2011 5:12:57 AM UTC-6, Thomas Broyer wrote:
It's not about cancelling the event; it's about *not* routing it to a DefaultSelectionEventManager (which changes selection depending on the event). It also means you shouldn't addCellPreviewHandler, but instead use the two-argument overload of setSelectionModel.

It's as easy as:
myCellList.setSelectionModel(mySelectionModel, CellPreviewEvent.Handler<MyObject>() {
   private final CellPreviewEvent.Handler<MyObject> defaultSelectionManager = DefaultSelectionEventManager.createDefaultManager();
   @Override
   public void onCellPreview(CellPreviewEvent<MyObject> event) {
      if (hasUnsavedChanged() && !Window.prompt("There are unsaved changes, are you sure you want to continue?") {
         return;
      }
      return defaultSelectionManager.onCellPreview(event);
   }
});

Beware though, if you have a cell that "handlesSelection()", you'll have to handle the case there (so that it doesn't change selection if there are unsaved changes).

Oh, and it just occurred to me that you could also simply code that within your SelectionModel too:
class PromptingSelectionModel<T> extends SingleSelectionModel<T> {
   @Override
   public void setSelected(T object, boolean selected) {
      if (hasUnsavedChanged() && !Window.prompt("There are unsaved changes, are you sure you want to continue?") {
         return;
      }
      super.setSelected(object, selected);
   }
}

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: State of client-side pdf file generation

Yes the most uptodate version is the one on that link.

At the moment clientside file generation is only supported in Flex based projects.
3.1 will have it for  regular  GWT based projects.





2013/1/31 El Mentecato Mayor <rogelio.flores@gmail.com>
Some time ago, the gwt4air project to do client-side file generation was mentioned (see https://groups.google.com/d/topic/google-web-toolkit/nhevJ3qxtMs/discussion). Now emitrom has taken ownership of that project according to the project's website (http://code.google.com/p/gwt4air/).

I'm wondering if the most up-to-date version of this library is now flex4j (http://www.emitrom.com/flex4j).

Can anyone comment on that? I'm interested in pdf file generation on the client side and possibly excel file generation which seems to be supported as well. Alternatively, is anybody aware of other libraries or ways to accomplish the same thing (if you think there's a better way/library)?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: The Chrome 24 Animation bug and unstable APIs in general


That's the kind of "Enterprise world" behavior I'm talking about:
And they all happened in January 2013 !!!

That's what is scary with non-trivial web development as it is such a moving target. A web app working today might totally break tomorrow due to the fast pace of browser updates (initiated
by Chrome and followed by Firefox).
It's more scary for the future than say, traditional client-server Java development, which is much more stable as a platform in the long term.

Really, web developement today is a free for all. Some many competiting API and frameworks for which you have no visibility.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: SASS Compiler

Very sorry for the late reply. Missed the ongoing discussion.

This is pretty awesome - scss is a superset of css3, so including this linker means that GWT CSS can now fully use CSS3?

Well, you can use in the scss file, whatever the Vaadin SassCompiler supports. 
As the resulting CSS needs to be added to the host file, I don't see that there is any restriction on what you can use of CSS3 - except the restriction coming from the browser itself.
 
It shouldn't affect runtime javascript size, or compile time (much) or anything like that, as it just unplugs the GWT CSS compiler, and plugs in the CSS3/SCSS compiler, correct?

Yes, the linker runs during compile time, or when the page is refreshed when using dev mode 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

State of client-side pdf file generation

Some time ago, the gwt4air project to do client-side file generation was mentioned (see https://groups.google.com/d/topic/google-web-toolkit/nhevJ3qxtMs/discussion). Now emitrom has taken ownership of that project according to the project's website (http://code.google.com/p/gwt4air/).

I'm wondering if the most up-to-date version of this library is now flex4j (http://www.emitrom.com/flex4j).

Can anyone comment on that? I'm interested in pdf file generation on the client side and possibly excel file generation which seems to be supported as well. Alternatively, is anybody aware of other libraries or ways to accomplish the same thing (if you think there's a better way/library)?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Navigating to static HTML page on button click

Hi, 
I am new to GWT.   In my GWT application, I want send a direct request for static html up on a button click and the HTML page should be displayed. I tried below code. I can see that URL is correct but nothing is happening. I expected browser to display static html page but it remains on same page.  How can I do this ?

Code:
 TextButton signoutButton = new TextButton(messages.signoutButton());
        signoutButton.setDecoration(Decoration.PRIMARY);
        signoutButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
String url = GWT.getHostPageBaseURL() + "logout.html";
RequestBuilder builder = new RequestBuilder( RequestBuilder.GET, url);
try {
Window.alert("URL" + url);
builder.send();
} catch (RequestException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
};
});

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Best way to schedule periodic reminder?

Alternatively to using the Timer – as the time period you are interested in is quite long (1h) - you could just introduce a check on any client action, where you compare the time of last save call and the current time. Then you don't have the extra resources needed for the Timer-based solution. If you use an EventBus for communicating the UI and state changes, then the implementation would be very straightforward.


That said, in the application I'm working on, we use the Timer solution to automatically sing out the user, if there is no activity within 15 min. We did not mention any performance problems.


HTH,

Lukasz


Am Donnerstag, 31. Januar 2013 14:01:04 UTC+1 schrieb membersound:
Hi,

I would like to create a popup every hour that reminds the user to save his work (of course only if the work has not been saved for 1 h).
What is the right way to do this?

timer.scheduleRepeating(TIME);

and on save: timer.cancel()?

Probably it works this way, but would this consume decent resources if there is always a timer running in background? Or doesn't this matter.

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Best way to schedule periodic reminder?



On Thursday, January 31, 2013 3:13:30 PM UTC+1, RickL wrote:
I would do this:
    
  Timer saveTimer = new Timer() {
    public void run() {
      // show the popup
    }
  };
    
  public void onWorkSaved() {
    saveTimer.cancel(); 
    saveTimer.schedule(3600 * 1000);

Note: you don't need the explicit call to cancel(): schedule() will first cancel the timer if needed before re-scheduling it.
 
  }

  public void onFinishedEditing() {
    saveTimer.cancel(); 
  }

On Thursday, January 31, 2013 7:01:04 AM UTC-6, membersound wrote:
Hi,

I would like to create a popup every hour that reminds the user to save his work (of course only if the work has not been saved for 1 h).
What is the right way to do this?

timer.scheduleRepeating(TIME);

and on save: timer.cancel()?

Probably it works this way, but would this consume decent resources if there is always a timer running in background? Or doesn't this matter.

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Passing object from one module to another module

Hi All,

I have the following project architecture

a.gwt.xml, has an entry point class and search.html which users access it initially. When this page is hit a rest call is made to get the user information which has to be retrieved once.
b.gwt.xml, has an entry point class and searchresults.html which lists the users for the application based on the search query provided in search.html.
All the modules are not loaded initially.

My requirement is to pass the search query and the retrieved user object from module A to module B.

Module B is loaded after an click event in the search.html search box by the following way Window.Location.replace("searchresults.html");

I'm trying to achieve this above said requirement using GWT-Exporter following the article in http://code.google.com/p/gwt-exporter/

Did I miss something important or is this not possible in GWT?

Please help me on resolving this issue.

Thanks
Clement Amarnath

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Cell List Example on GWT Showcase of Features

Maybe it's best to start with GWT example project in tutorial section. StockWatch is the name of project. There, you'll learn how GWT project looks like.

On Sunday, 17 July 2011 15:17:28 UTC+2, Berkan wrote:
Hello,

I am quite new to GWT. I am trying to come up with an application
similar to this:

http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellList

I understand that these examples come with their source codes but the
source code consists of many different classes and I do not know how I
can convert this to a working example, i.e. where the components fit
in the project hierarchy.

Is there anyway to download this example as a (stand-alone) web
application project with its entry point class and all other necessary
classes?

Thanks,
Berkan

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: How to best (de)-serialize objects?

Maybe this can be helpfull.
http://stackoverflow.com/questions/2836646/java-serializable-object-to-byte-array

On Thursday, 31 January 2013 10:16:02 UTC+1, membersound wrote:
Hi,

I want to serialize a bunch of objects to a file, and later derserialize it.
The purpose is to let a user draw something on a canvas, save the objects representing the drawing to a file, and later continue it's work.

So I'm probably looking for a way of JSON. I read of JSNI and GWT Overlay Types. But this would mean I have to manually define every property that is to be serialized back and forth.

Isn't there anything build-in mechanism to just save a whole bunch of objects/beans to JSON and later just read it and recreate the object? Without having to care about all properties contained?

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Best way to schedule periodic reminder?

I would do this:
    
  Timer saveTimer = new Timer() {
    public void run() {
      // show the popup
    }
  };
    
  public void onWorkSaved() {
    saveTimer.cancel(); 
    saveTimer.schedule(3600 * 1000);
  }

  public void onFinishedEditing() {
    saveTimer.cancel(); 
  }

On Thursday, January 31, 2013 7:01:04 AM UTC-6, membersound wrote:
Hi,

I would like to create a popup every hour that reminds the user to save his work (of course only if the work has not been saved for 1 h).
What is the right way to do this?

timer.scheduleRepeating(TIME);

and on save: timer.cancel()?

Probably it works this way, but would this consume decent resources if there is always a timer running in background? Or doesn't this matter.

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Where is the source code for JNI methods of Visualization package?

I'm curious to understand the implementation of the DataTable class of com.google.gwt.visualization.client, but I discovered that most of its methods are implemented in native code.

But the SVN repository at http://code.google.com/p/google-web-toolkit/ does not seem to host the implementation of these native methods. Are they not made public? If not, is it on purpose or due to oversight?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gwt and user role based security

Greetings!

I'm developing a sample application. I want to make role based security but i'm not quite familiar with it. I have defined security constraints in the web.xml. There are two roles, one for administrator and one for ordinary user. Where and how should I set the roles for each user? How should I retrieve them?
I have searched the web for various tutorials but haven't found anything I can stick on. Could you please give me some directions how to do it?

Thanks in advance!

Regards,
Plamen

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Best way to schedule periodic reminder?

Hi,

I would like to create a popup every hour that reminds the user to save his work (of course only if the work has not been saved for 1 h).
What is the right way to do this?

timer.scheduleRepeating(TIME);

and on save: timer.cancel()?

Probably it works this way, but would this consume decent resources if there is always a timer running in background? Or doesn't this matter.

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: The Chrome 24 Animation bug and unstable APIs in general



On Wednesday, January 30, 2013 2:48:41 PM UTC+1, Thomas Broyer wrote:


On Wednesday, January 30, 2013 4:11:41 AM UTC+1, Andy wrote:
Thanks Thomas. Another great discussion, but I'm really surprised by all of the enterprise software hate.

Obviously, the core issue is that too many people don't get the Web, but that's another debate.
Of those people, who came complaining in the forum, some said they couldn't even recompile their app with the workaround (i.e. we're not even talking about updating to GWT 2.5 here, which would imply going through non-regression tests, etc. just applying a small workaround, recompiling and redeploying).

As I said, we sell software that is compiled by GWT and deployed behind firewalls within organizations. We can recompile and post patches, but it's up to them to redeploy. They might not see that code for 6-12 months in some cases depending on their policies. To give you a sense of the challenge, many of them are still using IE7 as their primary browser, but of course those people weren't affected.

You might argue everything web should be SAAS, but many of our customers aren't going there and have good reasons.

That's not what I'm saying.

In your case, you're an editor so you have the responsibility of testing your app with beta/dev versions of browsers before they reach your customers, and if you find an incompatibility then you tell your customers to update their installs of your app with the version that contains the fix/workaround. It is then the responsibility of your customers, if they'll be affected by the issue, to deploy the new version or prevent their browsers from updating: they chose to install/use a webapp, they should be prepared to deploy such "patched versions". As you said, "it's up to them", and they then have no reason to whine if they're not up-to-date: you gave them a fix in due time (possibly even before they'd notice the issue).

What I'm angry about is a bit different though: our customers ask us to develop a webapp (we're not an editor, it's their app, they own it and are responsible for its maintenance). Once deployed in production, they only care about the server being up and running; they update their browsers but don't plan for (preventive) maintenance of their apps (it holds for any app, not only webapps, but webapps exacerbate the problem). Far too many people don't even monitor their apps for security breaches: only a handful of our customers ask us the list of 3rd-party products/tools/libs we've used to build their app, and even less monitor them for vulnerabilities.
It's no different from your customers not installing updates, except that they probably pay you a license or other commercial support that includes providing updates; in my case, once we deliver the app nobody does the preventive maintenance. During the warranty period we fix those issues (we might update vulnerable dependencies too, but it's not even part of the deal), but once it's over it becomes our customer's responsibility, and nobody does it (unless it's a LoB app, maybe). We have support contracts in some cases, but it's only about fixing bugs (and sometimes adding features); preventive maintenance is not part of the deal.

You just can't let a piece of software live its own life, particularly when it's a distributed app, even more if it's a webapp (because you have even less control over the "client runtime environment", i.e. the browser)

That's the kind of "Enterprise world" behavior I'm talking about:
  • Tomcat 5.5, GWT 1.7, Java 5: http://stackoverflow.com/q/14620961/116472
  • Maven 2, GWT 1.7, GXT 2.0.1: http://stackoverflow.com/q/14583169/116472
  • JBoss ESB 4.7 locking down Eclipse to 3.5: http://stackoverflow.com/q/14408205/116472
  • Glassfish 2.1.1 (released more than 3 years ago) not playing well with GWT 2.5 (release 3 *months* ago): http://stackoverflow.com/q/14345378/116472
  • GWT 2.0 needs maintenance, dev upgrades Eclipse (because the GPE no longer exists for 3.5) but not GWT: http://stackoverflow.com/q/14209846/116472
And they all happened in January 2013 !!!

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

error to the load css file

Hi,

I´m developing an application in GWT and when I want to load a style sheet, the app tell me the next mistake:

CSS file "location css file" is missing

I´m putting a logic direction, such as this: com.afc.client.recurso and the uiBinder file is: com.afc.client.entrypoint.interfaz


I don´t understand the reason of this mistake because I´m doing similar to page of google: "https://developers.google.com/web-toolkit/doc/latest/DevGuideUiBinder#Hello_Stylish_World"

Thanks.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.