public String getMenuLink ( FieldList record ) { FieldInfo field = record . getField ( "Type" ) ; if ( ( field != null ) && ( ! field . isNull ( ) ) ) { String strType = field . toString ( ) ; String strParams = record . getField ( "Params" ) . toString ( ) ; if ( strParams == null ) strParams = Constants . BLANK ; else if ( strParams . length ( ) > 0 ) strParams = ' ' + strParams ; if ( ( strType != null ) && ( strType . length ( ) > 0 ) ) { String strProgram = record . getField ( "Program" ) . toString ( ) ; if ( strType . equalsIgnoreCase ( Params . MENU ) ) { field = record . getField ( "ID" ) ; String strID = field . toString ( ) ; return ' ' + strType + ' ' + strID + strParams ; } else if ( strType . equalsIgnoreCase ( "applet" ) ) { return ' ' + strType + ' ' + strProgram + strParams ; } else if ( strType . equalsIgnoreCase ( "link" ) ) { strParams = strProgram ; if ( ( ( strParams . indexOf ( ' ' ) < strParams . indexOf ( ' ' ) ) && ( strParams . indexOf ( ' ' ) != - 1 ) ) || ( ( strParams . indexOf ( ' ' ) == - 1 ) && ( strParams . indexOf ( ' ' ) == - 1 ) ) ) strParams = "http://" + strParams ; // Default command = html link return strParams ; } } } return this . getMenuName ( record ) ; // Command = name }
Get the menu command to send to handle command .