>> public Object doSomethingUseful(Object someParameter, Messages messages)
{...} 
Yes, exactly

In your page/component class:
@Inject
private Messages messages;

@Inject
MyService myService;

private Object myValue;

public final Object getValueFromService() {
  return this.myService.doSomethingUseful(this.myObject, this.messages);
}

In your tml:
<t:output t:value="valueFromService" ... />
(I try to do method calls with parameters in the java code and avoid them in
the tml, but that is a question of taste). 


-----
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/component-scope-service-with-injected-messages-tp4724993p4749543.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