Displaying Partial Attributes in iManager
Novell Cool Solutions: Tip
By Wolfgang Schreiber
Reader Rating 
|
Digg This -
Slashdot This
Posted: 29 Sep 2005 |
Problem
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 ...
Solution
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="${!edasRights.target.myAttr.writeable}">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 --%>
<script>
var form=document.forms[0];
form._myAttr_trunc.value = form._myAttr.value.substr(0, 5);
</script>
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. www.webwiseone.com
