So say I have a component that wraps a grid like:

SomeGrid.tml
<t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">
<t:form>
  
  <t:grid/>
</form>
</t:container>

SomeGrid.java
   @SuppressWarnings("unused")
   @Component(parameters={"overrides=prop:overrides", ...other params...})
   private Grid grid;

   @Parameter(value = "this", allowNull = false)
   @Property(write = false)
   private PropertyOverrides overrides;

A component that contains SomeGrid.tml and it overrides a column:
SomeGridContainer.tml
<t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">
  <t:someGrid>
    <p:nameCell>test Some Grid Container</p:nameCell>
  </t:someGrid>
</t:container>

SomeGridContainer.java
   @SuppressWarnings("unused")
   @Component(parameters={"overrides=prop:overrides", ...other params...})
   private SomeGrid grid;

   @Parameter(value = "this", allowNull = false)
   @Property(write = false)
   private PropertyOverrides overrides;

A page that contains SomeGridContainer
MyPage.tml
  <t:someGridContainer>
    <p:nameCell>test Page</p:nameCell>
  </t:someGridContainer>
</t:container>

In SomeGrid and SomeGridContainer I have @SupportsInformalParameters and
inject ComponentResources and pass in the overrides.

in the Name column, "test Page" always shows. I then tried and removed
p:nameCell from myPage.tml and column displayed whatever was in the name
property of the current row.  So it seems p:nameCell in SomeGridContainer is
always ignored. Is this the right behavior? It would be nice if I can get
around this since I can define column parameters in the container component
and not have to redefine them in every page I use. And for cases where I
want to override the ones in the container I can define them in the page.
Anyways interesting behavior.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Grid-overrides-question-tp4807689p4807689.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to