Pages

Thursday, 13 September 2012

Web Content Portlet details in important Jsp



Web Content Portlet  details in important Jsp



This post is only suggest where you find pieces of code which are responsible for render and edit structure's field.

- html/portlet/journal/js/main.js file. In this file we register new field's model: registerFieldModel(namespace, type, variableName, optionsEditable) and add this one to model's map in function _fieldInstanceFactory() : <type> : Journal.FieldModel.<namespace>

- html/portlet/journal/edit_article_content_xsd_el.jsp file. We display and serve our new type inside <div> tag (journal-article-component-container).

- html/portlet/journal/edit_structure_xsd_el.jsp file. We shoud add our new type to select list: <select id="<portlet:namespace />structure_el<%= count.getValue() %>_type" tabindex="<%= tabIndex.getValue() %>">

- html/portlet/journal/edit_article_structure extra.jspf file. We add our type to select list: (add our type to select fieldType inside journalArticleEditField's field). We also define look out field inside journalFieldModelContainer's div (create div with attribute dataType="<type>").

- In file html/portlet/journal/edit_article_extra.jsp we must add and register our new component.


Hints:
You must look and handle your new component in this files:
- html/portlet/journal/js/main.js
- html/portlet/journal/edit_article_content_xsd_el.jsp
- portal-impl/src/com/liferay/portlet/journal/action/EditArticleAction.java


No comments:

Post a Comment