如何在电子邮件中提供指向gwt应用内特定方法的超链接(但不是主页面) [英] How to provide hyperlink in email pointing to a specific method inside gwt app (but not main page)
问题描述
我的GWT应用程序的搜索结果以orderid列作为超链接。点击后,它会打开另一个显示详细信息的选项卡。
My GWT app has a search result with orderid column as hyperlink. On clicking, it opens up another tab which shows the details.
我想通过电子邮件在外部公开此特定功能
I want to expose this particular functionality externally say in an email
http://www.myapp.com/XYZApp.html?orderid = 1234
使用户可以在登录到应用程序后直接进入详细信息页面。在JSP世界中,它非常简单。
so that user can directly go to the details page after login to the App. In JSP world, it was pretty straightforward.
在GWT中可能的情况是,显示详细信息页面的调用不在主GWT模块中(XYZApp.html )
Is it possible in GWT given that the call to show up the details page is not in the main GWT module (XYZApp.html)
推荐答案
虽然我同意Jason的说法, MVP (gwt-presenter是一种实现,);和GWT很好地结合在一起,我不是一个大gwt-presenter的粉丝(太复杂了,IMHO)。所以如果你想为MVP推出你自己的框架或者不想使用MVP(切换到MVP可以是PITA,特别是当项目很大/复杂时),你可以使用 历史
类,GWT自带:
While I agree with Jason that MVP (which gwt-presenter is an implementation of, sort of ;)) and GWT go well together, I'm not a big fan of gwt-presenter (complicates stuff too much, IMHO). So in case you want to roll out your own "framework" for MVP or just don't want to use MVP (switching to MVP can be a PITA, especially if the project is big/complex), you can just use the History
class, that comes with GWT:
History.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(ValueChangeEvent<String> event) {
String url = event.getValue();
}
});
这篇关于如何在电子邮件中提供指向gwt应用内特定方法的超链接(但不是主页面)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!