掲示板

onclick for row in a search container

12年前 に H. William Connors II によって更新されました。

onclick for row in a search container

New Member 投稿: 24 参加年月日: 11/02/03 最新の投稿
I am wondering if anyone knows how to implement an onclick call for rows in the searchcontainer table. I would really like to be able to generate an event when a user clicks on a row in the search container. For what I'm trying to do that behavior would just be a better experience than adding an action to the row.
thumbnail
12年前 に Bijan Vakili によって更新されました。

RE: onclick for row in a search container

Expert 投稿: 375 参加年月日: 09/03/10 最新の投稿
Hey Will,

Either override or extend the search container taglib.

Let me know should you need additional pointers.
12年前 に H. William Connors II によって更新されました。

RE: onclick for row in a search container

New Member 投稿: 24 参加年月日: 11/02/03 最新の投稿
I have been looking at doing that but I must be having a moment because I can't figure out how to go about doing that. Maybe I'm missing something but here is what I see, most of the actual table construction appears to be be done in the liferay-ui:search-iterator tag and when I look at that tag it appears it basically uses /html/taglib/ui/search_iterator/page.jsp for all of the actual html. So I guess what I'm missing is how to gain access to the <tr> tag to actually add the onclick event. Any help you could offer me on how to do this would be greatly appreciated.
thumbnail
12年前 に Bijan Vakili によって更新されました。

RE: onclick for row in a search container

Expert 投稿: 375 参加年月日: 09/03/10 最新の投稿
H. William Connors II:
I have been looking at doing that but I must be having a moment because I can't figure out how to go about doing that. Maybe I'm missing something but here is what I see, most of the actual table construction appears to be be done in the liferay-ui:search-iterator tag and when I look at that tag it appears it basically uses /html/taglib/ui/search_iterator/page.jsp for all of the actual html. So I guess what I'm missing is how to gain access to the <tr> tag to actually add the onclick event. Any help you could offer me on how to do this would be greatly appreciated.


Look at following JSP file around line 237 (6.0.5):
/portal/portal-web/docroot/html/taglib/ui/search_iterator/page.jsp
12年前 に H. William Connors II によって更新されました。

RE: onclick for row in a search container

New Member 投稿: 24 参加年月日: 11/02/03 最新の投稿
Bijan Vakili:

Look at following JSP file around line 237 (6.0.5):
/portal/portal-web/docroot/html/taglib/ui/search_iterator/page.jsp


I see the following lines


                        
                                        onmouseover="this.className = '&lt;%= rowClassHoverName %&gt;';" onmouseout="this.className = '&lt;%= rowClassName %&gt;';"
                                
                        &gt;


So unless I'm missing something I think what I would have to do is create my own copy of page.jsp and then extend SearchIteratorTag.java to use my copy of page.jsp. Is there an easier way that I'm overlooking?
thumbnail
12年前 に Bijan Vakili によって更新されました。

RE: onclick for row in a search container

Expert 投稿: 375 参加年月日: 09/03/10 最新の投稿
Hey,

You can do that or create a hook plugin. The latter allows you to do JSP override.

Check out the following article:

http://www.liferay.com/web/raymond.auge/blog/-/blogs/1394248