Relation of default and defaultonenter attributes in documentum.

For few days I was struggling to find out the reason why first time when I pressed the enter button the next button onclick function was called when default='true' attribute was set in the next button of the container. Finally I found the reason why it was working fine. The reason was very funny when we are launching the newfoldercontainer component first time we have to enter some text in the name field where defaultonenter was set to true, so the cursor is present inside that text box, so when I was hitting the enter key the onclick function of next button was called successfully. But when I was coming through Prev button the cursor was not present in the text box so the enter key was not working. So from this we can conclude that in order to use attribute default='true' we need some text box where defaultonenter must be set to true and the cursor must be present in one of the text box where the attribute defaultnoenter is set to true then only the default='true' functionality will be working properly.

For example:
Consider newfoldercontainer container in documentum

webcomponent/config/library/create/newfoldercontainer_component.xml

Prev, Next, Finish and Cancel button are coming from newContainer.jsp in which the next button default="true" attribute value is set.
 
/webcomponent/library/create/newContainer.jsp
  



<dmf:button name='<%=PropertySheetWizardContainer.NEXT_BUTTON_CONTROL_NAME%>' default="true" cssclass='buttonLink' nlsid='MSG_NEXT' onclick='onNextComponent' height ='16' tooltipnlsid='MSG_NEXT_TIP'/>
 
Now in order to make enter key work we have to add defaultonenter attr equal to true in the one of the text boxes used by the component present in the container. As container lauch one component at a time so for each next and finish button to work on pressing enter we have to go to each and every component jsp page and set the defaultonenter='true' in the text box where the user will enter some text and after that he will be hitting the Enter key. If the text box where defaultonenter='true' is not highlighted then pressing Enter won't fire any event.
 
So we consider, newfolder component of newwfoldercontainer then we can see defaultonenter is set to true for
attribute_object_name text box

<dmf:text name="attribute_object_name" size="30" id="object_name" defaultonenter="true" tooltipnlsid="MSG_NAME_COLON" autocompleteid="ac_folderName"/>
 
The enter key will work only if the attribute_object_name text is highlighted means when the cursor is inside the text box.

Comments

Popular posts from this blog

Implementation of Documentum Business Object Framework (BOF)

Create a web application in 5 minutes using Spring Boot and Maven

Creating Session in Documentum