cancel
Showing results for 
Search instead for 
Did you mean: 

Change field type of 'description field' in the ed

sebastien_marin
Champ in-the-making
Champ in-the-making
Hello,

I need to write a lot of information in the "description" field ofthe "new content" or "edit content" jsp.


So i just would like to change the text fieldin a texte area field.


The problem is that that include jsp in generated and i don't realy understand how…

So how can i change that field view ???


Thank you.
5 REPLIES 5

gavinc
Champ in-the-making
Champ in-the-making
For the edit content properties you can configure the component to use for a property via the component-generator attribute.

Someone else has had the same requirement and provided instructions on how you can get this in 1.3 in this post: http://forums.alfresco.com/viewtopic.php?p=10339#10339

However, if you are willing to try the 1.4 preview there is built in support for this. You can simply add component-generator="TextAreaGenerator" to your property configuration.

As for the new content, you will have to provide a customised JSP. See the various articles here for more information: http://wiki.alfresco.com/wiki/Web_Client_Customisation_Guide

sebastien_marin
Champ in-the-making
Champ in-the-making
For the edit content properties you can configure the component to use for a property via the component-generator attribute.

Someone else has had the same requirement and provided instructions on how you can get this in 1.3 in this post: http://forums.alfresco.com/viewtopic.php?p=10339#10339

However, if you are willing to try the 1.4 preview there is built in support for this. You can simply add component-generator="TextAreaGenerator" to your property configuration.

As for the new content, you will have to provide a customised JSP. See the various articles here for more information: http://wiki.alfresco.com/wiki/Web_Client_Customisation_Guide

Hello, thank you very much. so i have now a text area but when i display the properties for exemple, the line breaks are not displayed… So do you have an idea to solve it ?


Thank you for your help.

gavinc
Champ in-the-making
Champ in-the-making
I presume you mean when you display the properties in read-only mode i.e. the view details screen the line breaks don't show?

If so, you may be able to write a custom converter and apply that to the property definition. The converter could switch the line break for HTML <br> elements and vice versa.

Alternatively, in your TextAreaGenerator you could instantiate a custom outputText JSF component that knows how to deal with displaying line breaks.

vbaudry
Champ in-the-making
Champ in-the-making
I had a problem on creating custom AddContentDialog class and a add-custom-content.jsp where all AddContentDialog strings where replace by the name of my new bean.

When I did that, the data about the first file I added was then kept when I tried to add another content, creating navigation problems.

The solution is to also change the bean name in browse.jsp in the line :
<a:actionLink value="#{msg.add_content}" image="/images/icons/add.gif" padding="2" action="addContent" actionListener="#{AddContentDialog.start}" style="white-space:nowrap" id="link3" />

Because if you don't, the bean is never reinitialized.

rafaelscg
Champ on-the-rise
Champ on-the-rise
I have the same question about line break.
I need to use something like <br /> on TextArea component. Dont have any special character to do this work?