Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Leticia Borrajo
Remove checkboxes from the list of users
28 dicembre 2009 5.27
Risposta

Leticia Borrajo

Punteggio: New Member

Messaggi: 19

Data di Iscrizione: 14 settembre 2009

Messaggi recenti

Hi,

probably the solution is quite trivial, so I hope somebody can help me.

I want to show a list of users. To do so, I use the ui taglibs. The list appears correctly, except that at the beginning of each row appears a checkbox, which I don't need. I can't find a way to remove it. Could somebody help me?

Here is my code:

 1<liferay-ui:search-container-results>
 2    <%
 3        results = UserLocalServiceUtil.search(company.getCompanyId(), searchTerms.getKeywords(), searchTerms.getActive(), userParams, searchContainer.getStart(), searchContainer.getEnd(), searchContainer.getOrderByComparator());
 4        total = results.size();
 5        System.out.println(userParams);
 6        pageContext.setAttribute("results", results);
 7        pageContext.setAttribute("total", total);
 8    %>
 9
10</liferay-ui:search-container-results>
11
12<liferay-ui:search-container-row
13    className="com.liferay.portal.model.User"
14    escapedModel="<%= true %>"
15    keyProperty="userId"
16    modelVar="user"
17>
18    <%
19        StringBuilder sb = new StringBuilder();
20        sb.append("javascript: opener.document.");
21        sb.append(renderResponse.getNamespace());
22        sb.append("fm.contacto.value='");
23        String usuario=UnicodeFormatter.toString(user.getFullName());
24        sb.append(usuario);
25        sb.append("'; opener.document.");
26        sb.append(renderResponse.getNamespace());
27        sb.append("fm.idContacto.value='");
28        sb.append(user.getUserId());
29        sb.append("'; window.close();");
30        String rowURL = sb.toString();
31    %>
32
33    <liferay-ui:search-container-column-text
34        href="<%= rowURL %>"
35        name="full-name"
36        value="<%=user.getFullName()%>"
37    />
38</liferay-ui:search-container-row>


Thanks for your help.
Leticia Borrajo
RE: Remove checkboxes from the list of users
28 dicembre 2009 5.32
Risposta

Leticia Borrajo

Punteggio: New Member

Messaggi: 19

Data di Iscrizione: 14 settembre 2009

Messaggi recenti

Of course, as soon as I posted this thread, I found the problem.

Just in case somebody wonders how to include/exclude the checkboxes from the list, the code is this:

1rowChecker="<%= new RowChecker(renderResponse) %>"


Include it inside <liferay-ui:search-container> and the checkboxes will be shown:

1<liferay-ui:search-container
2    rowChecker="<%= new RowChecker(renderResponse) %>"
3    searchContainer="<%= new UserSearch(renderRequest, portletURL) %>"
4>