Hi Experts,
I'm unable to to handle NoInput and NoMatch events using VFC. I'm getting undefined for both events when VField throws noinput or nomatch . I'm having hard time with this. Can any one explains me how these two classes are working, I read java doc for VAction and VEvent classes but I'm not quite sure about these classes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could you share an example of your code?
Are you performing something like this...
VAction exit = VAction.getNew(pref, VAction.EXIT );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
thanks ewindgat,
I'm throwing a nomatch like below.
// this action sets the menu field to undefined and throws a no match.
VAction throwNomatch = VAction.getNew(pref, VAction.ASSIGN, vFName, "maxError", VAction.WITHOUT_QUOTES);
throwNomatch.add(VAction.THROW, VAction.NOMATCH); . But vFName will always override with value "undefined".
handling nomatch event
NoMatchPrompt nomatch = new NoMatchPrompt(ved, NoMatchAudioGroup,"max_nomatch_count", getSubmitURL(), 1);
menufield.add(nomatch.getEvent());.
Now I'm able to catch NoMatch/NoInput event by using reqParameter off HashTable which is supplied as method parameter for addXmlBody(*****). I'm getting a string value "Yes" If an noMatch/NoInput occures. the below is the sample code I'm using now.
String NoMatch = (String)reqParameters.get( "maxNoMatch" );
String NoInput = (String)reqParameters.get( "maxNoInput" );
boolean isErrorCondition = false;
if( NoMatch != null ){
logger.debug("[processMenu] NoMatch condition");
if( ((String)NoMatch).equals("yes") )
{
//It's a nomatch
}
} else if ( NoInput != null ) {
logger.debug("[processMenu] NoInput condition");
if( ((String)NoInput).equals("yes") )
{
it's a noinput
}
}
thank you
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.