SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 188 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

css, and change
them as required. Let's try something like this:
DIV.t-beaneditor
{
display: block;
background: white;
border: 2px solid green;
padding: 2px;
font-family: "Trebuchet MS", Arial, sans-serif;
}
DIV.t-beaneditor LABEL
{
width: 150px;
display: block;
float: left;
text-align: right;
clear: left;
padding-right: 3px;
}
In fact, it should be enough to leave only the highlighted lines here as the other
details were already specified in the default style sheet.
We can also influence the positioning of the Save button:
input.t-beaneditor-submit
{
position: relative;
left: 150px;
}
However, to see the changes, we need to make the new stylesheet available to the
web page. Tapestry can inject an asset, be it a stylesheet or an image, into the page
class when we ask it to do that, so let's add to the AddCelebrity page class to the
following lines of code:
@Inject
@Path("context:styles/styles.css")
private Asset styles;
public Asset getStyles()
{
return styles;
}
Advanced Components
[ 150 ]
Finally, provide in the page template a link to the stylesheet:

Celebrity Collector: Adding New Celebrity


If you run the application now, you will notice a significant difference in the
form's appearance:
You can continue experimenting from here with styles on your own, using the
default.


Pages:
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6