第一范文网 - 专业文章范例文档资料分享平台

tapestry5.0

来源:用户分享 时间:2025/5/29 11:24:34 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

background-color: expression(( this.sectionRowIndex % 2 == 0) ? \}

.userName,.operation,.birthday,.role{ text-align: center; vertical-align: middle; }

16:55

? 浏览 (629) ? 评论 (0)

? 分类: Tapestry/Wicket/JSF2

?

2009-02-11 缩略显示

Tapestry5自定义组件

关键字: tapestry5 一、普通组件 1.java文件

package com.logcd.tapestry5.myapp.components;

import java.util.ArrayList; import java.util.List;

import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.annotations.Parameter; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.ioc.annotations.Inject;

public class NavBar { @Parameter(defaultPrefix = \ private String pages; @Inject private ComponentResources resources; @Property private Page _pageAttr; public List getPageNames() {

List pageList = new ArrayList(); String[] pageArr = pages.split(\ for(int i=0;i

(_pageAttr.name.equalsIgnoreCase(resources.getPageName())) return \ return null; } public class Page{ private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } private String url; } }

2.NavBar.tml

xmlns:t=\

page=\

3.页面使用

二、布局模板组件 1.java文件

package com.logcd.tapestry5.myapp.components;

import org.apache.tapestry5.annotations.IncludeStylesheet; //用 \前缀,如果存储在应用程序(webapp)的目录

//用\前缀,如果存储在应用程序的classpath路径下 @IncludeStylesheet(\public class Layout { }

2.tml文件

Tapestry 5 Demo Application

Tapestry 5 Demo

style=\首页]

搜索更多关于: tapestry5.0 的文档
tapestry5.0.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c9b1203ewr11oirv32mcx_3.html(转载请注明文章来源)
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top