Foros de discusión
Extend the length of the organization name
Serdar Ayalp, modificado hace 10 años.
Extend the length of the organization name
Junior Member Mensajes: 45 Fecha de incorporación: 2/09/11 Mensajes recientes
Hi guys,
Liferay' organization names have a maximum of 100 character. Is it possible that I set it to 120?
Sincerely
Liferay' organization names have a maximum of 100 character. Is it possible that I set it to 120?
Sincerely
Tonu Sri, modificado hace 10 años.
RE: Extend the length of the organization name
Regular Member Mensajes: 197 Fecha de incorporación: 15/04/11 Mensajes recientes
Hi Serdar,
You can extend this property inside portal-impl/src/META-INF/portal-model-hints.xml.
<model name="com.liferay.portal.model.Organization">
<field name="organizationId" type="long" />
<field name="companyId" type="long" />
<field name="parentOrganizationId" type="long" />
<field name="treePath" type="String">
<hint name="max-length">4000</hint>
</field>
<field name="name" type="String">
<hint name="display-width">150</hint>
<hint name="max-length">100</hint>
<validator name="required" />
</field>
<field name="type" type="String">
<hint name="auto-escape">false</hint>
</field>
<field name="recursable" type="boolean" />
<field name="regionId" type="long" />
<field name="countryId" type="long" />
<field name="statusId" type="int" />
<field name="comments" type="String">
<hint-collection name="TEXTAREA" />
<hint name="display-width">400</hint>
</field>
</model>
You can modify this for example :
<field name="name" type="String">
<hint name="display-width">150</hint>
<hint name="max-length">200</hint>
<validator name="required" />
</field>
I hope this will help you.
Thanks:
Tonu
You can extend this property inside portal-impl/src/META-INF/portal-model-hints.xml.
<model name="com.liferay.portal.model.Organization">
<field name="organizationId" type="long" />
<field name="companyId" type="long" />
<field name="parentOrganizationId" type="long" />
<field name="treePath" type="String">
<hint name="max-length">4000</hint>
</field>
<field name="name" type="String">
<hint name="display-width">150</hint>
<hint name="max-length">100</hint>
<validator name="required" />
</field>
<field name="type" type="String">
<hint name="auto-escape">false</hint>
</field>
<field name="recursable" type="boolean" />
<field name="regionId" type="long" />
<field name="countryId" type="long" />
<field name="statusId" type="int" />
<field name="comments" type="String">
<hint-collection name="TEXTAREA" />
<hint name="display-width">400</hint>
</field>
</model>
You can modify this for example :
<field name="name" type="String">
<hint name="display-width">150</hint>
<hint name="max-length">200</hint>
<validator name="required" />
</field>
I hope this will help you.
Thanks:
Tonu
Serdar Ayalp, modificado hace 10 años.
RE: Extend the length of the organization name
Junior Member Mensajes: 45 Fecha de incorporación: 2/09/11 Mensajes recientes
Hi Tonu,
thanks for your quick response. Do I have to write an Ext plugin or is there an easier way?
thanks for your quick response. Do I have to write an Ext plugin or is there an easier way?
subhash lamba, modificado hace 10 años.
RE: Extend the length of the organization name
Regular Member Mensajes: 136 Fecha de incorporación: 7/07/13 Mensajes recientesSerdar Ayalp:
Hi Tonu,
for that above code you no need to write the ext or any plugin. just change in xml file and restart the server.
Tonu Sri, modificado hace 10 años.
RE: Extend the length of the organization name
Regular Member Mensajes: 197 Fecha de incorporación: 15/04/11 Mensajes recientes
Hi Subhash,
I know some of the guys are modifying liferay code directly. Please avoid this.
Liferay recommends use of HOOK and EXT to customize liferay. You will face while upgradation lot of issue if you are modifying code directly.
Thanks:
Tonu
I know some of the guys are modifying liferay code directly. Please avoid this.
Liferay recommends use of HOOK and EXT to customize liferay. You will face while upgradation lot of issue if you are modifying code directly.
Thanks:
Tonu
Serdar Ayalp, modificado hace 10 años.
RE: Extend the length of the organization name
Junior Member Mensajes: 45 Fecha de incorporación: 2/09/11 Mensajes recientes
Hi Tonu,
I wrote the EXT plugin, but the length of the column is still on 100 Have I done something wrong
I wrote the EXT plugin, but the length of the column is still on 100 Have I done something wrong
Tonu Sri, modificado hace 10 años.
RE: Extend the length of the organization name
Regular Member Mensajes: 197 Fecha de incorporación: 15/04/11 Mensajes recientes
Hi Serdar,
If you want to work in recommended way then you should use Ext plugin.
Thanks:
Tonu
If you want to work in recommended way then you should use Ext plugin.
Thanks:
Tonu