I think I figured it out:
@InjectService("PageRenderQueue")
private PageRenderQueue pageRenderQueue;
Then in buildConstraints:
Page page = pageRenderQueue.getRenderingPage();
Messages msgs =
page.getRootComponent().getComponentResources().getMessages();
String myValue = msgs.get("myValue");
From there, you get the Environment and
peek(PropertyEditContext.class) to get the PropertyEditContext from
which you can: getPropertyId().
This appears to work. Very cool!
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Jun 18, 2009, at 6:45 PM, Norman Franke wrote:
Thanks!
The ValidationConstraintGenerator may work. Being new to T5 and all,
I assume it's possible to @Inject the current page into my
ValidationConstraintGenerator? Actually, I'd want the classpath to
the .tml so I can get the .properties.
Norman Franke
Answering Service for Directors, Inc.
www.myasd.com
On Jun 18, 2009, at 5:40 PM, Thiago H. de Paula Figueiredo wrote:
Em Thu, 18 Jun 2009 18:29:37 -0300, Norman Franke
<nor...@myasd.com> escreveu:
Next, I want to use BeanEditForm to edit the tables. I can't really
add @Id, @NonVisual, or @Validate to the classes, since they'll be
overwritten every time I re-generate the classes when I add or
modify
a table.
Take a look at http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html
, section "Customizing the BeanModel".
To add validation without touching entity class sources, take a
look at the ValidationConstraintsGenerator interface.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org