I need to display a single valued attribute as a text box with validate link in properties screen and on clicking of the validate link , it should retrieve the value from textbox and populate other dependant values in the same properties screen for remaing attributes.I modified docbaseobject configuration file of my custom object type to display textbox for the single valued attribute and used the below code to add link next to textbox and to call that link event.But when i click on validate link, it shows invokemethod failed exception.I want to implement custom behaviour on clicking of this link .Which method we need to override in valuetag class to implement this functionality.please help me out in implementing this behaviour...
protected void renderSingleAttribute( String strFormattedValue, String strValue, boolean bReadonly, boolean bHasCompleteList, JspWriter out )throws IOException, JspTagException {
if ( bReadonly ) {super.renderSingleAttribute( strFormattedValue, strValue, bReadonly, bHasCompleteList, out ); }
else{ DocbaseAttributeValue value = (DocbaseAttributeValue)getControl();LinkTag link =new LinkTag();
try{ link.setPageContext(pageContext); link.setParent(this); String strEdit ="Validate"; link.setLabel(strEdit);
link.setTooltip(strEdit +" " + value.getAttributeLabel()); Link linkObj = (Link)link.getControl();
linkObj.setEventHandler("onclick", "onClickValidate", value); link.setOnclick(temp);link.doStartTag();
link.doEndTag();
pageContext.setAttribute(value.getElementName("value"), value.getElementName(), 3); }
catch(Exception e){
}
super
.renderSingleAttribute( strFormattedValue, strValue, bReadonly, bHasCompleteList, out );
} }
//Custom method to implement behaviour on click of Validate link
protected
String objName = getDocbaseAttributeValue("object_name"); System.
out.println("Object Name Value : " +objName);
return objName;String onClickValidate(String strValue) {