Additional Date type attribute for person

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2007 04:12 PM
I wanted to extend user attributes by new Date type attribute.
I added:
I added props.put(…(Date)…) line in changeUserDetails() :
If I do it for String or Integer type attribute it works, for Date type attribute it does not. What is wrong?
I added:
<property name="cm:replacementPersonStartDate"> <type>d:date</type></property>
to contentModel.xml file.<tr><td><h:outputText value="#{msg.replacement_person_start_date}"/>:</td><td><h:inputText id="replacement_person_start_date" value="#{UsersBean.person.properties.replacementPersonStartDate}" size="35" maxlength="1024" onkeyup="updateButtonState();" onchange="updateButtonState();" /> *</td></tr>
to edit-user-details.jsp file.<td class="propertiesLabel"><h:outputText value="#{msg.replacement_person_start_date}" />:</td><td><h:outputText value="#{UsersBean.person.properties.replacementPersonStartDate}" /></td></tr>
to user-console.jsp file.I added props.put(…(Date)…) line in changeUserDetails() :
public String changeUserDetails(){…props.put(ContentModel.PROP_EMAIL, (String)getPerson().getProperties().get(ContentModel.PROP_EMAIL));props.put(ContentModel.PROP_REPLACEMENT_PERSON_START_DATE,(Date)getPerson().getProperties().get(ContentModel.PROP_REPLACEMENT_PERSON_START_DATE));…this.nodeService.setProperties(getPerson().getNodeRef(), props);…}
in UsersBean.java file.If I do it for String or Integer type attribute it works, for Date type attribute it does not. What is wrong?
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2007 07:33 AM
Hello,
Are you sure your h:inputText will not need a converter to convert the input text into Date ?
Anyway, can you explain what goes wrong ?
Are you sure your h:inputText will not need a converter to convert the input text into Date ?
Anyway, can you explain what goes wrong ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2007 05:25 PM
You are right! It was converter! I set it before, but I had to make mistake than.
I used:
<f:convertDateTime dateStyle="short" pattern="dd-MM-yyyy"/>
and it seems OK now.
Thank you very much!
I used:
<f:convertDateTime dateStyle="short" pattern="dd-MM-yyyy"/>
and it seems OK now.
Thank you very much!
