...
- Create a new RSF Hello World app using the App Builder.
- Add the component-api to the build path.
- Add the following code to the template tool/src/webapp/templates/HelloWorld.html:
Code Block <div rsf:id="optional-block:"> You have set myPropertyString to "<span rsf:id="property-value">value</span>". </div>
- Add the following code to the producer HelloWorldProducer.java:
within the class itself:
and within the fillComponents method:Code Block private ServerConfigurationService serverConfigurationService; public void setServerConfigurationService(ServerConfigurationService serverConfigurationService) { this.serverConfigurationService = serverConfigurationService; }
Code Block User currentUser = userDirectoryService.getCurrentUser(); UIOutput.make(tofill, "current-displayname", currentUser.getDisplayName()); UIOutput.make(tofill, "current-email", currentUser.getEmail());
- Add the injection to the tool/src/webapp/WEB-INF/requestContext.xml:
Code Block <property name="serverConfigurationService" ref="org.sakaiproject.component.api.ServerConfigurationService"/>
- Add the dependency to tool/project.xml (show them how to figure out the artifactId:
Code Block <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-user-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-component-api</artifactId> <version>${sakai.version}</version> </dependency>
- Compile and test.
...