background preloader

Ahmedfehri87

Facebook Twitter

How to populate a Journal Article with values programmatically - Forums. A Blog about Liferay, JSF, ICEFaces and Primefaces: How to get the JournalStructure data. If you create a WebContent that is based on a structure / template combination and you want to get the value of one of the structure fields programmatically, you can do it like this:Imagine, that your WebContent has the ID 21623 and you are looking for a field that has the name "Text1".

A Blog about Liferay, JSF, ICEFaces and Primefaces: How to get the JournalStructure data

JournalArticle article = JournalArticleLocalServiceUtil.getArticle(21623); Document document = SAXReaderUtil.read(article.getContentByLocale(Locale.ENGLISH.toString())); Node node = document.selectSingleNode("/root/dynamic-element[@name='Text1']/dynamic-content"); String value = node.getText(); JournalArticle article = JournalArticleLocalServiceUtil.getArticle(21623); Document document = SAXReaderUtil.read(article.getContentByLocale(Locale.ENGLISH.toString())); Node node = document.selectSingleNode("/root/dynamic-element[@name='Text1']/dynamic-content"); String value = node.getText(); That´s all :) Gulench. Liferay. Expandos - What are they? And how do they help me? (Liferay Portal 5.0.1+) - Blog. I did a test to see the values of the sent parameters but nothing gotdisplayed.So tried a 'get' method to see the parameters in the url, i got this: Still nothing got displayed.

Expandos - What are they? And how do they help me? (Liferay Portal 5.0.1+) - Blog

Below is the full source. #set ($locale = $localeUtil.fromLanguageId($request.get("locale")))#set ($dateFormatDateTime = $dateFormats.getDateTime($locale))