Foros de discusión

Using <liferay-ui:search-container-column-jsp>

Rastislav Papp, modificado hace 13 años.

Using <liferay-ui:search-container-column-jsp>

New Member Mensajes: 7 Fecha de incorporación: 11/03/10 Mensajes recientes
Hi,

I am displayinh data from database in my portlet using <liferay-ui:search-container> (I don't know if this is the right choice since I'm not searching anything, but only displaying all the rows from a table). This is piece of my code:

    <liferay-ui:search-container emptyresultsmessage="${emptyManufacturersMessage}">

        <liferay-ui:search-container-results results="${manufacturers}" />

        <liferay-ui:search-container-row classname="com.example.Manufacturer" keyproperty="id" modelvar="manufacturer">

            <liferay-ui:search-container-column-text name="${manufacturerNameColumn}" value="${manufacturer.name}" />

            
            <liferay-ui:search-container-column-jsp path="actions.jsp" align="right" />
           
        </liferay-ui:search-container-row>

        <liferay-ui:search-iterator />

    </liferay-ui:search-container>


I am trying to display 'Actions' button in every row of the table. The problem is in <liferay-ui:search-container-column-jsp> tag, it throws an exception because my path does not start with '/'. So I tried using the path '/WEB-INF/jsp/manufacturer/actions.jsp' (which is where my jsp is located), but it could not find that file. I am not using plugins sdk, nor EXT environment, just a regular portlet (I guess this is the problem). Is it somehow possible to do what I want?

Thanks
Rastislav Papp, modificado hace 13 años.

RE: Using <liferay-ui:search-container-column-jsp>

New Member Mensajes: 7 Fecha de incorporación: 11/03/10 Mensajes recientes
I was working on this for about 2 hours... And 5 minutes after I created this thread I found an answer:


            <liferay-ui:search-container-column-text name="" align="right">
                <!-- insert the code of the action here -->
            </liferay-ui:search-container-column-text>
Brahim TARNAOUI, modificado hace 13 años.

RE: Using <liferay-ui:search-container-column-jsp>

Junior Member Mensajes: 64 Fecha de incorporación: 15/06/10 Mensajes recientes
hello,

me too i will displaying all entri from a table in my page, and i use <liferay-ui:search-container-column-jsp>,
can explain me how to use it this tag for displaying all resultt i jsp page?


thx
Tam Nguyen Minh, modificado hace 13 años.

RE: Using <liferay-ui:search-container-column-jsp>

New Member Mensajes: 16 Fecha de incorporación: 1/12/10 Mensajes recientes
Hi Brahim,

May be this link will be useful for you.

Best regards,
Tam Nguyen
thumbnail
Srikanth Reddy Sanivarapu, modificado hace 12 años.

RE: Using <liferay-ui:search-container-column-jsp>

Regular Member Mensajes: 203 Fecha de incorporación: 15/11/08 Mensajes recientes
Hi All,

Is that possible to invoke java-script function when we click on the link?

Something like this?

<liferay-ui:search-container-column-text
href="<%=rowURL%>"
name="#"
title="More"
value="More"
target="_blank"
>

<SCRIPT LANGUAGE="JavaScript">
alert("Test");
</SCRIPT>

</liferay-ui:search-container-column-text>

Waiting for reply as this is some urgent requirement. Thanks in Advance.

Regards,
Srik
thumbnail
Sagar A Vyas, modificado hace 10 años.

RE: Using <liferay-ui:search-container-column-jsp>

Liferay Master Mensajes: 679 Fecha de incorporación: 17/04/09 Mensajes recientes
Srikanth Reddy Sanivarapu:
Hi All,

Is that possible to invoke java-script function when we click on the link?

Something like this?

<liferay-ui:search-container-column-text
href="<%=rowURL%>"
name="#"
title="More"
value="More"
target="_blank"
>

<SCRIPT LANGUAGE="JavaScript">
alert("Test");
</SCRIPT>

</liferay-ui:search-container-column-text>

Waiting for reply as this is some urgent requirement. Thanks in Advance.

Regards,
Srik


By Applying css class on row and bind jQuery with that class you can achieve this.

as below

 <liferay-ui:search-container-column-text name="title" value="	${idea.title}" cssClass="someClass" />

<script>
	jQuery(".someClass").click(function(e) {
			
	     });
</script>		
 



Thanks,
Sagar Vyas
thumbnail
Ketan Savaliya, modificado hace 10 años.

RE: Using <liferay-ui:search-container-column-jsp>

Regular Member Mensajes: 117 Fecha de incorporación: 3/03/11 Mensajes recientes
Rastislav Papp:
Hi,

I am displayinh data from database in my portlet using <liferay-ui:search-container> (I don't know if this is the right choice since I'm not searching anything, but only displaying all the rows from a table). This is piece of my code:

    <liferay-ui:search-container emptyresultsmessage="${emptyManufacturersMessage}">

        <liferay-ui:search-container-results results="${manufacturers}" />

        <liferay-ui:search-container-row classname="com.example.Manufacturer" keyproperty="id" modelvar="manufacturer">

            <liferay-ui:search-container-column-text name="${manufacturerNameColumn}" value="${manufacturer.name}" />

            
            <liferay-ui:search-container-column-jsp path="actions.jsp" align="right" />
           
        </liferay-ui:search-container-row>

        <liferay-ui:search-iterator />

    </liferay-ui:search-container>


I am trying to display 'Actions' button in every row of the table. The problem is in <liferay-ui:search-container-column-jsp> tag, it throws an exception because my path does not start with '/'. So I tried using the path '/WEB-INF/jsp/manufacturer/actions.jsp' (which is where my jsp is located), but it could not find that file. I am not using plugins sdk, nor EXT environment, just a regular portlet (I guess this is the problem). Is it somehow possible to do what I want?

Thanks



Hi Rastislav,

If you want the "Action" button in each row then this link will be helpful to you.....

http://www.liferay.com/community/forums/-/message_boards/view_message/7872476#_19_message_7872476

Thankx
Ketan Savaliya
thumbnail
me liferay, modificado hace 10 años.

RE: Using <liferay-ui:search-container-column-jsp>

Junior Member Mensajes: 25 Fecha de incorporación: 14/12/11 Mensajes recientes
I am struggling to find the implementation of Model class(com.example.Manufacturer) could you please post it here?
thumbnail
Sagar A Vyas, modificado hace 10 años.

RE: Using <liferay-ui:search-container-column-jsp>

Liferay Master Mensajes: 679 Fecha de incorporación: 17/04/09 Mensajes recientes
me liferay:
I am struggling to find the implementation of Model class(com.example.Manufacturer) could you please post it here?


Are you using service builder ?
thumbnail
me liferay, modificado hace 10 años.

RE: Using <liferay-ui:search-container-column-jsp>

Junior Member Mensajes: 25 Fecha de incorporación: 14/12/11 Mensajes recientes
No, that is what I wanted to know I have list of my custom objects(POJO) not how can I display it using search container?
Do I need to use service builder to generate the customModel class which can accommodate my Objects?