草庐IT

gwt-hosted-mode

全部标签

java - GWT、Google App Engine、TimerTask 或 ServiceImpl 中的 Thread 抛出异常

我正在使用GWT和GoogleAppEngine。我有一系列记录,我想每30分钟更新一次。在ServiceImpl中,我有以下代码:newTimer().schedule(newTimerTask(){@Overridepublicvoidrun(){try{Thread.sleep(30000);}catch(InterruptedExceptione){e.printStackTrace();}result=updateFeeds();}},30000,Long.MAX_VALUE);当我运行应用程序时,当我得到:com.google.gwt.user.server.rpc.Une

java - 在 GWT 中使用 Google Common Collection

这是一个简单的问题,但我遇到了问题......我试图在GWT客户端代码中使用Google公共(public)集合的Objects.equal()方法,但我一直收到错误20:12:10.001[ERROR][gwt_regex]Line39:Nosourcecodeisavailablefortypecom.google.common.base.Objects;didyouforgettoinheritarequiredmodule?试图通过Google寻找答案,但找不到任何关于此的答案-每个人都只是说“Google集合应该与GWT开箱即用”。 最佳答案

java - Spring 启动 MailConnectException : Couldn't connect to host, 端口 : localhost, 25;超时-1;

IknowmassivenumberofquestionsisaskedintheContextofthisMailConnectException,butmyissueisbitdifferent我遇到了SpringbootApp的奇怪行为,下面提供的代码让我解释了两个场景:STMP设置spring.mail.default-encoding=UTF-8spring.mail.host=smtp.mailtrap.iospring.mail.username=2fcc984a833f26spring.mail.password=notMypasswordspring.mail.por

java - GWT:在服务器代码中访问 i18n 消息

我有一个扩展com.google.gwt.i18n.client.Messages类的接口(interface),我用它来在我的GWT应用程序中检索i18n消息。它看起来像这样:publicinterfaceMyMessagesextendscom.google.gwt.i18n.client.Messages{@DefaultMessage("Helloworld")@Key("message1")Stringmessage1();@DefaultMessage("Helloagain")@Key("message2")Stringmessage2();//...}通常,我使用GWT

java - 在 gwt 应用程序中滚动到页面顶部

我有一个gwt应用程序,我想使用此方法滚动到页面顶部:publicstaticnativevoidscrollTop()/*-{$wnd.scroll(0,0);}-*/;该方法在TreeNodeListenerAdapter的onClick方法中调用:newTreeNodeListenerAdapter(){@OverridepublicvoidonClick(Nodenode,EventObjecte){scrollTop();}}这不起作用,我不知道为什么。当我在我的方法中放置一个警报时:$wnd.alert("Treenodeclicked");我看到了警报,但页面没有滚动。我

java - 如何将 html 与 gwt 小部件混合?

我尝试生成动态gwt用户界面。结果我会得到这样的html片段:MyLabel标签应该是GWT标签,输入应该是GWT文本框。我如何使用GWT实现这一目标?我试过使用HTMLPanel类,但我怎样才能注入(inject)标签?我不能使用UIBinder,因为我想动态创建如上所示的片段。 最佳答案 您应该创建自己的ComplexPanel的子类.这将为您提供与HorizontalPanel大致相同的功能。或VerticalPanel,仅基于列表元素而不是表格元素。它应该看起来像这样:publicclassOListPanelextends

java - 如何使用 com.google.gwt.user.datepicker.client.DateBox 限制可用的日期范围

我需要限制用户可以从com.google.gwt.user.datepicker.client.DateBox中选择的Date。我似乎无法弄清楚如何限制最小Date以便他们无法选择过去的日期。如果我不能用com.google.gwt.user.datepicker.client.DateBox做到这一点,是否有一个替代的DateBox小部件可以让我这样做灵active? 最佳答案 根据我收到的建议,以下是我提出的将可选日期限制为仅当天及之后的建议。这适用于GWT2.1.1finalDateBoxdateBox=newDateBox(

vscode报错 “The remote host may not meet VS Code Server‘s prerequisites for glibc and libstdc++” 解决方法

报错信息:TheremotehostmaynotmeetVSCodeServer’sprerequisitesforglibcandlibstdc++报错原因:由于vscode自动更新版本为vscode1.86(没更新前的版本为1.85.2),该新版本更新了对glibc的要求,需要最低2.28版本,导致各种旧版本的linux发行版(比如最常见的centos7)都无法用remote-ssh来连接了,会一直控制台报错waitingforserverlog。解决方法:1、回退版本到1.85.2,同时永久禁用更新,但这样本地开发的时候也不能使用vscode的最新特性了,不推荐2、使用1.85.2的po

java - GWT Celltable 只显示 15 行

我遇到了一个问题,我们的单元格表只显示15行。我有类似以下内容://assumetheseareinitialisedcorrectlyintheconstructorprivatefinalCellTabledataTable;privateDataModeldataModel;privatevoidinitialize(){dataTable.setRowData(0,data.getDataList());dataTable.setRowCount(data.getDataList().size());}现在getDataList()返回List大小为18的对象,但由于某种原因它

java - 我应该如何解决 java.lang.IllegalArgumentException : protocol = https host = null Exception?

我正在开发一个SSL客户端服务器程序,我必须重用以下方法。privatebooleanpostMessage(Stringmessage){try{StringserverURLS=getRecipientURL(message);serverURLS="https:\\\\abc.my.domain.com:55555\\update";if(serverURLS!=null){serverURL=newURL(serverURLS);}HttpsURLConnectionconn=(HttpsURLConnection)serverURL.openConnection();conn