Re: CellList with ListDataProvider does not get redrawn on data change
Seems like it is not possible to update ListDataProvider within callback function. I am trying to refactor to using AsyncDataProvider.. -- 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.
Re: CellList with ListDataProvider does not get redrawn on data change
Hi, I have exactly the same problem.. Either I misunderstood documentation or something is broken, still trying to find the way.. On Feb 2, 6:51 pm, Daniel Francisco wrote: > Hi. > > I'm working on a project with GWT 2.1 and mvp4g. In a view, I'm using > a CellList backed with a ListDataProvider. If I pass a List with data > when instantiating the ListDataProvider, the CellList shows this data. > The problem is that afterthat, the CellList never gets redrawn > whenever I change the list of ListDataProvider. I don't know what I am > doing wrong or if I missing something. I have looked into the > documentation and but I can't find anything. > > Here is the code: > > The UIBinder xml file: > > http://dl.google.com/gwt/DTD/xhtml.ent";> > xmlns:g="urn:import:com.google.gwt.user.client.ui" > xmlns:c="urn:import:com.google.gwt.user.cellview.client" > > xmlns:v="urn:import:net.universia.ferias.feriavirtual.backend.client.exhibi > tors.view"> > > .leftPanel { > padding: 15px 25px 15px 25px; > } > .rightPanel { > padding: 15px 25px 15px 25px; > } > .button { > margin-right: 8px; > } > .exhibitorList { > border: 1px solid black; > background-color: #EEE; > width: 250px; > height: 600px; > } > .moduleList { > } > > > > > spacing="8"> > Expositores > addStyleNames='{style.exhibitorList}' > width="250px" height="600px"> > ui:field="exhibitorList" /> > > addStyleNames='{style.button}'>Editar > > > > spacing="8"> > Expositor X > > addStyleNames='{style.button}'>Nuevo módulo > addStyleNames='{style.button}' enabled="false">Editar > módulo > addStyleNames='{style.button}' enabled="false">Eliminar > módulo > > > > > > > > The View class: > > public class ExhibitorsAdminView extends Composite implements > ExhibitorsAdminPresenter.IExhibitorsAdminView { > > interface Binder extends UiBinder {} > > private static final Binder binder = GWT.create( Binder.class ); > > private static class ExhibitorCell extends AbstractCell { > @Override > public void render(Cell.Context context, Exhibitor exhibitor, > SafeHtmlBuilder sb) { > if (exhibitor != null) { > sb.appendEscaped(exhibitor.getName()); > } > } > } > > private ListDataProvider exhibitorsDataProvider; > > private SingleSelectionModel exhibitorsSelectionModel; > > @UiField( provided = true ) > CellList exhibitorList; > > @UiField > Button editExhibitorButton; > > // @UiField(provided = true) > // CellTable moduleList = new CellTable(); > > public ExhibitorsAdminView() { > exhibitorsSelectionModel = new > SingleSelectionModel(Exhibitor.KEY_PROVIDER); > exhibitorList = new CellList(new ExhibitorCell(), > Exhibitor.KEY_PROVIDER); > exhibitorList.setSelectionModel(exhibitorsSelectionModel); > > exhibitorsDataProvider = new > ListDataProvider(getExhibitors()); > exhibitorsDataProvider.addDataDisplay(exhibitorList); > > exhibitorList.setPageSize(exhibitorsDataProvider.getList().size()); > > initWidget( binder.createAndBindUi( this ) ); > } > > public SingleSelectionModel getExhibitorsSelectionModel() > { > return exhibitorsSelectionModel; > } > > public ListDataProvider getExhibitorsDataProvider() { > return exhibitorsDataProvider; > } > > private List getExhibitors() { > List exhibitors = new ArrayList(); > for (int i = 0; i < 10; i++) { > exhibitors.add(new Exhibitor(i, "aaa")); > } > return exhibitors; > } > > public HasClickHandlers getEditExhibitorButton() { > return editExhibitorButton; > } > > } > > The presenter class: > > @Presen
Re: AdSense and GWT
I applied to A4A some time ago but nothing... -- 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.
Re: Assign handler to UiHandler
Oh 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: Assign handler to UiHandler
BTW right now I just call lastName.addBlurHandler... in constructor but would prefer using @UiHandler if possible. -- 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.
Assign handler to UiHandler
Hi, sorry I could not find this anywhere. I know I can add handler like this: @UiHandler("submit") void onClickCreate(final ClickEvent e) { if (check()) create(); else Window.alert(messages.wrongConditions()); } but how would I mimic this using UiBinder (UpperCaser class implements BlurHandler): lastName.addBlurHandler(new UpperCaser()); 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: Dropping support for ie6?
I am very aware of that (working for very big bank which is still at IE6)... Something has to be done. And there are already possibilities like Google Chrome Frame. -- 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: Dropping support for ie6?
+1 for dropping ie6 +1/2 for ie9 ;-) -- 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.
Announcing Chrome Developer Plugin support for Mac and Linux
http://googlewebtoolkit.blogspot.com/2010/12/announcing-chrome-developer-plugin.html -- 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: can I use java.util.UUID on client-side?
I can change the http://uuid-service.appspot.com to allow requesting group of UUID for a single request. On 23 lis, 13:26, Slava Lovkiy wrote: > Current solution i have is to generate a batch of guids on the server, > send it to the client once, at the initialisation of the app. Client > will use the guids from the batch, gradually exhausting the pool. The > refill of the pool is done when it is about to run out of available > guids using asynch call to the server. > > This solution has one flaw: due to the fact of asynchronous nature of > guids pool refill, client may run out of guids completely, throwing an > error something like 'outOfIndex'. So, it would be much easier to have > guid generated available to the client to avoid the issue above. > > On Nov 23, 8:40 am, Jim Douglas wrote: > > > > > > > > > For the general question of "Is [x] implemented in GWT", bookmark: > > >http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html > > > For possible GWT-friendly UUID implementations, see: > > >http://www.google.com/search?q=gwt+uuid > > > FWIW, when I need a UUID in my GWT application, I find it easiest to > > generate it on the server, then send it to the client. > > > On Nov 22, 1:28 pm, Slava Lovkiy wrote: > > > > Hi, > > > > Is there a way to be able to use the same java.util.UUID.randomUUID() > > > generator on server and client side? > > > > This might be particular useful, when some ids needs to be generated > > > on the client and then persisted on the server. > > > > Is there a better solution to solve the more general problem - some > > > entities may originate on the client and a complex graph can be > > > created with relatationships bases on ids. The ids must be globally > > > unique after persisting data on server. -- 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: can I use java.util.UUID on client-side?
Why not firing request for new GUID group right after you receive asynch reply. Thereby you would always have fresh group of GUIDs available (given you request big enough group). On 23 lis, 13:26, Slava Lovkiy wrote: > Current solution i have is to generate a batch of guids on the server, > send it to the client once, at the initialisation of the app. Client > will use the guids from the batch, gradually exhausting the pool. The > refill of the pool is done when it is about to run out of available > guids using asynch call to the server. > > This solution has one flaw: due to the fact of asynchronous nature of > guids pool refill, client may run out of guids completely, throwing an > error something like 'outOfIndex'. So, it would be much easier to have > guid generated available to the client to avoid the issue above. > > On Nov 23, 8:40 am, Jim Douglas wrote: > > > > > > > > > For the general question of "Is [x] implemented in GWT", bookmark: > > >http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html > > > For possible GWT-friendly UUID implementations, see: > > >http://www.google.com/search?q=gwt+uuid > > > FWIW, when I need a UUID in my GWT application, I find it easiest to > > generate it on the server, then send it to the client. > > > On Nov 22, 1:28 pm, Slava Lovkiy wrote: > > > > Hi, > > > > Is there a way to be able to use the same java.util.UUID.randomUUID() > > > generator on server and client side? > > > > This might be particular useful, when some ids needs to be generated > > > on the client and then persisted on the server. > > > > Is there a better solution to solve the more general problem - some > > > entities may originate on the client and a complex graph can be > > > created with relatationships bases on ids. The ids must be globally > > > unique after persisting data on server. -- 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: can I use java.util.UUID on client-side?
you may use http://uuid-service.appspot.com On 22 lis, 22:40, Jim Douglas wrote: > For the general question of "Is [x] implemented in GWT", bookmark: > > http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html > > For possible GWT-friendly UUID implementations, see: > > http://www.google.com/search?q=gwt+uuid > > FWIW, when I need a UUID in my GWT application, I find it easiest to > generate it on the server, then send it to the client. > > On Nov 22, 1:28 pm, Slava Lovkiy wrote: > > > > > > > > > Hi, > > > Is there a way to be able to use the same java.util.UUID.randomUUID() > > generator on server and client side? > > > This might be particular useful, when some ids needs to be generated > > on the client and then persisted on the server. > > > Is there a better solution to solve the more general problem - some > > entities may originate on the client and a complex graph can be > > created with relatationships bases on ids. The ids must be globally > > unique after persisting data on server. -- 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: de-serialization of UUID via deRPC
I do not know why it does not work but you can use one of many UUID generators on the web: http://uuid-service.appspot.com On Oct 6, 10:58 pm, Asaf wrote: > Hello, > > I have a servlet which extends RpcService that exposes this method: > > public java.util.UUID getUUID() { > return UUID.randomUUID(); > > } > > In client side, invoking this method initiates an object in client > side but looses all of its values, > Looking at UUID class, it implements java.io.Serializable interface > and has some serializable properties such as 'mostSigBits', > 'leastSigBits' > > I'm aware that java.util.UUID is not emulated in GWT JRE, but I have > my own implementation in client side (which AFAIK is not in use by dev- > mode anyway), > > What is the reason that in dev-mode the de-serialized UUID object has > no values at all? is it somehow related to the fact that I am > overriding UUID with super-source tag or something like that? > > Thanks in advanced, > > Asaf. -- 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: Who is the owner of gwtnews.blogspot.com?
Oh cool, now I know why I get so much spam since I am member of the group... Could you the owner of the blog stop collecting.. Thanks! On Sep 29, 1:17 pm, Shedokan wrote: > Hello, > I am getting tons of spam lately, and I found out spam bots can find > me by a simple google search because these two blogs archive GWT > conversaions and keep full emails intact: > gwtnews.blogspot.com > gwtletter.blogspot.com > > So whoever is the owners of these blogs, I would like to kindley ask > you to remove my email addresses from these > posts:http://gwtletter.blogspot.com/2010/06/digest-for-google-web_3092.htmlhttp://gwtnews.blogspot.com/2010/09/re-how-can-i-get-class-by-its-nam...http://gwtnews.blogspot.com/2010/09/re-how-can-i-develop-gwt-apps-wit... > > And please remove all other emails if you can or hide a part of them > like in your most recent posts. > > Thank you. -- 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.
Updated maven strategy for GWT
http://googlewebtoolkit.blogspot.com/2010/08/updated-maven-strategy-for-gwt.html As part of the GWT team's ongoing work to provide better maven support, we are now publishing GWT milestones and release candidates to the Google snapshot repository. GWT 2.1M3 is now available as version 2.1-SNAPSHOT. If you're using Spring Roo with GWT, you'll notice that the Roo-generated POMs for M3 still point to the SVN repo. For this milestone release, the GWT jars are available from both the SVN repo and the Google snapshot repo. Beginning with M4, we plan to use only the Google snapshot repo. The GWT 2.1 release and minor point releases thereafter will be published to the maven central repository. To use the Google snapshot repository, put this in your pom.xml: google-maven-snapshot-repository Google Maven Snapshot Repository https://oss.sonatype.org/content/repositories/google-snapshots/ true -- 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: Full or Part Time Position available
Can somebody from Google please block this Saima Waseem, it is spamming all over Google Groups, thanks! On Jun 9, 2:30 pm, Saima Waseem wrote: > Make and extra income from home. International company seek motivated > individuals to work from home. Positions available data entry, research and > more.http://www.clicknearn.net/3527.html > > For further details Contact us > Address : 81 Badlis road Waltham stow, London > Website :www.clicknearn.net > Support Center : (All Clients & Members Contact Us Through Support Center. > Thanks)http://www.clicknearn.net/helpdesk/ -- 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: How many are actually fixing GWT bugs?
Maybe you could speed things up by working on the bugs by providing fixes so that the team only review and you just use your patched stuff :-). On May 7, 8:49 am, Manuel Carrasco Moñino wrote: > Hi all, > > As far as I know, lately the gwt team has been overworked preparing > the Google I/O. > Although there are many contributors who submit patches fixing issues > and adding new features, Google Team has to review and commit all the > patches. > May be the process was slow and could be speeded up, but honestly I > think is one of the most reliable procedures I've seen for an > opensource project, and It makes Gwt rock. > > Best regards > -Manolo > > > > > > On Fri, May 7, 2010 at 8:17 AM, Gal Dolber wrote: > > Maybe the gwt team isn't as big as you think > > > 2010/5/6 jbdhl > > >> The largst issue ID in the issues list > >> http://code.google.com/p/google-web-toolkit/issues/list > >> is 4918, and 1513 of these (33%) are still open. 33% seems relatively > >> many to me, and several among these are somewhat serious. It makes me > >> wonder how many people actually work on fixing these bugs, and how low/ > >> high priority bug fixing has in google. Does anyone know? > > >> -- > >> 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 > 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.
GWT 2.0.2
http://googlewebtoolkit.blogspot.com/2010/02/gwt-202-is-now-available.html Checked twice (yesterday evening, today afternoon) and Eclipse does not see this yet. Would you please check. Thanks. Peter -- 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: SubmitCompleteEvent.getResults on File upload
Thank you again Thomas, that makes sense now :-) Peter On 27 led, 12:18, Thomas Broyer wrote: > On Jan 27, 9:12 am, Peter Ondruska wrote: > > > Thanks Thomas, for me it was not > > obvious:http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...() > > > "Returns: the result html, or null if there was an error reading it" > > perhaps it would be more clear to state "Returns: HTML encoded result > > regardless of content type returned by servlet..." > > FormPanel submits to a hidden iframe, so it gets the result from the > iframe's content (hence the 'null' when you don't submit to the same > domain, because of the SOP), which is always seen as an HTML document, > even if it "represents" a text/plain or an image. > > The hint is in FormPanel's no-arg constructor's > javadoc:http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...() > """ > The back-end server is expected to respond with a content-type of > 'text/html', meaning that the text returned will be treated as HTML. > If any other content-type is specified by the server, then the result > HTML sent in the onFormSubmit event will be unpredictable across > browsers, and the onSubmitComplete event may not fire at all. > > Tip: > The initial implementation of FormPanel specified that the server > respond with a content-type of 'text/plain'. This has been > intentionally changed to specify 'text/html' because 'text/plain' > cannot be made to work properly on all browsers. > """ -- 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: SubmitCompleteEvent.getResults on File upload
Thanks Thomas, for me it was not obvious: http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/FormSubmitCompleteEvent.html#getResults() "Returns: the result html, or null if there was an error reading it" perhaps it would be more clear to state "Returns: HTML encoded result regardless of content type returned by servlet..." On 27 led, 01:38, Thomas Broyer wrote: > On 27 jan, 00:43, mably wrote: > > > A solution to this problem anyone ? > > The JavaDoc says "send back text/html". Follow this advice, really > (just pay attention to "<" and "&" chars that might appear in your > output). > > > > > On 28 déc 2009, 14:58, Peter Ondruska wrote: > > > > response.setContentType("text/plain");– Skrýt citovaný > > > text – > > – Zobrazit citovaný text – -- 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 opportunity in Denver area with Fortune 10 client
Dear poster, not sure if this is off-topic for others but for me it definitely is (and I will leave it for others to mark your post as spam). Please see http://groups.google.com/group/google-web-toolkit/web/gwt-discussion-group-charter. As the number of similar postings is growing I would suggest you start your own group where those who are interested will seek for and offer GWT related jobs. Thank you for understanding and please, let's not follow this discussion publicly (there is reply to author available). Peter On Jan 8, 10:31 pm, Carolyn Gioia - TEKsystems wrote: > Hello all! > > I have an opportunity in the Denver metro area with a Fortune 10 > client. It is a 6 month rolling contract. > > Our client's team is building a key tool for their application > release. Our developer will be focused on re-writing an existing > application to make it compliant with government standards. They will > be replacing a senior java developer who is leaving the organization. > This resource must have design and development experience with Google > Web Toolkit on client/server applications using the Hibernate and > Spring frameworks. This is a senior role, so a minimum of six months > of GWT experience is required, and they must have worked with the > technology where a product is being created for release to the market. > This group works across all three tiers in a client server multi- > threaded environment, so the qualified candidate must be able to > design and develop applications this way. > > They are using the Hibernate framework for their middle tier to back- > end, JDK 1.5(1.6 now), Spring MVC, and Google web toolkit for there UI > all interacting with Oracle databases. > > 6 months of real world GWT experience > Five plus year of Java development in a client server environment. > 2 years of development experience with Hibernate and Spring > One year of development directly to the database without using a > framework. > > Client will be interviewing in person only. Candidates will not be > hired over phone interviews. > > *If interested please reply to cgi...@teksystems.com or call me > directly (303) 412 - 2736 -- 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: SubmitCompleteEvent.getResults on File upload
public class Upload extends HttpServlet { private static final long serialVersionUID = -7859156850837921885L; private final Logger logger = Logger.getLogger(getClass().getName()); @SuppressWarnings("unchecked") @Override protected void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/plain"); if (!ServletFileUpload.isMultipartContent(request)) return; final PersistenceManager pm = PMF.get().getPersistenceManager(); final ServletFileUpload upload = new ServletFileUpload(); upload.setSizeMax(1024*1024-256); try { final FileItemIterator iterator = upload.getItemIterator(request); while (iterator.hasNext()) { final FileItemStream fis = iterator.next(); if (!fis.isFormField()) { final String name = fis.getName(); final String mimeType = fis.getContentType(); // TODO overwrite existing if owner matches final InputStream is = fis.openStream(); final Blob blob = new Blob(IOUtils.toByteArray(is)); final Document document = new Document(name, mimeType, blob); final UserService us = UserServiceFactory.getUserService(); final User user = us.getCurrentUser(); document.setOwner(user); pm.makePersistent(document); Cache cache = null; try { CacheFactory cacheFactory = CacheManager.getInstance ().getCacheFactory(); cache = cacheFactory.createCache(Collections.emptyMap()); cache.put("docname~" + name, blob.getBytes()); cache.put("doctype~" + name, mimeType); } catch (CacheException e) { logger.log(Level.SEVERE, "failed to configure cache", e); } } } response.getWriter().write("OK"); } catch (SizeLimitExceededException e) { response.getWriter().write("Too big"); } catch (FileUploadException e) { logger.log(Level.SEVERE, null, e); } finally { pm.close(); } } } On 28 pro, 10:56, Andrés Cerezo wrote: > I need more information, can yoyu sen the source code of the program.java ? > > Thanks. > > 2009/12/26 Peter Ondruska > > > > > My upload servlet successfully accepts data however the response sent > > is not what I expect: > > > OK > > > instead of just: > > > OK > > > The servlet basically responds with: > > > response.setContentType("text/plain"); > > response.getWriter().write("OK"); > > > I have tried with curl to post something and servlet (GAE/J SDK) sends > > only "OK" but in GWT application I see *OK* when calling event.getResults > > (). > > > Any clue what am I doing wrong? > > > -- > > > 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.– Skrýt citovaný > >text – > > – Zobrazit citovaný text – -- 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.
SubmitCompleteEvent.getResults on File upload
My upload servlet successfully accepts data however the response sent is not what I expect: OK instead of just: OK The servlet basically responds with: response.setContentType("text/plain"); response.getWriter().write("OK"); I have tried with curl to post something and servlet (GAE/J SDK) sends only "OK" but in GWT application I see *OK* when calling event.getResults (). Any clue what am I doing wrong? -- 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: Hyperlink ClickHandler help
Yes, I was thinking about it but reading javadoc for Anchor says: "If you want use this anchor only for changing history states, use Hyperlink instead." I will do as you suggest, I am reading too much, instead of writing code myself :-) Thanks. Peter On Dec 24, 2:54 pm, Matt Moriarity wrote: > Perhaps you should be using an Anchor widget instead of a Hyperlink. > If you still need to link in with the history mechanism, you can have > your click handler call History.newItem > > On Dec 23, 9:05 am, Peter Ondruska wrote: > > > > > Dear all, > > > In GWT 2.0 Hyperlink.addClickHandler is deprecated and I should use > > FocusWidget.addClickHandler. However no matter how hard I try I cannot > > get this working. Would you help me please with an example of how to > > add ClickHander to Hyperlink in GWT 2.0. > > > Thank you, > > > Peter -- 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.
NumberFormat.getCurrencyFormat
I have default locale set to "en" and would like to format currencies, e.g. NumberFormat.getCurrencyFormat("CZK").format(c) but it fails as CZK (Czech Crown) is not available in "en". How would I do that without switching to "cs" locale? -- 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.
Hyperlink ClickHandler help
Dear all, In GWT 2.0 Hyperlink.addClickHandler is deprecated and I should use FocusWidget.addClickHandler. However no matter how hard I try I cannot get this working. Would you help me please with an example of how to add ClickHander to Hyperlink in GWT 2.0. Thank you, Peter -- 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: Has anybody ever implemented java.util.UUID in GWT?
Why not using something that is available, e.g. http://uuid-service.appspot.com On Oct 26, 11:19 pm, Benju wrote: > Has anybody here successfully managed to implement java.util.UUID in > GWT? I have seen some examples of a GWT-specific UUID but it would be > nice if it was added to the core JRE emulation library. > > Any thoughts? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Google Webmasters: A proposal for making AJAX crawlable
This is interesting as this topic has been discussed many times in the past: http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---