GWT declarative parental porosity layout

I created a similar stack

<g:StackPanel ui:field="ticketsPanel">    
  <g:VerticalPanel g:StackPanel-text="Tickets">
   <g:Hyperlink targetHistoryToken='newTickets'>New tickets</g:Hyperlink>
   <g:Hyperlink targetHistoryToken='myTickets'>My tickets</g:Hyperlink>
   <g:Hyperlink targetHistoryToken='allTickets'>All tickets</g:Hyperlink>
  </g:VerticalPanel>
  <g:VerticalPanel>
   <g:Hyperlink>Preferences</g:Hyperlink>
   <g:Hyperlink>My information</g:Hyperlink>
 </g:VerticalPanel>

As you can see, each VerticalPanel has a property g:StackPanel-textthat defines the name in the StackPanel. I found this using the example on the forum, but I can’t find any documentation or literature about what is going on here ... Is this some kind of “back link” to the parent property? Does this mean that I can always use something like g:ParentClass-randomProperty="test"?

Any pointer to documentation about this would be really helpful. Thank!!!

+3
source share
1 answer

Look at the class com.google.gwt.uibinder.elementparsers.StackPanelParser, especially the method parse(..).

StackPanel-text (ATTRIBUTE_TEXT) add (Widget, String) ( 49) StackPanel ( - ticketsPanel.add(f_VerticalPanel1, "Tickets");).

, .

+1

Source: https://habr.com/ru/post/1776908/


All Articles