I want to build a component ,but I didn't get it .I just use the HelloWorld
as a example
interface like this:
@ComponentRole
public interface HelloWorld
{
String sayHello(String name);
}
and script like this :
@Component
@Named("hello")
@Singleton
public class HelloWorldScriptService implements ScriptService
{
@Inject
private HelloWorld helloWorld;
public String greet(String name)
{
return this.helloWorld.sayHello(name);
}
}
aa I use it in xwiki like this :
{{velocity}}
$services.hello.greet("aaa")
{{/velocity}}
but I didn't get the right result,I must make some mistakes at some steps
I'm not clear,can you help me,please .