Novell is now a part of Micro Focus

Displaying Partial Attributes in iManager

Novell Cool Solutions: Tip
By Wolfgang Schreiber

Digg This - Slashdot This

Posted: 29 Sep 2005


A reader recently asked:

"I would like to display a partial attribute on the iManager screen for verification purposes. For example, I have an attribute that is 10 characters. I would like only the first 5 characters to be displayed for viewing by a specific team. Is it possible to do this? If so, how?"

And here's the response from Wolfgang Schreiber ...


You can edit the .jsp file for your page/task and add some simple javascript.

If you have an attribute "myAttr", then the display part of your attribute may look like this in your JSP:

<INPUT type='text' name="_myAttr" value="<x:out 
select="$edasXml/edas/myAttr/value"/>" size=<fmt:message 
key="UI.textboxSize"/> style="width:<fmt:message key="UI.textboxPixel"/>" 
<c:if test="${!}">DISABLED</c:if> >

You need to change it to something like this:

<%-- hide the original --%>
 <INPUT type='hidden' name="_myAttr" value="<x:out 
select="$edasXml/edas/myAttr/value"/>" >
<%-- show the new field --%>
 <INPUT type='text' name="_myAttr_trunc" DISABLED >

*lt;%-- copy some chars from the original to the new field --%>
    var form=document.forms[0];
    form._myAttr_trunc.value = form._myAttr.value.substr(0, 5);

The plug-in studio in iManager 2.5 has a button to set attribute properties such as ReadOnly, in order to make them viewable but not editable.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates