Scriplets in Liferay -


what can scriptlet

<%     resultrow row = (resultrow) request.getattribute(bookandauthor.search_container_result_row);      book book = (book) row.getobject(); %> 

if want use value="${book.bookid} in code?

<liferay-ui:icon-menu>       <portlet:actionurl name="deletebook" var="deletebookvar">          <portlet:param name="bookid"     value="<%=string.valueof(book.getbookid())%>" />      </portlet:actionurl>  </liferay-ui:icon-menu> 

this little tricky thing should work. use variable hold value of constant search_container‌​_result‌​_row

<c:set var="resultrowconstant" value="<%=bookandauthor.search_container‌​_result‌​_row%>" /> read attribute you should able use bracket notation access 'dynamic' properties: <c:set var="row" value="${[resultrowconstant]}"/> , hold resultrow object, access book object through

${row.object} 

Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -