开发者

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

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 Usi开发者_如何学Pythonng 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜