Indeed.  Much Thanks!  

@Inject
private Messages messages;

// used for RDF objects 

 private String getLabel (String varName)
 {
       String key = varName + "-label";
       if (messages.contains(key)) return messages.get(key); 
       return TapestryInternalUtils.toUserPresentable(varName);
 }

////////////////////////////////////////////////////
// above method can be modified, cleaned up 

private String getPredicate (String varName)
{
  //not implemented but pseudo-code would be 

 // return replace spaces, if any, with underscore in getLabel(varName);

}


Minor issues that took me like an hour to fathom:  The labels were in dot 
properties file of the "single entity" view.  So did not get picked up at first 
by the list all view.  Had to copy that property file over to "list all" 
entities page.  To avoid this, just put all distinct labels that are to be 
identically rendered (i.e. same for all pages) in the global app.properties, 
reserving the "local" properties for just labels that are truly unique to that 
page or have to override the global.   


Thanks, again. 



On Monday, June 9, 2014 8:23 AM, Thiago H de Paula Figueiredo 
<thiag...@gmail.com> wrote:
 


Why don't you just adapt the code I've posted here?

@Inject
private Messages messages;

String componentId = ...;
String key = componentId + "-label";
if (messages.contains(key)) return messages.get(key);

return TapestryInternalUtils.toUserPresentable(componentId);

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

Reply via email to