Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

Improve Popover Mixin #33

Open
capricube opened this issue Jan 26, 2013 · 0 comments
Open

Improve Popover Mixin #33

capricube opened this issue Jan 26, 2013 · 0 comments

Comments

@capricube
Copy link

You can simplify your Popover mixin if you inject the container component using the annotation @InjectContainer:

@MixinAfter
public class Popover
{
@InjectContainer
private ClientElement container;

@Inject
private JavaScriptSupport javaScriptSupport;

@BeginRender
void beginRender()
{
    javaScriptSupport.addScript("$('#%s').popover()", container.getClientId());
}

}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant