Message Boards

Using Clay modal in Liferay 7.2

Jan Kadlec, modified 4 Years ago.

Using Clay modal in Liferay 7.2

New Member Posts: 14 Join Date: 7/22/14 Recent Posts
Hi, how can I use Clay modals in my portlet properly?

Clay modal is not part of the <clay> taglib (as far as I know). I can copy-paste Clay modal's HTML code in my JSP, but then I also have to write JavaScript to control modal opening/closing myself.
So I'm wondering, isn't there a better of utilizing modal windows in my portlet? (and generally, any other clay component that is not part of the taglib).
Cheers!
Jan Kadlec, modified 4 Years ago.

RE: Using Clay modal in Liferay 7.2

New Member Posts: 14 Join Date: 7/22/14 Recent Posts
I found out I can just use HTML code of Clay modal in my portlet, but there is something weird going on.
When I do, the whole page is blocked by an invisible overlay (<div class="fade modal">). This element should have style="display:none;" attribute, but when I add it in my portlet JSP, it is removed before the element is displayed on the page. 
Did anyone else run in such problem?
Mark Molina, modified 3 Years ago.

RE: Using Clay modal in Liferay 7.2

New Member Posts: 11 Join Date: 10/14/11 Recent Posts
Hello Jan, I want to use the Clay Modal component too but I am facing some problems to achieve it. Did you be able to include this component in your portlet? Can you share an example of how it is possible to do that? Regards! Mark