How do you let UiBinder pass tags without binding them so XFBML works?

北战南征 提交于 2019-12-23 12:36:39

问题


I have an application designed that's using GWT and UiBinder. Now we're trying to setup a login through facebook. I've included the script to init the fb javascript in my application's HTML, and I'm trying to get a facebook login button.

The Login.ui.xml contains a facebook login tag:

<ui:UiBinder
        xmlns:ui='urn:ui:com.google.gwt.uibinder'
        xmlns:g="urn:import:com.google.gwt.user.client.ui" >
    <g:HTMLPanel addStyleNames="login">
        <h2>Login Using Your Account</h2>
        <g:TextBox ui:field="username"/>
        <g:PasswordTextBox ui:field="password"/>
        <g:Button ui:field="loginButton">Login</g:Button>
        <fb:login-button/>
    </g:HTMLPanel>
</ui:UiBinder>

UiBinder won't allow this to be passed through as HTML because it's trying to bind it to something. I'm not sure how to tell UiBinder to ignore this tag, and let it pass through un-molested.

How can I either a) Allow the fb:login-button be ignored, or b) define an xmlns:fb tag that allow the definition of a non-GWT tag?


回答1:


Turns out it was as easy as adding xmlns:fb="http://www.facebook.com/2008/fbml". It shows up as an error in the editor for IntelliJ, but compiles and includes the tag.



来源:https://stackoverflow.com/questions/5806306/how-do-you-let-uibinder-pass-tags-without-binding-them-so-xfbml-works

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!