Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Blank check for image (ImageSetLink) in hippo cms

6 views
Skip to first unread message

i.tpr...@gmail.com

unread,
Jan 20, 2014, 4:59:52 AM1/20/14
to
Hi Everyone,

I have created a document type containing image link (field) component.

Using this document type I created some article , Image is optional in article ,
If any article does not contain image and on the JSP if we access the image then it throws exception. I tried to put null check but even on the statement on which I put null check it is showing exception.


Code to access Image in bean class.

public ImageSet getImage() {
ImageSetLink imageLink = (ImageSetLink) getBean("hippogogreen:image");

return (ImageSet) imageLink.getReferencedBean();
}

I tried to find method , by which I can perform null/blank check but didn't found any one.

Is there any way to perform null/blank check on image.


Regards,
Pranav
0 new messages