On 16 juil, 16:30, rlebosse <[email protected]> wrote:
> Hi everybody,
> I'm trying to change the arrow icons of the GWT disclosure panels. I
> made it in a GWT class.
>
> public interface CustomDisclosurePanelImages extends
> DisclosurePanelImages
> {
> public AbstractImagePrototype disclosurePanelClosed();
>
> public AbstractImagePrototype disclosurePanelOpen();
> }
>
> CustomDisclosurePanelImages cdpi = (CustomDisclosurePanelImages) GWT
> .create(CustomDisclosurePanelImages.class);
Isn't the DisclosurePanelImages ImageBundle @Deprecated?
> However, my DisclosurePanel is created into an XML file. Do you know,
> how, in the XML file, I can say it has to take
> CustomDisclosurePanelImages images.
DisclosurePanel has a specialized parser in UiBinder, which looks for
openImage and closeImage attributes on the header child element, that
matches the same-name ImageResource arguments from the constructor.
Those ImageResource would have to come from either a ClientBundle
loaded with <ui:with>, or the implicit ClientBundle with images linked
to with <ui:image>.
For example (untested):
<ui:image field="disclosurePanelClosed" />
<ui:image field="disclosurePanelOpen" />
> <g:HTMLPanel>
> <g:DisclosurePanel ui:field="sessions" stylePrimaryName='menu'>
> <g:header>Sessions</g:header>
<g:header openImage="{disclosurePanelOpen}"
closeImage="{disclosurePanelClosed}">Sessions</g:header>
> <g:HTMLPanel>
> <ul class='{eres.menu.menuItems}'>
> <li>
> <g:Anchor ui:field="sessionsTotal" styleName=''>Total</
> g:Anchor>
> </li>
> <li>
> <g:Anchor ui:field="sessionsByActivity" styleName=''>by
> Activity</g:Anchor>
> </li>
> </ul>
> </g:HTMLPanel>
> </g:DisclosurePanel>
> </g:HTMLPanel>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.