At this point we can change the way users login, or the appearance of the application.
In this case we will show an image of the project in the HomePage.class First we create a new class, ViewScroogeConstants, with the following code:
public class ViewScroogeConstants {
public static final String HEADER_HTML = "<a href=\"http://scrooge.germinus.com/inicio\"> <img src='./scrooge.jpg'/>";
public static final String FOOTER_HTML = "© 2008 Informática Gesfor";
public static final String PAR_HOME_PAGE = "homePage";
public static final String PAR_HELP = "help";
}
Now we must copy scrooge.jpg to the /scrooge/WebContent directory and then add this code to HomePage.java:
@ViewField(render = ViewConstants.RENDER_HTML, layout = "screen:header")
public String getHeader() {
return ViewScroogeConstants.HEADER_HTML;
}
@ViewField(render = ViewConstants.RENDER_HTML, layout = "screen:footer")
public String getFooter() {
return ViewScroogeConstants.FOOTER_HTML;
}
With this code we are creating a header with the project image, and a footer with the copyrights.
Now we create two new buttons instead of the old User button. We add this code to HomePage.java:
@FlowAction(next=BaseAccountMain.class)
public void Register() {}
@FlowAction(next=CustomLogin.class)
public void Login() {}
By modifying the .xml files contained in each one of the CRUD packages, we can customize the appearance of the filter, instances or listed classes.
0 Ficheros adjuntos