Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
Beta2 - ContentPanel has no setAppearance() method
From example:
Code:
<gxt:ContentPanel appearance="{accordionLayoutAppearance}" animCollapse="false" bodyStyleName="pad-text" headingText="Settings">
<g:Label text="{dummyTextShort}" />
</gxt:ContentPanel>
But ContentPanel has not setAppearance() method.
And it has no @UiConstructor annotation.
Field "appearance" is set only in construction.
What do I miss?
Is it bug?
-
Ext GWT Premium Member
No, this is not a bug.
I think you are looking for a FramePanel.
-
Sencha User
Hm...
1. But example uses ContentPanel. I don't understand how it could work. But I've not tried to compile my Beta2 Explorer example, I use online version.
2. FramePanel extends ContentPanel, but does not add setter for Appearance or @UiConstructor marked constructor.
-
Sencha User
Hi,
What is the bottom line in order to create an accordion like presentation ?
The 3.0 demo use a ContentPanel as stated by Konstantin.
The suggestion for using the FramedPanel does not solve the issue as there is no setAppearance() method in the FramedPanel.
I checked the javadoc, but cannot find a suitable component that could work.
Anyone found a possible solution for the accordion ?
Thanks per advance
-
Ext GWT Premium Member
Have you checked the constructor?
As far as I know, appearance is always set within the constructor.
So I would try: new ContentPanel(ContentPanelAppearence appearence) ...
-
Sencha User
Hi,
Thanks for the answer. I was wonderning how to use the accordion via the UiBinder.
I suppose that in that case a setter is required ?
-
Ext GWT Premium Member
I don't use UiBinder .... :-)
But I would look for something like appearence="..." or use addStyleName in the ui.xml ...
Hope that helps.
-
Sencha User
Well, as I told in first message, there is constructor which accepts Appearance, but it is not marked with @UiConstructor, so UiBinder does not use it.
And yes, this is UiBinder.
-
I wrote this reply for another thread, and I think Konstantin saw it there, but other users may find this helpful:
There are lots of options when replacing an appearance. If making the change across your entire app, you should be using a replace-with in your module file. If making the change for every instance in a single uibinder class, a zero-arg @UiFactory method can work (or one that takes an appearance arg like this example). If making a change for each instance within a uibinder class, consider creating the instances ahead of time in code, by specifying @UiField(provided = true) and creating the instance in the field.
One more option for occasional reuse - make a subclass of the widget, with a no-arg constructor, calling the super constructor with a specific appearance. This is what is done in FramedPanel for a framed ContentPanel.