Ryan's Java world!

something about Java and opensource!

BlogJava 首页 新随笔 联系 聚合 管理
  51 Posts :: 25 Stories :: 59 Comments :: 0 Trackbacks
使用 PageView 来调试页面.

Wicket中提供了一个PageView类,顾名思义 就是查看当前page的信息, 使用该类可以显示当前页面的所有组件.
使用方法很简单在page中加上一个markup:   <span wicket:id="componentTree"/>
然后 添加一下代码到page的构造函数中.


add(new PageView("componentTree", this));

对于 Wicket教程2 的输出信息如下:


[Page class = wicket.quickstart.Index, id = 2]:
#
Path
Size
Type
Model Object
1  
_  
423 bytes  
wicket.markup.html.internal.HtmlBodyContainer  
 
2  
border  
980 bytes  
wicket.quickstart.MyBorder  
 
3  
border:label  
458 bytes  
wicket.markup.html.basic.Label  
This is a label.  
4  
border:label2  
465 bytes  
wicket.markup.html.basic.Label  
This is another label.  
5  
boxBorder  
1.2K  
wicket.markup.html.border.BoxBorder  
 
6  
boxBorder:inBoxBorder  
468 bytes  
wicket.markup.html.basic.Label  
This is a Box Border  
7  
boxBorder:multiLineLabel2InBoxBorder  
645 bytes  
wicket.markup.html.basic.MultiLineLabel  
MultiLineLabel shows text that spans multiple lines by inserting line breaks (BR tags) for newlines and paragraph markers (P tags) for sequences of more than one newline.  
8  
multiLineLabel  
633 bytes  
wicket.markup.html.basic.MultiLineLabel  
MultiLineLabel shows text that spans multiple lines by inserting line breaks (BR tags) for newlines and paragraph markers (P tags) for sequences of more than one newline.  
9  
name  
N/A  
wicket.markup.html.basic.Label  
Icess  
10  
test  
454 bytes  
wicket.markup.html.basic.Label  
Hello World!  
posted on 2006-08-08 09:22 冰雨 阅读(911) 评论(0)  编辑  收藏 所属分类: Opensource

只有注册用户登录后才能发表评论。


网站导航:
 

JSF中文技术文摘