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
    }
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 ; return strParams ; } } } return this . getMenuName ( record ) ; }
Get the menu command to send to handle command.
@param record The menu record.
@return The command for this menu item.