How to save

How can i save the custom widget data into database.

Shrikanth,     

Shrikanth,

     Overwrite submitPerformed method in your submit event listener subclass . This is just to make sure that form is submitted. Here is code snippet for sunmitPerformed method.

public void submitPerformed(WidgetSubmitEvent evt) {

try {

Object value = null;

if (!evt.getValueSubmitted()) {

super.submitPerformed(evt);

}

} catch (Exception e) {//Exception Handling

}

}

Next step - in you widget XSL, do the following

 //define setter function with unique name

function setValue_<xsl:value-of select="$n" />() {

document.getElementById('<xsl:value-of select="$n" />').value = finalStr;

}

//Finally make sure that you add setter function to following standard function.

addToPreSubmitFunctions(setValue_<xsl:value-of select="$n" />);