liferay中自定义字段及部分路由说明
来源:互联网 发布:深圳华夏软件学校招生 编辑:程序博客网 时间:2024/04/30 13:53
参考平行线的凝聚,网址:http://www.tuicool.com/articles/raQzA3,http://supercharles888.blog.51cto.com/609344/1288618
在liferay站点->站点设置->自定义字段,中,对于这个存储,首先,我们可以查看form提交的action,
form中acion连接为:http://localhost:8082/group/control_panel/manage?
p_auth=heAqArRv&p_p_auth=6Z5Wds7k&p_p_id=165&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&
doAsGroupId=21413&refererPlid=20184&controlPanelCategory=sites&_165_struts_action=%2Fsite_settings%2Fedit_site
p_p_id=165为portlet的id为165。
参数165_struts_action=%2Fsite_settings%2Fedit_site,说明action为edit_site
在
在portal-web WEB-INF struts-config.xml 中
<action path="/admin_server/edit_site" type="com.liferay.portlet.sites.action.EditGroupAction">
<forward name="portlet.sites_admin.edit_site" path="portlet.sites_admin.edit_site" />
<forward name="portlet.sites_admin.error" path="portlet.sites_admin.error" />
</action>
liferay-portlet.xml中
<portlet>
<portlet-name>165</portlet-name>
<icon>/html/icons/site_settings.png</icon>
<struts-path>site_settings</struts-path>
<parent-struts-path>sites_admin</parent-struts-path>
<portlet-url-class>com.liferay.portal.struts.StrutsActionPortletURL</portlet-url-class>
<control-panel-entry-category>site_administration.configuration</control-panel-entry-category>
<control-panel-entry-weight>1.0</control-panel-entry-weight>
<control-panel-entry-class>com.liferay.portlet.sitesadmin.SiteSettingsControlPanelEntry</control-panel-entry-class>
<preferences-owned-by-group>true</preferences-owned-by-group>
<use-default-template>false</use-default-template>
<private-request-attributes>false</private-request-attributes>
<private-session-attributes>false</private-session-attributes>
<render-weight>50</render-weight>
<header-portlet-css>/html/portlet/sites_admin/css/main.css</header-portlet-css>
<css-class-wrapper>portlet-site-settings</css-class-wrapper>
<add-default-resource>true</add-default-resource>
<system>true</system>
</portlet>
之后在tiles-defs.xml中查找portlet.sites_admin.edit_site,找到
<definition name="portlet.sites_admin.edit_site" extends="portlet.sites_admin">
<put name="portlet_content" value="/portlet/sites_admin/edit_site.jsp" />
</definition>
接着在edit_site.jsp界面查看所需的界面。
对于该界面,自定义字段的查找,一般为:
boolean showPrototypes = ParamUtil.getBoolean(request, "showPrototypes", true);
String[] mainSections = PropsValues.SITES_FORM_ADD_MAIN; //所需的jsp页面的组合,在下面中有所体现
String[] seoSections = PropsValues.SITES_FORM_ADD_SEO;
String[] advancedSections = PropsValues.SITES_FORM_ADD_ADVANCED;
String[] miscellaneousSections = PropsValues.SITES_FORM_ADD_MISCELLANEOUS;
。。。。
。。。。
<liferay-ui:form-navigator
backURL="<%= backURL %>"
categoryNames="<%= _CATEGORY_NAMES %>"
categorySections="<%= categorySections %>" //展示mainSections中的内容信息
jspPath="/html/portlet/sites_admin/site/"
showButtons="<%= true %>"
/>
</aui:form>
在liferay-ui.tld中
<tag>
<name>form-navigator</name>
<tag-class>com.liferay.taglib.ui.FormNavigatorTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>backURL</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>categoryNames</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>categorySections</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>displayStyle</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>formName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>htmlBottom</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>htmlTop</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>jspPath</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>showButtons</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
在com.liferay.taglib.ui.FormNavigatorTag类中跳转页面为:
private static final String _PAGE =
"/html/taglib/ui/form_navigator/page.jsp";
在portal.properties中查看
sites.form.add.main=details,categorization //为details.jsp和categorization .jsp ,为
sites.form.add.seo=
sites.form.add.advanced=
sites.form.add.miscellaneous=
之后页面进行组合即可。
- liferay中自定义字段及部分路由说明
- liferay中自定义字段得到Group对象
- liferay中工程类型说明
- [Liferay] 使用 Expando 自定义字段搜索对象
- sql server 中字段类型及说明
- sql server 中字段类型及说明
- sqlserver中字段类型及说明
- SQL SERVER中字段类型及说明
- IIS W3C格式日志中记录的字段及说明
- liferay中css的自定义导入
- liferay学习2--用户体系及权限体系简单说明
- 在liferay中生成one to many 关系说明
- 自定义动画中Gravity 类参数及说明
- sharepoint 2013 开发自定义字段类型说明
- pre_forum_post中invisible字段说明
- arcgis中字段的说明
- liferay 配置文件说明
- liferay主题(theme)中使用自定义的图片
- Java 包冲突
- 【5002】排版问题
- 屏幕类,用于全屏程序&显示任务栏
- 浮点型 比较
- 抢红包背后的技术点
- liferay中自定义字段及部分路由说明
- k-means算法学习
- Codeforces Round #379 (Div. 2) -- D. Anton and Chess (if else 的水题)
- Python 内置函数 locals()和 globals()
- 双链表的插入学习(C和指针)
- Unity3D都有哪些坑
- TCP/IP和UDP的基础理解(1)
- 使用conlleval.pl对CRF测试结果进行评价的方法
- 扯淡nginx的sendfile零拷贝的概念