Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Mikko Torri
(Boolean) Expando field to display as Checkbox?
14 de febrero de 2012 3:32
Respuesta

Mikko Torri

Ranking: Junior Member

Mensajes: 33

Fecha de incorporación: 9 de mayo de 2011

Mensajes recientes

Hi

I've extended the calendar service with some new fields.
Currently I've defined them as boolean, since they're supposed to be checkbox type fields.
However by default they're shown as dropdown with True/False as selection.

Can they be changed to be displayed as checkbox?

This is the default code that outputs them on edit_event.jsp:
 1
 2<liferay-ui:custom-attributes-available className="<%= CalEvent.class.getName() %>">
 3    <liferay-ui:custom-attribute-list
 4        className="<%= CalEvent.class.getName() %>"
 5        classPK="<%= eventId %>"
 6        editable="<%= true %>"
 7        label="<%= true %>"
 8    />
 9</liferay-ui:custom-attributes-available>


Thanks,
Mikko
Bozhidar Dedov
RE: (Boolean) Expando field to display as Checkbox?
22 de febrero de 2012 0:45
Respuesta

Bozhidar Dedov

Ranking: New Member

Mensajes: 10

Fecha de incorporación: 30 de agosto de 2011

Mensajes recientes

Hi Mikko,

I had to do the same some weeks ago. Unfortunately there is no configuration option that enables changing the way the true/false field is displayed. For this you have to override a JSP from the taglib using a hook. Check here how to do it.

Regards,
Bozhidar
Dominik domih
RE: (Boolean) Expando field to display as Checkbox?
15 de junio de 2012 8:00
Respuesta

Dominik domih

Ranking: Junior Member

Mensajes: 56

Fecha de incorporación: 10 de noviembre de 2008

Mensajes recientes

Thanks, Bozhidar! Works like a charm :-)

It would be great if one could define the display of the custom attribute during creation, e.g. checkbox, radiobutton, ... like it's done with the data type presets. That would could be an option in the drop down field on creation of custom attributes. Maybe in a futur version ...