wicket 如何更改导航器 css?
我的应用程序中有一个导航器,我想更改他的 css:
<div wicket:id="navigator">
我如何引用他?... 并改变他的视图(css)? 有人可以给我举个例子吗?
编辑
我的目标是将我的按钮添加到导航器中......
<table cellspacing="0" class="dataview" >
<tbody>
<thead>
<tr>
<th>Name</th>
<th>password</th>
<th>Delete</th>
</tr>
</thead>
<tr wicket:id="simple" >
<td><span wicket:id="name">Test ID</span></td>
<td><span wicket:id="password">Test ID</span></td>
<td><a href="#" wicket:id="deleteLink" class="button"></a></td>
</tr>
</tbody>
</table>
<div wicket:id="navigator">
I have a navigator in my application which I want to change his css :
<div wicket:id="navigator">
how can I refrence to him ?...
and change his view(css) ?
can anyone please reference me to an example ?
EDIT
my goal is to add my buttones to the navigator ...
<table cellspacing="0" class="dataview" >
<tbody>
<thead>
<tr>
<th>Name</th>
<th>password</th>
<th>Delete</th>
</tr>
</thead>
<tr wicket:id="simple" >
<td><span wicket:id="name">Test ID</span></td>
<td><span wicket:id="password">Test ID</span></td>
<td><a href="#" wicket:id="deleteLink" class="button"></a></td>
</tr>
</tbody>
</table>
<div wicket:id="navigator">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想更改
PagingNavigator
的 html 代码,您可以创建一个扩展PagingNavigator
的MyPagingNavigator
:然后您必须创建一个
>MyPagingNavigator.html
您可以在其中进行更改。但请确保您没有从 MyPagingNavigator.html 中删除任何组件(通过 wicket:id= 引用)您可以使用 wicket 源 (src/wicket/src/main/java/org/apache/wicket/markup/ html/navigation/paging/PagingNavigator.html):
If you want to change the html-code of the
PagingNavigator
you can create aMyPagingNavigator
which extendsPagingNavigator
:Then you have to create a
MyPagingNavigator.html
where you can make your changes. But be sure that you dont remove any components from MyPagingNavigator.html (referenced with wicket:id=)You can use the original content from the wicket source (src/wicket/src/main/java/org/apache/wicket/markup/html/navigation/paging/PagingNavigator.html):
不确定您要实现什么目的,但
AttributeAppender
和AttributeModifier
可用于操作给定对象的 CSS 类。借自 Wicket Wiki< 的示例/a>:
Not sure what you're trying to accomplish, but
AttributeAppender
andAttributeModifier
can be used to manipulate the CSS class of a given object.Example borrowed from the Wicket Wiki: