I'm having the same problem...

On Dec 11, 2:07 pm, "[email protected]" <[email protected]> wrote:
> I just tried this (in 2.0GA), and I get errors in the generated code:
>
> ui.xml looks something like this:
>
> <trinity:ResizableDockLayoutPanel ui:field="rootPanel" unit="PX">
>         <trinity:south size="0">
> <trinity:ContentPanel ui:field="bottomPanel"></trinity:ContentPanel>
>         </trinity:south>
> ...
>
> it complains about a type mismatch, when looking at the generated code
> it is obvious why but not how to fix it:
>
>  public Widget createAndBindUi(final Trinity owner) {
>
>     bam.trinity.client.Trinity_BinderImpl_GenBundle
> clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay =
> (bam.trinity.client.Trinity_BinderImpl_GenBundle) GWT.create
> (bam.trinity.client.Trinity_BinderImpl_GenBundle.class);
>     bam.trinity.client.Trinity_BinderImpl_GenCss_style style =
> clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay.style
> ();
>     bam.trinity.client.ui.ContentPanel bottomPanel =
> (bam.trinity.client.ui.ContentPanel) GWT.create
> (bam.trinity.client.ui.ContentPanel.class);
>     com.google.gwt.user.client.ui.HTML left =
> (com.google.gwt.user.client.ui.HTML) GWT.create
> (com.google.gwt.user.client.ui.HTML.class);
>     com.google.gwt.user.client.ui.HTML right =
> (com.google.gwt.user.client.ui.HTML) GWT.create
> (com.google.gwt.user.client.ui.HTML.class);
>     com.google.gwt.dom.client.SpanElement headerspan = null;
>     java.lang.String domId0 = com.google.gwt.dom.client.Document.get
> ().createUniqueId();
>     com.google.gwt.user.client.ui.HTML f_HTML1 =
> (com.google.gwt.user.client.ui.HTML) GWT.create
> (com.google.gwt.user.client.ui.HTML.class);
>     bam.trinity.client.ui.ContentPanel content =
> (bam.trinity.client.ui.ContentPanel) GWT.create
> (bam.trinity.client.ui.ContentPanel.class);
>     bam.trinity.client.ui.ResizableDockLayoutPanel rootPanel = new
> com.google.gwt.user.client.ui.DockLayoutPanel
> (com.google.gwt.dom.client.Style.Unit.PX);
>
> On the last line here, the ResizableDockLayoutPanel is for some reason
> set to "new DockLayoutPanel" and not ResizableDockLayoutPanel..
>
> Maybe I did something dumb, but I can't really find it :)
>
> On Nov 7, 3:08 am, jd <[email protected]> wrote:
>
>
>
> > Here is a subclass I made to expose some functionality that might help
> > you
>
> >         class ResizableDockLayoutPanel extendsDockLayoutPanel
> >         {
> >                 public ResizableDockLayoutPanel(Unit unit)
> >                 {
> >                         super(unit);
> >                 }
>
> >                 public double getWidgetSize(Widget widget)
> >                 {
> >                     return ((LayoutData) widget.getLayoutData()).size;
> >                 }
>
> >                 public void setWidgetSize(Widget widget, double size)
> >                 {
> >                         ((LayoutData) widget.getLayoutData()).size = size;
> >                 }
>
> >                 @Override
> >                 public void insert(Widget widget, Direction direction, 
> > double size,
> > Widget before)
> >                 {
> >                         super.insert(widget, direction, size, before);
> >                 }
> >         }
>
> > On Nov 6, 8:00 pm, gkb <[email protected]> wrote:
>
> > > Hello all.
>
> > > I have a question concerning how to access/modify the size of a
> > >DockLayoutPanel'swidget outside of the *.ui.xml file in the java
> > > code.
>
> > > For instance, say I have aDockLayoutPanelwith a West widget and a
> > > Center widget as follows:
> > > {{{
> > > <g:DockLayoutPanelunit='EM'>
> > >     <g:west size='20'>
> > >        <layouts:WestWidget ui:field='westWidget' />
> > >     </g:west>
> > >     <g:center>
> > >       <layouts:CenterWidget ui:field='centerWidget' />
> > >     </g:center>
> > >   </g:DockLayoutPanel>}}}
>
> > > Is it possible to dynamically change the width of the westWidget
> > > somewhere in the associated java code, or can it only by modified in
> > > the *.ui.xml file.
>
> > > The problem is, I would like to be able to hide/show the westWidget
> > > and have the centerWidget fill the remaining space dynamically when
> > > the app is running,
> > > but changing the width of westWidget in the java code has no effect on
> > > the width of the West Pane of theDockLayoutPanelthat was hard-coded
> > > in, there is a disconnect between them.
>
> > > Any help would be greatly appreciated.
>
> > > Sincerely,
>
> > > George.

--

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.


Reply via email to