English 中文(简体)
集装箱标签的名称如何?
原标题:How can the name of a container tag id matter?

我撰写了一份WT/GAE(Java)附录。 源自于WT的自动生成的单词例子产生了这样的法典:

<table align="center">

  <tr>
    <td colspan="2" style="font-weight:bold;">Please enter your name:</td>
  </tr>

  <tr>
    <td id="nameFieldContainer"></td>
    <td id="sendButtonContainer"></td>
  </tr>

在客户对口的 Java( Java形)中,它可使用诸如:

final Button sendButton = new Button("Send");
final TextBox nameField = new TextBox();
nameField.setText("GWT User");

我增加了一个集装箱领域,以显示,我可以通过使用超文本元素(即一些StuffContainer)增加一个链接。 我还增加了另一个有待填补的领域,即向太平洋共同体秘书处服务局发出关于“URL”标志:标志 UrlContainer. (Yes,我知道现在有更简单的方式这样做:)。 GWT/GAE(Java):当与GAE相结合时,用户的认证和记录并不真正有效。 我只想看到我是否能够工作。 请注意,一些StuffContainer刚刚到场进行这种控制性试验:将“URL”从填充“URL”与服务器方面生成的标志性链接分开;这将与下文有关。

  <tr colspan="2">
    <td id="someStuffContainer"></td>
  </tr>
  <tr colspan="2">
    <td id="logoutUrlContainer"></td>
  </tr>

在客户的 Java( Java本),我这样做:

// make it clear that we can add something to the page
final HTML someStuffHTML = new HTML
  ("<a href=https://www.google.com/search?q=zap>some stuff 3</a>");

// provide the user with a logout URL; FIX: do this by just
// providing a link to a generic logout servlet, rather than by
// proactively creating the logout link here.
final HTML userStatusHTML = new HTML();
GWT.log("userStatusService.getStatus()");
userStatusService.getStatus
  ("/", new AsyncCallback<UserStatusServiceResponse>() {

    public void onFailure(Throwable caught) {
      GWT.log("userStatusService.onFailure()");
      LogUtil.logThrowable(caught);
    }

    public void onSuccess(UserStatusServiceResponse result) {
      GWT.log("userStatusService.onSuccess()");
      if (result.loggedIn) {
        userStatusHTML.setHTML("<a href=""+ result.logOutUrl+
                              "">log out</a>");
      } else {
        // FIX: we should actually redirect to the base page
        userStatusHTML.setHTML("<a href=""+ result.logInUrl+
                              "">log in</a>");
      }
    }
  });

RootPanel.get("someStuffContainer").add(someStuffHTML);
RootPanel.get("logoutUrlContainer").add(userStatusHTML);

这样做的意思是,方案超文本显示并点击用户出的 log木。 (见这项工作,你必须打开另一个表格中的 log;如果你去另一页,则关在GWT devmode plugin freaks;似乎进入一个它只是抱怨需要重新编造,而且你可以摆脱这一状态的国家。) 此外,你不得不打上重载重机,要求你再次登录;如果你被拖出,客户方仍在运行,那么,除非在服务器方面,你正在对用户进行检查,否则你就能够保持照相。

在我看来,集装箱田地“logoutUrlContainer”的名称根本就不应存在。 因此,在检查我的想法之前,我会清理该守则,将其改成一个更一般性的版本,这反映了我可能把该集装箱用于更一般的用户状况植被。 因此,我更名为“logoutUrlContainer”改为“用户StatusContainer”;我更名为“logout UrlContainer”在.html和客户——Java(与Javales相比)。 如今,这条路线不是工作,而是完全例外:

RootPanel.get("logoutUrlContainer").add(userStatusHTML);

I m 一位经验丰富的密码: 我确信会复制和复制,使护卫能够跟上。 我用在胚胎中的搜索功能进行了检查。 我用ant清清理整个项目。 在整个项目中,我用碎块收集任何双亲档案(例如集体档案),这些档案可能因ant干净而错失,有些how仍然含有旧名称。 我重新启用了服务器,杀死了装有电灯的浏览器表等。 我一再这样做。 一再,我只获得一个无效的例外。 我认为,我已经多次这样做了至少一个小时。 请注意,一些StuffContainer一直工作;一些独木舟总是找到,而没有找到用户。 最后,在绝望中,我刚刚点名了再次铺设的集装箱。 它立即运作。 我检查。

What the heck is going on? Is ant clean missing something? Here is my ant clean target, which I extended myself:

  <target name="clean" description="Cleans this project">
    <delete  dir="gwt-unitCache" failonerror="false" />
    <delete  dir="war/myapp" failonerror="false" />
    <delete  dir="war/WEB-INF/classes" failonerror="false" />
    <delete  dir="war/WEB-INF/lib" failonerror="false" />
    <delete  dir="war/WEB-INF/deploy" failonerror="false" />
    <delete file="war/WEB-INF/appengine-web.xml" failonerror="false" />
    <delete file="war/WEB-INF/web.xml" failonerror="false" />
  </target>

我没有删除所有的战争/WEB-INF,唯一的理由是,我用任择的 app子来召集Javaston Appjet,而不是编辑H.xml本人的档案。

我的清洁目标没有什么? 这一经历确实使我不想使用WT。


Update: I think I know what happened: the javascript was recompiling, but it never occurred to me that the GWT development plugin would allow the page to be cached. Later I changed the welcome file list and the old welcome file was still displaying. Studying the configuration files, I couldn t think of any way that would be possible. Finally I just hit reload and the new file displayed.

不管怎样,打脚就可解释这一问题上所报告的错误。 我不知道WT正在做些什么,使该网页能够安放,特别是在牛津。 我想,经过15年之后,我会想到这一点。 然而,我无法想象,人们怎么可能如此lo淡,特别是在发展框架中。


I m running an up-to-date version of OS X 10.6.8 (x86). My browser is Chrome: 16.0.912.63 (Official Build 113337) $ java -version java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode) I m using gwt-2.4.0.

问题回答

it seems to get into a state where it just keeps complaining that the app needs to be recompiled and you can t out of that state

这必须涉及以下事实:你正在bu,因此,Dev手法压倒了某些经过更新的汇编档案,以及当你 did倒时(并且不是在发展中方发射 app),它注意到缺失的档案和停机。 如果你想使用“dev”模式,则在新网页“url”上使用“recode>?gwt.codesvr=......

我怀疑,如果你补充一下,你的整个问题就会消失——你正在看到,RootPanel.get(“近距离”)与html网页对应的是。lyingPanel.get Back no, and add being calls on no.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签