Pages

Saturday, 14 April 2012

Displaying Error Msg in Jsp when Content List or Article is empty or null


Displaying Error Msg in Jsp when Content List or Article is empty or null
1.           
<!—This tag will  display the journal article with in the Template mentioned à
if(articleDisplay!=null){
            %>
<div>
      <liferay-ui:journal-article templateId="SAMPLE_TEMPLATE_ID"
                  articleId="<%= articleDisplay.getArticleId() %>"
                  groupId="<%= groupId %>" />
</div>
<%   
}else{
      %>   

      <!—This line will show a error when there is no journal article available with the give ID à

<div class="portlet-msg-error">
 No Article exists with the articleId=<%= articleId%> .
</div>     
      <%   
            }

No comments:

Post a Comment