Dear Wiki user, You have subscribed to a wiki page or wiki category on "Shale Wiki" for change notification.
The following page has been changed by Hermod Opstvedt: http://wiki.apache.org/shale/CreatingClayComponents ------------------------------------------------------------------------------ Now the time has come to design the form it self, the way we want it. By that we mean how it will look when we have completed our person registration component. We do this so that we have something to compare our component against. This also simulates the situation where we have been handed a html mockup from our designers, and we are now to create a dynamic implementation of it. In our case we want it to look like this: - attachment:ShaleClaydir9.png + attachment:ShaleClay9.png As we can see from the design, there are two distinct blocks of information here, and would be natural to break this down into two components first. By so doing we can also reuse these by them self in another case. When we take a second look at it we see that there is a repetition of equal components; 2 labels and 2 input fields. We could of course created a component that was a combination of firstname label and firstname input field, but it would be cumbersome over time to have to create new components for different attributes (lastname, streetadress etc.). In some cases that is desirable though to ensure consistency everywhere (We will be creating such a component too). Instead we create a generic label/input combination. This we can then reuse for any attribute. We have two alternatives for how we create it, as an XML definition in the Clay configuration file, or as a HTML mockup with Clay annotations. To demonstrate both we will use the XML variant for the name panel and HTML for the address panel. We will start with the name panel, so lest try to define it.
