Saturday, April 19, 2014

Re: Creating tr / td's with UiBinder, how?

Hi
Mu uibinder contains 
My Uibinder page contains below code

<input name="data" type="text" class="form-control" placeholder="Enter data"  id="data"/>

I want to get data inserted in above textbox in my gwt class using DOM or some other way if any.

so please give me some example to retrieve it.


Thanks


On Monday, June 28, 2010 6:25:31 AM UTC+5:30, Thomas Broyer wrote:


On 28 juin, 01:59, Andrew Hughes <ahhug...@gmail.com> wrote:
> I don't want a <div> - as you point out this won't work... I would like to
> create a <tr> from UiBinder (with no <div> wrapping it).

But UiBinder internally uses a <div> to "parse the HTML" (see
UiBinderUtil.fromHtml)

Also, I didn't notice earlier, but you cannot use widgets that way,
they must be included within other widgets (only exceptions: some
custom parsers, and HTML markup inside an HTMLPanel, but they're still
descendant of a widget)
This means you'd have to use an HTMLPanel as the "root" of your
UiBinder. You could try using <g:HTMLPanel tag='tr'><td><g:Label ...></
td>...</g:HTMLPanel> but you'd still have a UiBinder<HTMLPanel,X>, not
a UiBinder<TableRowElement,X>, which changes drastically your "owner
class".

Another possibility, more a hack than anything else, include a <table>
in the UiBinder and then tweak the DOM at runtime to get rid of it
(and its, implicit in markup, <tbody> child).

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment