Hmm...
Why don't you do it in main? It's the one thing that knows about both.
Buttons.java:
@UiHandler("nextButton")
void onClickNext(ClickEvent click) {
getMain().onClickNext();
}
Main.java:
public void onClickNext(){
getTextFields.setText("something");
}
On Fri, May 28, 2010 at 10:19, Mark Schewe <[email protected]> wrote:
> First of all thank you for the answer.
> I am new to GWT so I am a bit confused and not know yet the correct
> terminology :)
>
> Main.ui.xml:
>
> <g:FlowPanel>
> <g:VerticalPanel>
> <r:TextFields /> // calls TextFields.ui.xml
> <r:Buttons /> // calls Buttons.ui.xml
> </g:VerticalPanel>
> </g:FlowPanel>
>
>
> Buttons.ui.xml:
>
> <g:HorizontalPanel>
> <g:Button ui:field="prevButton">prev</g:Button>
> <g:Button ui:field="nextButton">next</g:Button>
> </g:HorizontalPanel>
>
>
> TextFields.ui.xml:
>
> <g:VerticalPanel>
> <g:TextArea ui:field="taText" >blah</g:TextArea>
> </g:VerticalPanel>
>
>
> Buttons.java:
>
> @UiHandler("nextButton")
> void onClickNext(ClickEvent click) {
> // change text field in TextFields.ui.xml
> }
>
> In this last handler I need to access the textfield. I hope my problem
> is now easier to understand. I guess this has something to do with
> @UiFactory but I just don't get it.
>
> 2010/5/28 Tristan <[email protected]>:
> > like this?
> >
> > Buttons buttons = new Buttons();
> > TextFields fields = new TextFields();
> > buttons.setFieds(fields);
> > fields.setButtons(buttons);
> >
> > ??
> >
> > Can you elaborate?
> >
> > On May 28, 7:05 am, Mark <[email protected]> wrote:
> >> Hello,
> >>
> >> I need your help! I've got two files:
> >>
> >> Buttons.ui.xml / Buttons.java
> >> TextFields.ui.xml / TextFields.java
> >>
> >> Now I need to change the content of the TextFields in the Buttons and
> >> vice versa. Is it possible to do this without merging the two ui and
> >> java files? I hope you understand what I mean.
> >>
> >> Thank you very much for your help!
> >> Mark
> >
> > --
> > 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]<google-web-toolkit%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
> >
> >
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
--
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.