Modified: ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/Parser.jj
URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/Parser.jj?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/Parser.jj (original) +++ ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/Parser.jj Wed Mar 24 09:23:07 2010 @@ -49,773 +49,773 @@ import javolution.util.FastMap; import javolution.util.FastSet; public final class Parser { - private boolean deleteSupportsUsing = true; - private boolean updateSupportsFrom = true; + private boolean deleteSupportsUsing = true; + private boolean updateSupportsFrom = true; - public Parser deleteSupportsUsing(boolean value) { - deleteSupportsUsing = value; - return this; - } - - public Parser updateSupportsFrom(boolean value) { - updateSupportsFrom = value; - return this; - } - - private Condition reduce(List<Condition> conditions, Joiner joiner) { - if (conditions.size() == 1) { - return conditions.get(0); - } - return new ConditionList(joiner, conditions); - } + public Parser deleteSupportsUsing(boolean value) { + deleteSupportsUsing = value; + return this; + } + + public Parser updateSupportsFrom(boolean value) { + updateSupportsFrom = value; + return this; + } + + private Condition reduce(List<Condition> conditions, Joiner joiner) { + if (conditions.size() == 1) { + return conditions.get(0); + } + return new ConditionList(joiner, conditions); + } } PARSER_END(Parser) TOKEN_MGR_DECLS: { - private final FastList<Integer> stack = new FastList<Integer>(); + private final FastList<Integer> stack = new FastList<Integer>(); - void pushState(int newState) { - stack.add(curLexState); - SwitchTo(newState); - } - - void popState() { - SwitchTo(stack.removeLast()); - } + void pushState(int newState) { + stack.add(curLexState); + SwitchTo(newState); + } + + void popState() { + SwitchTo(stack.removeLast()); + } } TOKEN: { - <OPEN_PAREN: "("> -| <CLOSE_PAREN: ")"> -| <AND: "AND"> -| <OR: "OR"> -| <PERIOD: "."> -| <JOIN: "JOIN"> -| <LEFT: "LEFT"> -| <AS: "AS"> -| <WHERE: "WHERE"> -| <HAVING: "HAVING"> -| <GROUP: "GROUP"> -| <ORDER: "ORDER"> -//| <UNION: "UNION"> -| <BY: "BY"> -| <ON: "ON"> -| <USING: "USING"> -| <LIMIT: "LIMIT"> -| <OFFSET: "OFFSET"> -| <SELECT: "SELECT"> -| <DELETE: "DELETE"> -| <UPDATE: "UPDATE"> -| <INSERT: "INSERT"> -| <RELATION: "RELATION"> -| <EXCLUDE: "EXCLUDE"> -| <UPPER: "UPPER"> -| <LOWER: "LOWER"> -| <TYPE: "TYPE"> -| <TITLE: "TITLE"> -| <SET: "SET"> -| <FROM: "FROM"> -| <SEMI: ";"> -| <STAR: "*"> -| <COMMA: ","> -| <PLUS: "+"> -| <MINUS: "-"> -| <DESC: "DESC"> -| <ASC: "ASC"> -| <EQUALS: "="> -| <BETWEEN: "BETWEEN"> -| <INTO: "INTO"> -| <VALUES: "VALUES"> -| <CREATE: "CREATE"> -| <VIEW: "VIEW"> -| <IS: "IS"> -| <NOT: "NOT"> -| <NULL: "NULL"> -| <START_DQUOTE: "\""> { pushState(IN_DQUOTE); } -| <START_SQUOTE: "'"> { pushState(IN_SQUOTE); } -| <INTEGER: - "0" ( - "x" (["0"-"9","a"-"b"])+ - | (["0"-"7"])+ - ) - | ["1"-"9"] (["0"-"9"])* - > -| <NAME: ["a"-"z"] (["a"-"z","0"-"9","_","-"])*> -| <PARAMETER: "?" (["a"-"z"])+> -//| <WORD: (~["'", "\"", "/", " ", "\f", "\n", "\r", "\t", "*"])+> + <OPEN_PAREN: "("> +| <CLOSE_PAREN: ")"> +| <AND: "AND"> +| <OR: "OR"> +| <PERIOD: "."> +| <JOIN: "JOIN"> +| <LEFT: "LEFT"> +| <AS: "AS"> +| <WHERE: "WHERE"> +| <HAVING: "HAVING"> +| <GROUP: "GROUP"> +| <ORDER: "ORDER"> +//| <UNION: "UNION"> +| <BY: "BY"> +| <ON: "ON"> +| <USING: "USING"> +| <LIMIT: "LIMIT"> +| <OFFSET: "OFFSET"> +| <SELECT: "SELECT"> +| <DELETE: "DELETE"> +| <UPDATE: "UPDATE"> +| <INSERT: "INSERT"> +| <RELATION: "RELATION"> +| <EXCLUDE: "EXCLUDE"> +| <UPPER: "UPPER"> +| <LOWER: "LOWER"> +| <TYPE: "TYPE"> +| <TITLE: "TITLE"> +| <SET: "SET"> +| <FROM: "FROM"> +| <SEMI: ";"> +| <STAR: "*"> +| <COMMA: ","> +| <PLUS: "+"> +| <MINUS: "-"> +| <DESC: "DESC"> +| <ASC: "ASC"> +| <EQUALS: "="> +| <BETWEEN: "BETWEEN"> +| <INTO: "INTO"> +| <VALUES: "VALUES"> +| <CREATE: "CREATE"> +| <VIEW: "VIEW"> +| <IS: "IS"> +| <NOT: "NOT"> +| <NULL: "NULL"> +| <START_DQUOTE: "\""> { pushState(IN_DQUOTE); } +| <START_SQUOTE: "'"> { pushState(IN_SQUOTE); } +| <INTEGER: + "0" ( + "x" (["0"-"9","a"-"b"])+ + | (["0"-"7"])+ + ) + | ["1"-"9"] (["0"-"9"])* + > +| <NAME: ["a"-"z"] (["a"-"z","0"-"9","_","-"])*> +| <PARAMETER: "?" (["a"-"z"])+> +//| <WORD: (~["'", "\"", "/", " ", "\f", "\n", "\r", "\t", "*"])+> } <DEFAULT> SKIP: { - <SPACE: " " | "\f" | "\n" | "\r" | "\t"> + <SPACE: " " | "\f" | "\n" | "\r" | "\t"> } <*> MORE: { - <COMMENT_START: "/*"> { if (curLexState != IN_COMMENT) pushState(IN_COMMENT); } + <COMMENT_START: "/*"> { if (curLexState != IN_COMMENT) pushState(IN_COMMENT); } } <IN_COMMENT> MORE: { - <(~[])> -| <COMMENT_END: "*/"> { popState(); } + <(~[])> +| <COMMENT_END: "*/"> { popState(); } } <IN_DQUOTE,IN_SQUOTE> TOKEN: { - <ESCAPED: "\\" ["r", "n", "b", "t", "f"]> + <ESCAPED: "\\" ["r", "n", "b", "t", "f"]> } <IN_DQUOTE> TOKEN: { - <END_DQUOTE: "\""> { popState(); } + <END_DQUOTE: "\""> { popState(); } } <IN_SQUOTE> TOKEN: { - <ESCAPE_SQUOTE: "''"> -| <END_SQUOTE: "'"> { popState(); } + <ESCAPE_SQUOTE: "''"> +| <END_SQUOTE: "'"> { popState(); } } <DEFAULT,IN_DQUOTE,IN_SQUOTE> TOKEN: { - <TEXT: (~[])> + <TEXT: (~[])> } // ------------------- public List<SQLStatement<?>> SQLFile(): { - List<SQLStatement<?>> list = FastList.newInstance(); - SQLStatement<?> statement; + List<SQLStatement<?>> list = FastList.newInstance(); + SQLStatement<?> statement; } { - ( statement=Statement() ( <SEMI> )? { list.add(statement); } )* - <EOF> - { return list; } + ( statement=Statement() ( <SEMI> )? { list.add(statement); } )* + <EOF> + { return list; } } public SQLStatement StandaloneStatement(): { - SQLStatement statement; + SQLStatement statement; } { - statement=Statement() ( <SEMI> )? <EOF> { return statement; } + statement=Statement() ( <SEMI> )? <EOF> { return statement; } } public SQLView ViewStatement(): { - SQLView sqlView; + SQLView sqlView; } { - sqlView=View() ( <SEMI> )? <EOF> { return sqlView; } + sqlView=View() ( <SEMI> )? <EOF> { return sqlView; } } public SQLSelect SelectStatement(): { - SQLSelect sqlSelect; + SQLSelect sqlSelect; } { - sqlSelect=Select() ( <SEMI> )? <EOF> { return sqlSelect; } + sqlSelect=Select() ( <SEMI> )? <EOF> { return sqlSelect; } } public SQLDelete DeleteStatement(): { - SQLDelete sqlDelete; + SQLDelete sqlDelete; } { - sqlDelete=Delete() ( <SEMI> )? <EOF> { return sqlDelete; } + sqlDelete=Delete() ( <SEMI> )? <EOF> { return sqlDelete; } } public SQLUpdate UpdateStatement(): { - SQLUpdate sqlUpdate; + SQLUpdate sqlUpdate; } { - sqlUpdate=Update() ( <SEMI> )? <EOF> { return sqlUpdate; } + sqlUpdate=Update() ( <SEMI> )? <EOF> { return sqlUpdate; } } public SQLInsert InsertStatement(): { - SQLInsert sqlInsert; + SQLInsert sqlInsert; } { - sqlInsert=Insert() ( <SEMI> )? <EOF> { return sqlInsert; } + sqlInsert=Insert() ( <SEMI> )? <EOF> { return sqlInsert; } } public Condition Condition(): { Condition c; } { - c=ConditionExpression() <EOF> { return c; } + c=ConditionExpression() <EOF> { return c; } } private SQLStatement Statement(): { - SQLStatement statement; + SQLStatement statement; } { - ( - statement=Select() { return statement; } - | statement=Delete() { return statement; } - | statement=Update() { return statement; } - | statement=Insert() { return statement; } - | statement=View() { return statement; } - ) + ( + statement=Select() { return statement; } + | statement=Delete() { return statement; } + | statement=Update() { return statement; } + | statement=Insert() { return statement; } + | statement=View() { return statement; } + ) } private SQLView View(): { - String name; - SQLSelect sqlSelect; + String name; + SQLSelect sqlSelect; } { - <CREATE> <VIEW> name=NamePart() <AS> sqlSelect=Select() - { return new SQLView(name, sqlSelect); } + <CREATE> <VIEW> name=NamePart() <AS> sqlSelect=Select() + { return new SQLView(name, sqlSelect); } } private SQLSelect Select(): { - Integer i; - List<OrderByItem> orderBy = null; - List<String> groupBy = null; - Map<String, FieldDef> fieldDefs = FastMap.newInstance(); - List<FieldAll> fieldAlls = FastList.newInstance(); - Set<String> fieldAllAliases = FastSet.newInstance(); - Table table; - Map<String, Relation> relations = FastMap.newInstance(); - Condition whereCondition = null, havingCondition = null; - int offset = -1, limit = -1; -} -{ - <SELECT> ( - FieldDef(fieldDefs, fieldAlls, fieldAllAliases) - ( <COMMA> FieldDef(fieldDefs, fieldAlls, fieldAllAliases) )* - ) - <FROM> table=Table() - ( <RELATION> Relation(relations) )* - ( <WHERE> whereCondition=ConditionExpression() )? - ( <HAVING> havingCondition=ConditionExpression() )? - ( <GROUP> <BY> groupBy=FieldList() )? - ( <ORDER> <BY> orderBy=OrderByList() )? - ( <OFFSET> offset=Integer() )? - ( <LIMIT> limit=Integer() )? - { return new SQLSelect(fieldAlls, fieldDefs, table, relations, whereCondition, havingCondition, groupBy, orderBy, offset, limit); } + Integer i; + List<OrderByItem> orderBy = null; + List<String> groupBy = null; + Map<String, FieldDef> fieldDefs = FastMap.newInstance(); + List<FieldAll> fieldAlls = FastList.newInstance(); + Set<String> fieldAllAliases = FastSet.newInstance(); + Table table; + Map<String, Relation> relations = FastMap.newInstance(); + Condition whereCondition = null, havingCondition = null; + int offset = -1, limit = -1; +} +{ + <SELECT> ( + FieldDef(fieldDefs, fieldAlls, fieldAllAliases) + ( <COMMA> FieldDef(fieldDefs, fieldAlls, fieldAllAliases) )* + ) + <FROM> table=Table() + ( <RELATION> Relation(relations) )* + ( <WHERE> whereCondition=ConditionExpression() )? + ( <HAVING> havingCondition=ConditionExpression() )? + ( <GROUP> <BY> groupBy=FieldList() )? + ( <ORDER> <BY> orderBy=OrderByList() )? + ( <OFFSET> offset=Integer() )? + ( <LIMIT> limit=Integer() )? + { return new SQLSelect(fieldAlls, fieldDefs, table, relations, whereCondition, havingCondition, groupBy, orderBy, offset, limit); } } private void Relation(Map<String, Relation> relations): { - String type = null, title = null, entityName; - List<KeyMap> keyMaps; + String type = null, title = null, entityName; + List<KeyMap> keyMaps; } { - ( <TYPE> type=NamePart() )? - ( <TITLE> title=NamePart() )? - <NAME> { entityName = getToken(0).image; } - keyMaps=KeyMaps("cur", "other") - { - Relation relation = new Relation(type, title, entityName, keyMaps); - if (relations.containsKey(relation.getName())) throw new ParseException("Duplicate relation: " + relation); - relations.put(relation.getName(), relation); - } + ( <TYPE> type=NamePart() )? + ( <TITLE> title=NamePart() )? + <NAME> { entityName = getToken(0).image; } + keyMaps=KeyMaps("cur", "other") + { + Relation relation = new Relation(type, title, entityName, keyMaps); + if (relations.containsKey(relation.getName())) throw new ParseException("Duplicate relation: " + relation); + relations.put(relation.getName(), relation); + } } private SQLUpdate Update(): { - TableName tableName; - List<Table> tableList = null; - Condition whereCondition = null; - List<SetField> allSetFields = FastList.newInstance(); - List<SetField> setFields; - Joined joined = null; + TableName tableName; + List<Table> tableList = null; + Condition whereCondition = null; + List<SetField> allSetFields = FastList.newInstance(); + List<SetField> setFields; + Joined joined = null; } { - <UPDATE> tableName=TableName() - <SET> - setFields=SetField() { allSetFields.addAll(setFields); } - ( <COMMA> setFields=SetField() { allSetFields.addAll(setFields); } )* - ( LOOKAHEAD(<FROM>, {updateSupportsFrom}) <FROM> joined=JoinedRest(false, tableName) )? - ( <WHERE> whereCondition=ConditionExpression() )? - { return new SQLUpdate(new Table(tableName, joined), allSetFields, whereCondition); } + <UPDATE> tableName=TableName() + <SET> + setFields=SetField() { allSetFields.addAll(setFields); } + ( <COMMA> setFields=SetField() { allSetFields.addAll(setFields); } )* + ( LOOKAHEAD(<FROM>, {updateSupportsFrom}) <FROM> joined=JoinedRest(false, tableName) )? + ( <WHERE> whereCondition=ConditionExpression() )? + { return new SQLUpdate(new Table(tableName, joined), allSetFields, whereCondition); } } private SQLDelete Delete(): { - TableName tableName; - List<Table> tableList = null; - Condition whereCondition = null; - Joined joined = null; + TableName tableName; + List<Table> tableList = null; + Condition whereCondition = null; + Joined joined = null; } { - <DELETE> <FROM> tableName=TableName() - ( LOOKAHEAD(<USING>, {deleteSupportsUsing}) <USING> joined=JoinedRest(false, tableName) )? - ( <WHERE> whereCondition=ConditionExpression() )? - { return new SQLDelete(new Table(tableName, joined), whereCondition); } + <DELETE> <FROM> tableName=TableName() + ( LOOKAHEAD(<USING>, {deleteSupportsUsing}) <USING> joined=JoinedRest(false, tableName) )? + ( <WHERE> whereCondition=ConditionExpression() )? + { return new SQLDelete(new Table(tableName, joined), whereCondition); } } private SQLInsert Insert(): { - TableName tableName; - List<String> columns = FastList.newInstance(); - String n; - InsertSource source; + TableName tableName; + List<String> columns = FastList.newInstance(); + String n; + InsertSource source; } { - <INSERT> <INTO> tableName=TableName() ( - <OPEN_PAREN> - n=NamePart() { columns.add(n); } - ( <COMMA> n=NamePart() { columns.add(n); } )* - <CLOSE_PAREN> - )? - ( source=InsertValues() | source=Select() ) - { return new SQLInsert(tableName, source, columns); } + <INSERT> <INTO> tableName=TableName() ( + <OPEN_PAREN> + n=NamePart() { columns.add(n); } + ( <COMMA> n=NamePart() { columns.add(n); } )* + <CLOSE_PAREN> + )? + ( source=InsertValues() | source=Select() ) + { return new SQLInsert(tableName, source, columns); } } private InsertValues InsertValues(): { - List<InsertRow> list = FastList.newInstance(); - InsertRow row; + List<InsertRow> list = FastList.newInstance(); + InsertRow row; } { - <VALUES> - row=InsertRow() { list.add(row); } - ( <COMMA> row=InsertRow() { list.add(row); } )* - { return new InsertValues(list); } + <VALUES> + row=InsertRow() { list.add(row); } + ( <COMMA> row=InsertRow() { list.add(row); } )* + { return new InsertValues(list); } } private InsertRow InsertRow(): { - List<Value> list = FastList.newInstance(); - Value v; + List<Value> list = FastList.newInstance(); + Value v; } { - <OPEN_PAREN> - v=InsertValue() { list.add(v); } - ( <COMMA> v=InsertValue() { list.add(v); } )* - <CLOSE_PAREN> - { return new InsertRow(list); } + <OPEN_PAREN> + v=InsertValue() { list.add(v); } + ( <COMMA> v=InsertValue() { list.add(v); } )* + <CLOSE_PAREN> + { return new InsertRow(list); } } private Value InsertValue(): { - Value v; - Integer i; - String s; + Value v; + Integer i; + String s; } { - v=ParameterValue() { return v; } -| i=Integer() { return new NumberValue<Integer>(i); } -| s=SQuoted() { return new StringValue(s); } + v=ParameterValue() { return v; } +| i=Integer() { return new NumberValue<Integer>(i); } +| s=SQuoted() { return new StringValue(s); } } private List<SetField> SetField(): { - List<SetField> setFields = FastList.newInstance(); - String n; - Value v; - List<String> columnList = FastList.newInstance(); - List<Value> valueList = FastList.newInstance(); -} -{ - ( - n=NamePart() <EQUALS> ( - v=Value() { setFields.add(new SetField(n, v)); } - | v=MathValue() { setFields.add(new SetField(n, v)); } - ) - | <OPEN_PAREN> - n=NamePart() { columnList.add(n); } - ( <COMMA> n=NamePart() { columnList.add(n); } )* - <CLOSE_PAREN> - <EQUALS> - <OPEN_PAREN> - (v=Value()|v=MathValue()) { valueList.add(v); } - ( <COMMA> (v=Value()|v=MathValue()) { valueList.add(v); } )* - <CLOSE_PAREN> { - if (columnList.size() != valueList.size()) throw new ParseException(); - for (int i = 0; i < columnList.size(); i++) { - setFields.add(new SetField(columnList.get(i), valueList.get(i))); - } - } - ) - { return setFields; } + List<SetField> setFields = FastList.newInstance(); + String n; + Value v; + List<String> columnList = FastList.newInstance(); + List<Value> valueList = FastList.newInstance(); +} +{ + ( + n=NamePart() <EQUALS> ( + v=Value() { setFields.add(new SetField(n, v)); } + | v=MathValue() { setFields.add(new SetField(n, v)); } + ) + | <OPEN_PAREN> + n=NamePart() { columnList.add(n); } + ( <COMMA> n=NamePart() { columnList.add(n); } )* + <CLOSE_PAREN> + <EQUALS> + <OPEN_PAREN> + (v=Value()|v=MathValue()) { valueList.add(v); } + ( <COMMA> (v=Value()|v=MathValue()) { valueList.add(v); } )* + <CLOSE_PAREN> { + if (columnList.size() != valueList.size()) throw new ParseException(); + for (int i = 0; i < columnList.size(); i++) { + setFields.add(new SetField(columnList.get(i), valueList.get(i))); + } + } + ) + { return setFields; } } private Table Table(): { - TableName tableName; - Joined joined = null; + TableName tableName; + Joined joined = null; } { - tableName=TableName() - ( joined=Joined(tableName) )? - { return new Table(tableName, joined); } + tableName=TableName() + ( joined=Joined(tableName) )? + { return new Table(tableName, joined); } } private Joined Joined(TableName leftTableName): { - Boolean isOptional; - Joined joined = null; + Boolean isOptional; + Joined joined = null; } { - isOptional=Joiner() joined=JoinedRest(isOptional, leftTableName) - { return joined; } + isOptional=Joiner() joined=JoinedRest(isOptional, leftTableName) + { return joined; } } private Joined JoinedRest(boolean isOptional, TableName leftTableName): { - TableName rightTableName; - List<KeyMap> keyMaps; - Joined joined = null; + TableName rightTableName; + List<KeyMap> keyMaps; + Joined joined = null; } { - rightTableName=TableName() - keyMaps=KeyMaps(leftTableName.getAlias(), rightTableName.getAlias()) - ( joined=Joined(rightTableName) )? - { return new Joined(isOptional, rightTableName, keyMaps, joined); } + rightTableName=TableName() + keyMaps=KeyMaps(leftTableName.getAlias(), rightTableName.getAlias()) + ( joined=Joined(rightTableName) )? + { return new Joined(isOptional, rightTableName, keyMaps, joined); } } private List<KeyMap> KeyMaps(String leftAlias, String rightAlias): { - List<KeyMap> keyMaps = FastList.newInstance(); - String n; + List<KeyMap> keyMaps = FastList.newInstance(); + String n; } { - ( - <ON> - KeyMap(keyMaps, leftAlias, rightAlias) - ( <AND> KeyMap(keyMaps, leftAlias, rightAlias) )* - | - <USING> - n=NamePart() { keyMaps.add(new KeyMap(n, n)); } - ( <COMMA> n=NamePart() { keyMaps.add(new KeyMap(n, n)); } )* - ) - { return keyMaps; } + ( + <ON> + KeyMap(keyMaps, leftAlias, rightAlias) + ( <AND> KeyMap(keyMaps, leftAlias, rightAlias) )* + | + <USING> + n=NamePart() { keyMaps.add(new KeyMap(n, n)); } + ( <COMMA> n=NamePart() { keyMaps.add(new KeyMap(n, n)); } )* + ) + { return keyMaps; } } private void KeyMap(List<KeyMap> keyMaps, String leftAlias, String rightAlias): { - String alias1, field1; - String alias2, field2; + String alias1, field1; + String alias2, field2; } { - alias1=NamePart() <PERIOD> field1=NamePart() - <EQUALS> - alias2=NamePart() <PERIOD> field2=NamePart() - { - if (alias1.equals(leftAlias)) { - if (!alias2.equals(rightAlias)) throw new ParseException("invalid right alias(" + alias2 + "), expected(" + rightAlias + ")"); - keyMaps.add(new KeyMap(field1, field2)); - } else if (alias1.equals(rightAlias)) { - if (!alias2.equals(leftAlias)) throw new ParseException("invalid left alias(" + alias2 + "), expected(" + leftAlias + ")"); - keyMaps.add(new KeyMap(field2, field1)); - } else { - throw new ParseException("invalid aliases, expected(" + leftAlias + " or " + rightAlias + ")"); - } - } + alias1=NamePart() <PERIOD> field1=NamePart() + <EQUALS> + alias2=NamePart() <PERIOD> field2=NamePart() + { + if (alias1.equals(leftAlias)) { + if (!alias2.equals(rightAlias)) throw new ParseException("invalid right alias(" + alias2 + "), expected(" + rightAlias + ")"); + keyMaps.add(new KeyMap(field1, field2)); + } else if (alias1.equals(rightAlias)) { + if (!alias2.equals(leftAlias)) throw new ParseException("invalid left alias(" + alias2 + "), expected(" + leftAlias + ")"); + keyMaps.add(new KeyMap(field2, field1)); + } else { + throw new ParseException("invalid aliases, expected(" + leftAlias + " or " + rightAlias + ")"); + } + } } private TableName TableName(): { - String tableName, alias = null; + String tableName, alias = null; } { - tableName=NamePart() - ( (<AS>)? alias=NamePart() )? - { return new TableName(tableName, alias); } + tableName=NamePart() + ( (<AS>)? alias=NamePart() )? + { return new TableName(tableName, alias); } } private Boolean Joiner(): {} { - <LEFT> <JOIN> { return Boolean.TRUE; } -| <JOIN> { return Boolean.FALSE; } + <LEFT> <JOIN> { return Boolean.TRUE; } +| <JOIN> { return Boolean.FALSE; } } private void FieldDef(Map<String, FieldDef> fieldDefs, List<FieldAll> fieldAlls, Set<String> fieldAllAliases): { - StaticValue v; - String n, fieldAlias = null, fieldName, exc; - FieldDef def; - Set<String> excludeList = FastSet.newInstance(); -} -{ - ( - n=NamePart() ( - <PERIOD> ( - <STAR> - ( - { if (fieldAllAliases.contains(n)) throw new ParseException("Duplicate aliasAll(" + n + ")"); } - <EXCLUDE> <OPEN_PAREN> - exc=NamePart() { excludeList.add(exc); } - ( <COMMA> exc=NamePart() { excludeList.add(exc); } )* - <CLOSE_PAREN> - )? - { fieldAlls.add(new FieldAll(n, excludeList)); return; } - | fieldName=NamePart() ( <AS> fieldAlias=NamePart() )? { def = new FieldDefFieldValue(new FieldValue(n, fieldName), fieldAlias); } - ) - | v=FunctionCallRest(n) ( <AS> fieldAlias=NamePart() )? { def = new FieldDefValue(v, fieldAlias); } - | ( <AS> fieldAlias=NamePart() )? { def = new FieldDefFieldValue(new FieldValue(null, n), fieldAlias); } - ) - | v=MathValue() ( <AS> fieldAlias=NamePart() )? { def = new FieldDefValue(v, fieldAlias); } - ) { - if (fieldDefs.containsKey(def.getAlias())) throw new ParseException("duplicate alias(" + def.getAlias() + ")"); - fieldDefs.put(def.getAlias(), def); - } + StaticValue v; + String n, fieldAlias = null, fieldName, exc; + FieldDef def; + Set<String> excludeList = FastSet.newInstance(); +} +{ + ( + n=NamePart() ( + <PERIOD> ( + <STAR> + ( + { if (fieldAllAliases.contains(n)) throw new ParseException("Duplicate aliasAll(" + n + ")"); } + <EXCLUDE> <OPEN_PAREN> + exc=NamePart() { excludeList.add(exc); } + ( <COMMA> exc=NamePart() { excludeList.add(exc); } )* + <CLOSE_PAREN> + )? + { fieldAlls.add(new FieldAll(n, excludeList)); return; } + | fieldName=NamePart() ( <AS> fieldAlias=NamePart() )? { def = new FieldDefFieldValue(new FieldValue(n, fieldName), fieldAlias); } + ) + | v=FunctionCallRest(n) ( <AS> fieldAlias=NamePart() )? { def = new FieldDefValue(v, fieldAlias); } + | ( <AS> fieldAlias=NamePart() )? { def = new FieldDefFieldValue(new FieldValue(null, n), fieldAlias); } + ) + | v=MathValue() ( <AS> fieldAlias=NamePart() )? { def = new FieldDefValue(v, fieldAlias); } + ) { + if (fieldDefs.containsKey(def.getAlias())) throw new ParseException("duplicate alias(" + def.getAlias() + ")"); + fieldDefs.put(def.getAlias(), def); + } } private StaticValue MathValue(): { - ConstantValue v; - List<ConstantValue> values = FastList.newInstance(); - String operator = null, newOperator; -} -{ - <OPEN_PAREN> - v=ConstantValue() { values.add(v); } - ( - newOperator=MathOperator() - v=ConstantValue() { - if (operator == null) { - operator = newOperator; - } else if (!newOperator.equals(operator)) { - throw new ParseException("Different operators in complex alias(" + operator + ":" + newOperator + ")"); - } - values.add(v); - } - )* - <CLOSE_PAREN> - { - if (values.size() == 1 && values.get(0) instanceof StaticValue) return (StaticValue) values.get(0); - return new MathValue(operator, values); - } + ConstantValue v; + List<ConstantValue> values = FastList.newInstance(); + String operator = null, newOperator; +} +{ + <OPEN_PAREN> + v=ConstantValue() { values.add(v); } + ( + newOperator=MathOperator() + v=ConstantValue() { + if (operator == null) { + operator = newOperator; + } else if (!newOperator.equals(operator)) { + throw new ParseException("Different operators in complex alias(" + operator + ":" + newOperator + ")"); + } + values.add(v); + } + )* + <CLOSE_PAREN> + { + if (values.size() == 1 && values.get(0) instanceof StaticValue) return (StaticValue) values.get(0); + return new MathValue(operator, values); + } } private FunctionCall FunctionCallRest(String name): { - Value arg; - List<Value> args = FastList.newInstance(); + Value arg; + List<Value> args = FastList.newInstance(); } { - <OPEN_PAREN> - ( - arg=Value() { args.add(arg); } - ( <COMMA> arg=Value() { args.add(arg); } )* - ) ? - <CLOSE_PAREN> - { return new FunctionCall(name, args); } + <OPEN_PAREN> + ( + arg=Value() { args.add(arg); } + ( <COMMA> arg=Value() { args.add(arg); } )* + ) ? + <CLOSE_PAREN> + { return new FunctionCall(name, args); } } private ConstantValue ConstantValue(): { - String n; - ConstantValue v; - int i; - String s; + String n; + ConstantValue v; + int i; + String s; } { - n=NamePart() ( - v=FunctionCallRest(n) { return v; } - | v=FieldValue(n) { return v; } - ) -| i=Integer() { return new NumberValue<Integer>(i); } -| s=SQuoted() { return new StringValue(s); } -| v=MathValue() { return v; } + n=NamePart() ( + v=FunctionCallRest(n) { return v; } + | v=FieldValue(n) { return v; } + ) +| i=Integer() { return new NumberValue<Integer>(i); } +| s=SQuoted() { return new StringValue(s); } +| v=MathValue() { return v; } } private String NamePart(): {} { - <NAME> { return getToken(0).image; } -| <TYPE> { return getToken(0).image; } + <NAME> { return getToken(0).image; } +| <TYPE> { return getToken(0).image; } } private String DQuoted(): { StringBuilder sb = new StringBuilder(); } { - <START_DQUOTE> (<TEXT> { sb.append(getToken(0).image); } | <ESCAPED> { sb.append(getToken(0).image); })* <END_DQUOTE> - { return sb.toString(); } + <START_DQUOTE> (<TEXT> { sb.append(getToken(0).image); } | <ESCAPED> { sb.append(getToken(0).image); })* <END_DQUOTE> + { return sb.toString(); } } private String SQuoted(): { StringBuilder sb = new StringBuilder(); } { - <START_SQUOTE> ( - <TEXT> { sb.append(getToken(0).image); } - | <ESCAPED> { sb.append(getToken(0).image); } - | <ESCAPE_SQUOTE> { sb.append("'"); } - )* <END_SQUOTE> - { return sb.toString(); } + <START_SQUOTE> ( + <TEXT> { sb.append(getToken(0).image); } + | <ESCAPED> { sb.append(getToken(0).image); } + | <ESCAPE_SQUOTE> { sb.append("'"); } + )* <END_SQUOTE> + { return sb.toString(); } } private List<String> FieldList(): { - List<String> list = FastList.newInstance(); - String n; + List<String> list = FastList.newInstance(); + String n; } { - n=NamePart() { list.add(n); } - ( <COMMA> n=NamePart() { list.add(n); } )* - { return list; } + n=NamePart() { list.add(n); } + ( <COMMA> n=NamePart() { list.add(n); } )* + { return list; } } private FieldValue FieldValue(String fieldName): { - String s; + String s; } { - ( <PERIOD> s=NamePart() { return new FieldValue(fieldName, s); } )? - { - return new FieldValue(fieldName); - } + ( <PERIOD> s=NamePart() { return new FieldValue(fieldName, s); } )? + { + return new FieldValue(fieldName); + } } private List<OrderByItem> OrderByList(): { - List<OrderByItem> orderBy = FastList.newInstance(); - OrderByItem obi; + List<OrderByItem> orderBy = FastList.newInstance(); + OrderByItem obi; } { - obi=OrderByItem() { orderBy.add(obi); } - ( <COMMA> obi=OrderByItem() { orderBy.add(obi); } )* - { return orderBy; } + obi=OrderByItem() { orderBy.add(obi); } + ( <COMMA> obi=OrderByItem() { orderBy.add(obi); } )* + { return orderBy; } } private OrderByItem OrderByItem(): { - String functionName = null, fieldName = null; - boolean descending = false, orderingSet = false; - OrderByItem.Order ordering = OrderByItem.Order.DEFAULT; -} -{ - ( - <PLUS> { ordering = OrderByItem.Order.ASCENDING; } - | <MINUS> { ordering = OrderByItem.Order.DESCENDING; } - )? - ( - ( <UPPER> | <LOWER> ) { functionName = getToken(0).image; } - <OPEN_PAREN> fieldName=NamePart() <CLOSE_PAREN> - | fieldName=NamePart() - ) - LOOKAHEAD({!orderingSet}) ( - <DESC> { ordering = OrderByItem.Order.DESCENDING; } - | <ASC> { ordering = OrderByItem.Order.ASCENDING; } - )? - { return new OrderByItem(ordering, functionName, fieldName); } + String functionName = null, fieldName = null; + boolean descending = false, orderingSet = false; + OrderByItem.Order ordering = OrderByItem.Order.DEFAULT; +} +{ + ( + <PLUS> { ordering = OrderByItem.Order.ASCENDING; } + | <MINUS> { ordering = OrderByItem.Order.DESCENDING; } + )? + ( + ( <UPPER> | <LOWER> ) { functionName = getToken(0).image; } + <OPEN_PAREN> fieldName=NamePart() <CLOSE_PAREN> + | fieldName=NamePart() + ) + LOOKAHEAD({!orderingSet}) ( + <DESC> { ordering = OrderByItem.Order.DESCENDING; } + | <ASC> { ordering = OrderByItem.Order.ASCENDING; } + )? + { return new OrderByItem(ordering, functionName, fieldName); } } private Integer Integer(): {} { - <INTEGER> { return Integer.decode(getToken(0).image); } + <INTEGER> { return Integer.decode(getToken(0).image); } } private Value Value(): { - String n; - Value v; - int i; - String s; + String n; + Value v; + int i; + String s; } { - n=NamePart() ( - v=FunctionCallRest(n) { return v; } - | v=FieldValue(n) { return v; } - ) -| i=Integer() { return new NumberValue<Integer>(i); } -| s=SQuoted() { return new StringValue(s); } + n=NamePart() ( + v=FunctionCallRest(n) { return v; } + | v=FieldValue(n) { return v; } + ) +| i=Integer() { return new NumberValue<Integer>(i); } +| s=SQuoted() { return new StringValue(s); } } private Condition ConditionExpression(): { Condition c; } { - c=OrExpression() { return c; } + c=OrExpression() { return c; } } private Condition AndExpression(): { - List<Condition> list = FastList.newInstance(); - Condition c; + List<Condition> list = FastList.newInstance(); + Condition c; } { - c=BooleanExpression() { list.add(c); } + c=BooleanExpression() { list.add(c); } ( <AND> c=BooleanExpression() { list.add(c); } )* - { return reduce(list, Joiner.AND); } + { return reduce(list, Joiner.AND); } } private Condition OrExpression(): { - List<Condition> list = FastList.newInstance(); - Condition c; + List<Condition> list = FastList.newInstance(); + Condition c; } { - c=AndExpression() { list.add(c); } + c=AndExpression() { list.add(c); } ( <OR> c=AndExpression() { list.add(c); } )* - { return reduce(list, Joiner.OR); } + { return reduce(list, Joiner.OR); } } private Value RightValue(): { - Value v; + Value v; } { - v=Value() { return v; } -| v=ParameterValue() { return v; } + v=Value() { return v; } +| v=ParameterValue() { return v; } } private ParameterValue ParameterValue(): {} { - <PARAMETER> { return new ParameterValue(getToken(0).image.substring(1)); } + <PARAMETER> { return new ParameterValue(getToken(0).image.substring(1)); } } private Condition BooleanExpression(): { - Value v1, v2, v, r1, r2; - String op; - Condition c; - List<Value> list = FastList.newInstance(); -} -{ - v1=Value() ( - <BETWEEN> - r1=RightValue() - <AND> - r2=RightValue() - { return new BetweenCondition(v1, r1, r2); } - | <IS> ( - <NULL> { op = "="; v2 = Value.NULL; } - | <NOT> <NULL> { op = "!="; v2 = Value.NULL; } - ) - | op=ComparisonOperator() ( - v2=RightValue() - | <OPEN_PAREN> - v=RightValue() { list.add(v); } - ( <COMMA> v=RightValue() { list.add(v); } )* - <CLOSE_PAREN> - { return new ListCondition(v1, op, list); } - ) - ) - { return new BooleanCondition(v1, op, v2); } -| <OPEN_PAREN> c=ConditionExpression() <CLOSE_PAREN> { return c; } + Value v1, v2, v, r1, r2; + String op; + Condition c; + List<Value> list = FastList.newInstance(); +} +{ + v1=Value() ( + <BETWEEN> + r1=RightValue() + <AND> + r2=RightValue() + { return new BetweenCondition(v1, r1, r2); } + | <IS> ( + <NULL> { op = "="; v2 = Value.NULL; } + | <NOT> <NULL> { op = "!="; v2 = Value.NULL; } + ) + | op=ComparisonOperator() ( + v2=RightValue() + | <OPEN_PAREN> + v=RightValue() { list.add(v); } + ( <COMMA> v=RightValue() { list.add(v); } )* + <CLOSE_PAREN> + { return new ListCondition(v1, op, list); } + ) + ) + { return new BooleanCondition(v1, op, v2); } +| <OPEN_PAREN> c=ConditionExpression() <CLOSE_PAREN> { return c; } } private String ComparisonOperator(): { - StringBuilder sb; + StringBuilder sb; } { - (<TEXT>)+ { sb = new StringBuilder(); sb.append(getToken(0).image); } - ( - <EQUALS> { sb.append(getToken(0).image); } - ((<TEXT>)+ { sb.append(getToken(0).image); })? - )* { return sb.toString(); } -| <NAME> { return getToken(0).image; } -| <EQUALS> { return getToken(0).image.toLowerCase(); } + (<TEXT>)+ { sb = new StringBuilder(); sb.append(getToken(0).image); } + ( + <EQUALS> { sb.append(getToken(0).image); } + ((<TEXT>)+ { sb.append(getToken(0).image); })? + )* { return sb.toString(); } +| <NAME> { return getToken(0).image; } +| <EQUALS> { return getToken(0).image.toLowerCase(); } } private String MathOperator(): {} { - ( <TEXT> )+ { return getToken(0).image.toLowerCase(); } -| <NAME> { return getToken(0).image.toLowerCase(); } + ( <TEXT> )+ { return getToken(0).image.toLowerCase(); } +| <NAME> { return getToken(0).image.toLowerCase(); } } Modified: ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/test/GoodParseAll.sql URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/test/GoodParseAll.sql?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/test/GoodParseAll.sql (original) +++ ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/test/GoodParseAll.sql Wed Mar 24 09:23:07 2010 @@ -18,46 +18,46 @@ */ SELECT - a.*, - b.* EXCLUDE (partyId, partyId), - c.* EXCLUDE (partyId), - d.roleTypeId, - d.description AS roleDescription, - SUM(a.partyId), - FOO(a.partyId, 1) AS baz, - (a.partyId || '-' || a.partyTypeId) AS one + a.*, + b.* EXCLUDE (partyId, partyId), + c.* EXCLUDE (partyId), + d.roleTypeId, + d.description AS roleDescription, + SUM(a.partyId), + FOO(a.partyId, 1) AS baz, + (a.partyId || '-' || a.partyTypeId) AS one FROM - Party a LEFT JOIN Person b USING partyId - LEFT JOIN PartyGroup c ON b.partyId = c.partyId - JOIN PartyRole d ON c.partyId = d.partyId AND c.partyId = d.partyId + Party a LEFT JOIN Person b USING partyId + LEFT JOIN PartyGroup c ON b.partyId = c.partyId + JOIN PartyRole d ON c.partyId = d.partyId AND c.partyId = d.partyId RELATION TYPE one TITLE MainA Person USING partyId RELATION TITLE MainB Person USING partyId RELATION TYPE one Person USING partyId RELATION PartyGroup USING partyId WHERE - a.partyTypeId = 'PERSON' - AND - b.lastName LIKE ?lastName - AND - b.birthDate BETWEEN '1974-12-01' AND '1974-12-31' - OR - ( - b.partyId IN ('1', '2', '3', '4') - AND - b.gender = 'M' - ) - + a.partyTypeId = 'PERSON' + AND + b.lastName LIKE ?lastName + AND + b.birthDate BETWEEN '1974-12-01' AND '1974-12-31' + OR + ( + b.partyId IN ('1', '2', '3', '4') + AND + b.gender = 'M' + ) + HAVING - b.firstName LIKE '%foo%' + b.firstName LIKE '%foo%' ORDER BY - LOWER(lastName), firstName, birthDate DESC + LOWER(lastName), firstName, birthDate DESC OFFSET 5 LIMIT 10 ; INSERT INTO Party (partyId, partyTypeId, statusId) VALUES - ('a', 'PERSON', 'PARTY_DISABLED'), - (5, 'PARTY_GROUP', ?name); + ('a', 'PERSON', 'PARTY_DISABLED'), + (5, 'PARTY_GROUP', ?name); INSERT INTO Person (partyId, firstName) SELECT partyId, (partyId || '-auto') AS firstName FROM Party WHERE partyId IN ('a', 'b'); UPDATE Person SET (lastName) = (('auto-' || partyId)) WHERE partyId IN ('a', 'b'); UPDATE Person SET (lastName, height, width) = (('auto-' || partyId), 5, 7) WHERE partyId IN ('a', 'b'); Modified: ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/test/TestSelect.sql URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/test/TestSelect.sql?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/test/TestSelect.sql (original) +++ ofbiz/branches/multitenant20100310/framework/sql/src/org/ofbiz/sql/test/TestSelect.sql Wed Mar 24 09:23:07 2010 @@ -18,27 +18,27 @@ */ SELECT - a.*, - b.firstName, - b.lastName + a.*, + b.firstName, + b.lastName FROM - Party a JOIN Person b ON a.partyId = b.partyId + Party a JOIN Person b ON a.partyId = b.partyId WHERE - a.partyTypeId = 'PERSON' - AND - b.lastName LIKE ?lastName + a.partyTypeId = 'PERSON' + AND + b.lastName LIKE ?lastName HAVING - b.firstName LIKE '%foo%' + b.firstName LIKE '%foo%' OFFSET 5 LIMIT 10 ; SELECT - a.partyTypeId, - COUNT(a.partyId) AS count + a.partyTypeId, + COUNT(a.partyId) AS count FROM - Party a LEFT JOIN Person b USING partyId - LEFT JOIN PartyGroup c USING partyId + Party a LEFT JOIN Person b USING partyId + LEFT JOIN PartyGroup c USING partyId GROUP BY - partyTypeId + partyTypeId ; Modified: ofbiz/branches/multitenant20100310/framework/testtools/documents/TestTools.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/testtools/documents/TestTools.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/testtools/documents/TestTools.xml (original) +++ ofbiz/branches/multitenant20100310/framework/testtools/documents/TestTools.xml Wed Mar 24 09:23:07 2010 @@ -18,13 +18,13 @@ under the License. --> <chapter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" - xsi:schemaLocation="http://docbook.org/ns/docbook ../../applications/content/dtd/docbook.xsd" - xmlns="http://docbook.org/ns/docbook"> - <title>The OFBiz Test Tools Introduction.</title> + version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" + xsi:schemaLocation="http://docbook.org/ns/docbook ../../applications/content/dtd/docbook.xsd" + xmlns="http://docbook.org/ns/docbook"> + <title>The OFBiz Test Tools Introduction.</title> <para> Ofbiz contains a test framework consisting out of the <link xl:href="http://junit.org">JUnit framework</link> and the <link xl:href="http://seleniumhq.org/">Selenium firefox plugin.</link> with the <link xl:href="http://sourceforge.net/projects/seleniumxml/">XML extension.</link> - For a excellent JUnit introduction check the <link xl:href="http://clarkware.com/articles/JUnitPrimer.html">Clarkware site.</link> + For a excellent JUnit introduction check the <link xl:href="http://clarkware.com/articles/JUnitPrimer.html">Clarkware site.</link> </para> </chapter> Modified: ofbiz/branches/multitenant20100310/framework/testtools/dtd/SeleniumXml.xsd URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/testtools/dtd/SeleniumXml.xsd?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/testtools/dtd/SeleniumXml.xsd (original) +++ ofbiz/branches/multitenant20100310/framework/testtools/dtd/SeleniumXml.xsd Wed Mar 24 09:23:07 2010 @@ -1,84 +1,84 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - elementFormDefault="qualified"> - <!-- - ================================================== - ========== Element and Attribute definitions for - ========== SeleniumXml project =================== - ================================================== - --> - <xs:group name="AllCommands"><!-- All SeleniumXml command which normally match with the SeleniumRC Java API. --> - <xs:choice> - <xs:element ref="testcase" /> - <xs:element ref="type" /> - <xs:element ref="loadData" /> - <xs:element ref="selectPopup" /> - <xs:element ref="getAllWindowIds" /> - <xs:element ref="captureTextInPage" /> - <xs:element ref="getSelectedLabel" /> - <xs:element ref="getSelectedValue" /> - <xs:element ref="getSelectedId" /> - <xs:element ref="assertContains" /> - <xs:element ref="getHtmlSource" /> - <xs:element ref="getBodyText" /> - <xs:element ref="print" /> - <xs:element ref="waitForPageToLoad" /> - <xs:element ref="getSelectedIds" /> - <xs:element ref="copy" /> - <xs:element ref="append" /> - <xs:element ref="open" /> - <xs:element ref="click" /> - <xs:element ref="select" /> - <xs:element ref="uniqueId" /> - <xs:element ref="randomAlphaString" /> - <xs:element ref="randomString" /> - <xs:element ref="setSpeed" /> - </xs:choice> - </xs:group> + elementFormDefault="qualified"> + <!-- + ================================================== + ========== Element and Attribute definitions for + ========== SeleniumXml project =================== + ================================================== + --> + <xs:group name="AllCommands"><!-- All SeleniumXml command which normally match with the SeleniumRC Java API. --> + <xs:choice> + <xs:element ref="testcase" /> + <xs:element ref="type" /> + <xs:element ref="loadData" /> + <xs:element ref="selectPopup" /> + <xs:element ref="getAllWindowIds" /> + <xs:element ref="captureTextInPage" /> + <xs:element ref="getSelectedLabel" /> + <xs:element ref="getSelectedValue" /> + <xs:element ref="getSelectedId" /> + <xs:element ref="assertContains" /> + <xs:element ref="getHtmlSource" /> + <xs:element ref="getBodyText" /> + <xs:element ref="print" /> + <xs:element ref="waitForPageToLoad" /> + <xs:element ref="getSelectedIds" /> + <xs:element ref="copy" /> + <xs:element ref="append" /> + <xs:element ref="open" /> + <xs:element ref="click" /> + <xs:element ref="select" /> + <xs:element ref="uniqueId" /> + <xs:element ref="randomAlphaString" /> + <xs:element ref="randomString" /> + <xs:element ref="setSpeed" /> + </xs:choice> + </xs:group> - <xs:element name="testcase"> - <xs:annotation> - <xs:documentation></xs:documentation> - </xs:annotation> + <xs:element name="testcase"> + <xs:annotation> + <xs:documentation></xs:documentation> + </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllCommands"/> - </xs:sequence> - - <xs:attributeGroup ref="attlist.name-value" /> - <xs:attribute name="LABEL" type="xs:string" use="required" /> - </xs:complexType> - </xs:element> - - <xs:element name="type" > - <xs:annotation> + <xs:complexType> + <xs:sequence> + <xs:group minOccurs="0" maxOccurs="unbounded" ref="AllCommands"/> + </xs:sequence> + + <xs:attributeGroup ref="attlist.name-value" /> + <xs:attribute name="LABEL" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + + <xs:element name="type" > + <xs:annotation> <xs:documentation> </xs:documentation> </xs:annotation> <xs:complexType> <xs:attributeGroup ref="attlist.name-value"/> - </xs:complexType> - </xs:element> + </xs:complexType> + </xs:element> <xs:element name="loadData"> <xs:annotation> <xs:documentation> @@ -88,7 +88,7 @@ <xs:attributeGroup ref="attlist.file"/> <xs:attributeGroup ref="attlist.loadData"/> </xs:complexType> - </xs:element> + </xs:element> <xs:element name="selectPopup"> <xs:annotation> @@ -118,7 +118,7 @@ <xs:complexType> <xs:attributeGroup ref="attlist.captureTextInPage"/> </xs:complexType> - </xs:element> + </xs:element> <xs:element name="getSelectedLabel"> <xs:annotation> @@ -306,10 +306,10 @@ </xs:complexType> </xs:element> - <!-- +++++++++++++++++++++++++++++++++++++++++++ --> - <!-- Attribute Lists for all Element definitions --> - <!-- +++++++++++++++++++++++++++++++++++++++++++ --> - <xs:attributeGroup name="attlist.file"> + <!-- +++++++++++++++++++++++++++++++++++++++++++ --> + <!-- Attribute Lists for all Element definitions --> + <!-- +++++++++++++++++++++++++++++++++++++++++++ --> + <xs:attributeGroup name="attlist.file"> <xs:attribute type="xs:string" name="file" use="optional"> <xs:annotation> <xs:documentation> @@ -318,7 +318,7 @@ </xs:attribute> </xs:attributeGroup> - <xs:attributeGroup name="attlist.name-value"> + <xs:attributeGroup name="attlist.name-value"> <xs:attribute type="xs:string" name="name" use="required"> <xs:annotation> <xs:documentation> Modified: ofbiz/branches/multitenant20100310/framework/testtools/dtd/test-suite.xsd URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/testtools/dtd/test-suite.xsd?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/testtools/dtd/test-suite.xsd (original) +++ ofbiz/branches/multitenant20100310/framework/testtools/dtd/test-suite.xsd Wed Mar 24 09:23:07 2010 @@ -39,7 +39,7 @@ under the License. <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element ref="test-case"/> <xs:element ref="test-group"/> - </xs:choice> + </xs:choice> <xs:attributeGroup ref="attlist.test-suite"/> </xs:complexType> </xs:element> Modified: ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.html URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.html?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.html (original) +++ ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.html Wed Mar 24 09:23:07 2010 @@ -30,124 +30,124 @@ <tr><td rowspan="1" colspan="3">AjaxExample</td></tr> </thead><tbody> <tr> - <td>open</td> - <td>/example/control/updateExampleFeature</td> - <td></td> + <td>open</td> + <td>/example/control/updateExampleFeature</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Logout</td> - <td></td> + <td>clickAndWait</td> + <td>link=Logout</td> + <td></td> </tr> <tr> - <td>type</td> - <td>PASSWORD</td> - <td>ofbiz</td> + <td>type</td> + <td>PASSWORD</td> + <td>ofbiz</td> </tr> <tr> - <td>clickAndWait</td> - <td>//input[@value='Login']</td> - <td></td> + <td>clickAndWait</td> + <td>//input[@value='Login']</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Ajax Examples</td> - <td></td> + <td>clickAndWait</td> + <td>link=Ajax Examples</td> + <td></td> </tr> <tr> - <td>type</td> - <td>exampleName</td> - <td>AJAX example name</td> + <td>type</td> + <td>exampleName</td> + <td>AJAX example name</td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>AJAX description</td> + <td>type</td> + <td>description</td> + <td>AJAX description</td> </tr> <tr> - <td>type</td> - <td>longDescription</td> - <td>This is a long description</td> + <td>type</td> + <td>longDescription</td> + <td>This is a long description</td> </tr> <tr> - <td>type</td> - <td>comments</td> - <td>this is a comment</td> + <td>type</td> + <td>comments</td> + <td>this is a comment</td> </tr> <tr> - <td>type</td> - <td>exampleSize</td> - <td>10</td> + <td>type</td> + <td>exampleSize</td> + <td>10</td> </tr> <tr> - <td>click</td> - <td>//img[@alt='View Calendar']</td> - <td></td> + <td>click</td> + <td>//img[@alt='View Calendar']</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[5]/td[2]/div</td> - <td></td> + <td>click</td> + <td>//tr[5]/td[2]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>link=OK</td> - <td></td> + <td>click</td> + <td>link=OK</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//div[@id='_G266__body']/table/tbody/tr[9]/td[2]/a/img</td> - <td></td> + <td>click</td> + <td>//div[@id='_G266__body']/table/tbody/tr[9]/td[2]/a/img</td> + <td></td> </tr> <tr> - <td>click</td> - <td>link=Now</td> - <td></td> + <td>click</td> + <td>link=Now</td> + <td></td> </tr> <tr> - <td>click</td> - <td>link=OK</td> - <td></td> + <td>click</td> + <td>link=OK</td> + <td></td> </tr> <tr> - <td>select</td> - <td>anotherText</td> - <td>label=Explicit Option</td> + <td>select</td> + <td>anotherText</td> + <td>label=Explicit Option</td> </tr> <tr> - <td>click</td> - <td>submitButton</td> - <td></td> + <td>click</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=10000</td> - <td></td> + <td>clickAndWait</td> + <td>link=10000</td> + <td></td> </tr> <tr> - <td>type</td> - <td>longDescription</td> - <td>This is a long description - this is a big update</td> + <td>type</td> + <td>longDescription</td> + <td>This is a long description - this is a big update</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Ajax Examples</td> - <td></td> + <td>clickAndWait</td> + <td>link=Ajax Examples</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=10000</td> - <td></td> + <td>clickAndWait</td> + <td>link=10000</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Printer Friendly</td> - <td></td> + <td>clickAndWait</td> + <td>link=Printer Friendly</td> + <td></td> </tr> </tbody></table> Modified: ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.html URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.html?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.html (original) +++ ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.html Wed Mar 24 09:23:07 2010 @@ -30,134 +30,134 @@ <tr><td rowspan="1" colspan="3">NewExample</td></tr> </thead><tbody> <tr> - <td>open</td> - <td>/example/control/FindExample?portalPageId=Example</td> - <td></td> + <td>open</td> + <td>/example/control/FindExample?portalPageId=Example</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Logout</td> - <td></td> + <td>clickAndWait</td> + <td>link=Logout</td> + <td></td> </tr> <tr> - <td>type</td> - <td>PASSWORD</td> - <td>ofbiz</td> + <td>type</td> + <td>PASSWORD</td> + <td>ofbiz</td> </tr> <tr> - <td>clickAndWait</td> - <td>//input[@value='Login']</td> - <td></td> + <td>clickAndWait</td> + <td>//input[@value='Login']</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=New Example</td> - <td></td> + <td>clickAndWait</td> + <td>link=New Example</td> + <td></td> </tr> <tr> - <td>select</td> - <td>statusId</td> - <td>label=Defined</td> + <td>select</td> + <td>statusId</td> + <td>label=Defined</td> </tr> <tr> - <td>type</td> - <td>exampleName</td> - <td>New Example 1</td> + <td>type</td> + <td>exampleName</td> + <td>New Example 1</td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>This is a description</td> + <td>type</td> + <td>description</td> + <td>This is a description</td> </tr> <tr> - <td>type</td> - <td>longDescription</td> - <td>Long description goes here</td> + <td>type</td> + <td>longDescription</td> + <td>Long description goes here</td> </tr> <tr> - <td>type</td> - <td>comments</td> - <td>comments go here</td> + <td>type</td> + <td>comments</td> + <td>comments go here</td> </tr> <tr> - <td>type</td> - <td>exampleSize</td> - <td>10</td> + <td>type</td> + <td>exampleSize</td> + <td>10</td> </tr> <tr> - <td>click</td> - <td>//img[@alt='View Calendar']</td> - <td></td> + <td>click</td> + <td>//img[@alt='View Calendar']</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[2]/td[5]/div</td> - <td></td> + <td>click</td> + <td>//tr[2]/td[5]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[2]/td[5]/div</td> - <td></td> + <td>click</td> + <td>//tr[2]/td[5]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//div[@id='_G152__body']/table/tbody/tr[9]/td[2]/a/img</td> - <td></td> + <td>click</td> + <td>//div[@id='_G152__body']/table/tbody/tr[9]/td[2]/a/img</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[3]/td[2]/div</td> - <td></td> + <td>click</td> + <td>//tr[3]/td[2]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>//tr[3]/td[2]/div</td> - <td></td> + <td>click</td> + <td>//tr[3]/td[2]/div</td> + <td></td> </tr> <tr> - <td>click</td> - <td>link=OK</td> - <td></td> + <td>click</td> + <td>link=OK</td> + <td></td> </tr> <tr> - <td>select</td> - <td>anotherText</td> - <td>label=Good</td> + <td>select</td> + <td>anotherText</td> + <td>label=Good</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Items</td> - <td></td> + <td>clickAndWait</td> + <td>link=Items</td> + <td></td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>Item 1</td> + <td>type</td> + <td>description</td> + <td>Item 1</td> </tr> <tr> - <td>type</td> - <td>amount</td> - <td>100</td> + <td>type</td> + <td>amount</td> + <td>100</td> </tr> <tr> - <td>select</td> - <td>amountUomId</td> - <td>label=Weight: Stone (st)</td> + <td>select</td> + <td>amountUomId</td> + <td>label=Weight: Stone (st)</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=New Example</td> - <td></td> + <td>clickAndWait</td> + <td>link=New Example</td> + <td></td> </tr> </tbody></table> Modified: ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.html URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.html?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.html (original) +++ ofbiz/branches/multitenant20100310/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.html Wed Mar 24 09:23:07 2010 @@ -30,89 +30,89 @@ <tr><td rowspan="1" colspan="3">NewFeature</td></tr> </thead><tbody> <tr> - <td>open</td> - <td>/example/control/EditExample</td> - <td></td> + <td>open</td> + <td>/example/control/EditExample</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Logout</td> - <td></td> + <td>clickAndWait</td> + <td>link=Logout</td> + <td></td> </tr> <tr> - <td>type</td> - <td>PASSWORD</td> - <td>ofbiz</td> + <td>type</td> + <td>PASSWORD</td> + <td>ofbiz</td> </tr> <tr> - <td>clickAndWait</td> - <td>//input[@value='Login']</td> - <td></td> + <td>clickAndWait</td> + <td>//input[@value='Login']</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Feature</td> - <td></td> + <td>clickAndWait</td> + <td>link=Feature</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>searchButton</td> - <td></td> + <td>clickAndWait</td> + <td>searchButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=New Example Feature</td> - <td></td> + <td>clickAndWait</td> + <td>link=New Example Feature</td> + <td></td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>New Feature 1000</td> + <td>type</td> + <td>description</td> + <td>New Feature 1000</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Examples</td> - <td></td> + <td>clickAndWait</td> + <td>link=Examples</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>//a[contains(@href, '/example/control/EditExampleFeature?exampleFeatureId=10000')]</td> - <td></td> + <td>clickAndWait</td> + <td>//a[contains(@href, '/example/control/EditExampleFeature?exampleFeatureId=10000')]</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=Feature</td> - <td></td> + <td>clickAndWait</td> + <td>link=Feature</td> + <td></td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>New Feature</td> + <td>type</td> + <td>description</td> + <td>New Feature</td> </tr> <tr> - <td>clickAndWait</td> - <td>searchButton</td> - <td></td> + <td>clickAndWait</td> + <td>searchButton</td> + <td></td> </tr> <tr> - <td>clickAndWait</td> - <td>link=10000</td> - <td></td> + <td>clickAndWait</td> + <td>link=10000</td> + <td></td> </tr> <tr> - <td>type</td> - <td>description</td> - <td>New Feature 1000 - updated</td> + <td>type</td> + <td>description</td> + <td>New Feature 1000 - updated</td> </tr> <tr> - <td>clickAndWait</td> - <td>submitButton</td> - <td></td> + <td>clickAndWait</td> + <td>submitButton</td> + <td></td> </tr> </tbody></table> Modified: ofbiz/branches/multitenant20100310/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/branches/multitenant20100310/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Wed Mar 24 09:23:07 2010 @@ -159,6 +159,11 @@ public class RequestHandler { } else { overrideViewUri = RequestHandler.getOverrideViewUri(chain); } + if (overrideViewUri != null) { + // put this in a request attribute early in case an event needs to access it + // not using _POST_CHAIN_VIEW_ because it shouldn't be set unless the event execution is successful + request.setAttribute("_CURRENT_CHAIN_VIEW_", overrideViewUri); + } if (Debug.infoOn()) Debug.logInfo("[RequestHandler]: Chain in place: requestUri=" + chainRequestUri + " overrideViewUri=" + overrideViewUri + " sessionId=" + UtilHttp.getSessionId(request), module); } else { // Check if X509 is required and we are not secure; throw exception Modified: ofbiz/branches/multitenant20100310/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/data/helpdata/HELP_WEBTOOLS.xml Wed Mar 24 09:23:07 2010 @@ -14,10 +14,10 @@ the specific language governing permissi License. --> <section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" - xsi:schemaLocation="http://docbook.org/ns/docbook ../../../content/dtd/docbook.xsd" - xmlns="http://docbook.org/ns/docbook"> - <title>The Webtools Introduction.</title> + version="5.0" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" + xsi:schemaLocation="http://docbook.org/ns/docbook ../../../content/dtd/docbook.xsd" + xmlns="http://docbook.org/ns/docbook"> + <title>The Webtools Introduction.</title> <xi:include href="HELP_WEBTOOLS_main.xml" /> <xi:include href="../../../testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml" /> </section> \ No newline at end of file Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/editUtilCache.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/editUtilCache.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/editUtilCache.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/editUtilCache.ftl Wed Mar 24 09:23:07 2010 @@ -31,7 +31,7 @@ under the License. <br class="clear"/> </div> <div class="screenlet-body"> - <br/> + <br /> <@displayButtonBar/> <#if cache?has_content> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/findUtilCache.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/findUtilCache.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/findUtilCache.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/findUtilCache.ftl Wed Mar 24 09:23:07 2010 @@ -33,7 +33,7 @@ under the License. <br class="clear"/> </div> <div class="screenlet-body"> - <br/> + <br /> <p> <u><b>${uiLabelMap.WebtoolsMemory}</b></u> <b>${uiLabelMap.WebtoolsTotalMemory}</b> ${memory} @@ -41,7 +41,7 @@ under the License. <b>${uiLabelMap.WebtoolsUsedMemory}</b> ${usedMemory} <b>${uiLabelMap.WebtoolsMaxMemory}</b> ${maxMemory} </p> - <br/> + <br /> <@displayButtonBar/> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/findUtilCacheElements.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/findUtilCacheElements.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/findUtilCacheElements.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/cache/findUtilCacheElements.ftl Wed Mar 24 09:23:07 2010 @@ -31,12 +31,12 @@ under the License. <br class="clear"/> </div> <div class="screenlet-body"> - <br/> + <br /> <p> <b>${uiLabelMap.WebtoolsCacheName}</b> ${cacheName?if_exists} (${now}) <b>${uiLabelMap.WebtoolsSizeTotal}</b> ${totalSize} ${uiLabelMap.WebtoolsBytes} </p> - <br/> + <br /> <@displayButtonBar/> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/datafile/viewdatafile.ftl Wed Mar 24 09:23:07 2010 @@ -24,9 +24,9 @@ under the License. <br class="clear"/> </div> <div class="screenlet-body"> - <br/> + <br /> <p>${uiLabelMap.WebtoolsDataFileMessage1}.</p> - <br/> + <br /> <#if security.hasPermission("DATAFILE_MAINT", session)> <form method="post" action="<@ofbizUrl>viewdatafile</@ofbizUrl>"> <table class="basic-table" cellspacing="0"> @@ -76,7 +76,7 @@ under the License. </form> <#if messages?has_content> - <hr/> + <hr /> <h1>${uiLabelMap.CommonFollowingOccurred}:</h1> <div> <#list messages as message> @@ -92,7 +92,7 @@ under the License. <#-- if record is different than the last displayed, make a new table and header row --> <#if !modelRecord.name.equals(lastRecordName)> <#if lastRecordName != null> - </table><br/> + </table><br /> </#if> <table class="basic-table hover-bar" cellspacing="0"> <tr> @@ -130,7 +130,7 @@ under the License. </#macro> <#if dataFile?has_content && modelDataFile?has_content && (!parameters.ENTITYXML_FILE_SAVE?has_content || parameters.ENTITYXML_FILE_SAVE.length() == 0) && (parameters.DATAFILE_SAVE == null || parameters.DATAFILE_SAVE.length() == 0)> - <hr/> + <hr /> <table class="basic-table" cellspacing="0"> <tr class="header-row"> <td>Name</td> @@ -153,7 +153,7 @@ under the License. <td colspan="">${modelDataFile.description}</td> </tr> </table> - <br/> + <br /> <@displayrecords records = dataFile.getRecords()/> </#if> <#else> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/CheckDb.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/CheckDb.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/CheckDb.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/CheckDb.ftl Wed Mar 24 09:23:07 2010 @@ -111,7 +111,7 @@ under the License. ${uiLabelMap.WebtoolsGroupName}: <input type="text" name="groupName" value="${groupName}" size="40"/> <input type="submit" value="${uiLabelMap.CommonUpdate}"/> </form> - <hr/> + <hr /> </div> <#if miters?has_content> <ul> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EditEntity.jsp URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EditEntity.jsp?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EditEntity.jsp (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EditEntity.jsp Wed Mar 24 09:23:07 2010 @@ -411,20 +411,20 @@ A.listtext:hover {color:red;} <!ELEMENT view-entity ( description?, member-entity+, alias+, view-link+, relation* )> <!ELEMENT member-entity EMPTY> <!ATTLIST member-entity - entity-alias CDATA #REQUIRED - entity-name CDATA #REQUIRED > + entity-alias CDATA #REQUIRED + entity-name CDATA #REQUIRED > <!ELEMENT alias EMPTY> <!ATTLIST alias - entity-alias CDATA #REQUIRED - name CDATA #REQUIRED - field CDATA #IMPLIED - prim-key CDATA #IMPLIED - group-by ( true | false ) "false" - function ( min | max | sum | avg | count | count-distinct | upper | lower ) #IMPLIED> + entity-alias CDATA #REQUIRED + name CDATA #REQUIRED + field CDATA #IMPLIED + prim-key CDATA #IMPLIED + group-by ( true | false ) "false" + function ( min | max | sum | avg | count | count-distinct | upper | lower ) #IMPLIED> <!ELEMENT view-link ( key-map+ )> <!ATTLIST view-link - entity-alias CDATA #REQUIRED - rel-entity-alias CDATA #REQUIRED > + entity-alias CDATA #REQUIRED + rel-entity-alias CDATA #REQUIRED > --%> <%}%> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityExportAll.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityExportAll.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityExportAll.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityExportAll.ftl Wed Mar 24 09:23:07 2010 @@ -23,14 +23,14 @@ under the License. ${uiLabelMap.WebtoolsXMLExportInfo} </p> <#if results?has_content> - <hr/> + <hr /> <h2>${uiLabelMap.WebtoolsResults}:</h2> <#list results as result> <p>${result}</p> </#list> </#if> -<hr/> +<hr /> <h2>${uiLabelMap.WebtoolsExport}:</h2> <form method="post" action="<@ofbizUrl>entityExportAll</@ofbizUrl>"> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImport.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImport.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImport.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImport.ftl Wed Mar 24 09:23:07 2010 @@ -20,7 +20,7 @@ under the License. <h1>${uiLabelMap.WebtoolsImportToDataSource}</h1> <br /> <p>${uiLabelMap.WebtoolsXMLImportInfo}</p> -<hr/> +<hr /> <h2>${uiLabelMap.WebtoolsImport}:</h2> <br /> @@ -43,7 +43,7 @@ under the License. <div class="button-bar"><input type="submit" value="${uiLabelMap.WebtoolsImportText}"/></div> </form> <#if messages?exists> - <hr/> + <hr /> <h3>${uiLabelMap.WebtoolsResults}:</h3> <#list messages as message> <p>${message}</p> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImportDir.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImportDir.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImportDir.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImportDir.ftl Wed Mar 24 09:23:07 2010 @@ -20,7 +20,7 @@ under the License. <h1>${uiLabelMap.WebtoolsImportToDataSource}</h1> <br /> <p>${uiLabelMap.WebtoolsXMLImportInfo}</p> -<hr/> +<hr /> <h2>${uiLabelMap.WebtoolsImport}:</h2> <form method="post" action="<@ofbizUrl>entityImportDir</@ofbizUrl>"> @@ -36,7 +36,7 @@ under the License. <div class="button-bar"><input type="submit" value="${uiLabelMap.WebtoolsImportFile}"/></div> </form> <#if messages?exists> - <hr/> + <hr /> <h1>${uiLabelMap.WebtoolsResults}:</h1> <#list messages as message> <p>${message}</p> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImportReaders.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImportReaders.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImportReaders.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityImportReaders.ftl Wed Mar 24 09:23:07 2010 @@ -20,7 +20,7 @@ under the License. <h1>${uiLabelMap.WebtoolsImportToDataSource}</h1> <br /> <p>${uiLabelMap.WebtoolsXMLImportInfo}</p> -<hr/> +<hr /> <h2>${uiLabelMap.WebtoolsImport}:</h2> <form method="post" action="<@ofbizUrl>entityImportReaders</@ofbizUrl>"> @@ -34,7 +34,7 @@ under the License. <div class="button-bar"><input type="submit" value="${uiLabelMap.WebtoolsImport}"/></div> </form> <#if messages?exists> - <hr/> + <hr /> <h3>${uiLabelMap.WebtoolsResults}:</h3> <#list messages as message> <p>${message}</p> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityMaint.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityMaint.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityMaint.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityMaint.ftl Wed Mar 24 09:23:07 2010 @@ -24,8 +24,8 @@ under the License. <br class="clear"/> </div> <div class="screenlet-body"> - <p> - <form target="<@ofbizUrl>/entitymaint</@ofbizUrl>"> + <div> + <form action="<@ofbizUrl>/entitymaint</@ofbizUrl>"> <b>${uiLabelMap.CommonGroup}:</b> <select name="filterByGroupName"> <option value="">${uiLabelMap.CommonAll}</option> @@ -34,10 +34,10 @@ under the License. </#list> </select> <b>${uiLabelMap.WebtoolsEntityName}:</b> - <input type= "text" name= "filterByEntityName" value="${parameters.filterByEntityName?if_exists}"> + <input type= "text" name= "filterByEntityName" value="${parameters.filterByEntityName?if_exists}"/> <input type="submit"/> </form> - </p> + </div> <p><b><u>${uiLabelMap.CommonNote}</u></b></p> <p> <b>${uiLabelMap.WebtoolsCreate}</b> = ${uiLabelMap.CommonCreateNew} @@ -57,7 +57,7 @@ under the License. <a href="#Entity_${firstChar}">${firstChar}</a> </#if> </#list> - <br/><br/> + <br /><br /> <div class="screenlet"> <div class="screenlet-title-bar"> <ul> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRef.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRef.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRef.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRef.ftl Wed Mar 24 09:23:07 2010 @@ -27,6 +27,6 @@ under the License. <noframes> <h2>${uiLabelMap.CommonFrameAlert1}</h2> <p>${uiLabelMap.CommonFrameAlert2}</p> - <br/> + <br /> </noframes> </html> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRefList.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRefList.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRefList.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRefList.ftl Wed Mar 24 09:23:07 2010 @@ -38,7 +38,7 @@ under the License. <a href="<@ofbizUrl>main</@ofbizUrl>" target='main'>${uiLabelMap.WebtoolsPopupWebToolsMain}</A><BR> <a href="<@ofbizUrl>view/entityref_main</@ofbizUrl>" target="entityFrame">${uiLabelMap.WebtoolsEntityReferenceMainPage}</A><BR> <a href="<@ofbizUrl>view/checkdb</@ofbizUrl>" target="entityFrame">${uiLabelMap.WebtoolsCheckUpdateDatabase}</A> - <hr/> + <hr /> <#-- want to leave these out because they are only working so-so, and cause people more problems that they solve, IMHO <a href="<@ofbizUrl>ModelWriter</@ofbizUrl>" target='_blank'>Generate Entity Model XML (all in one)</A><BR> <a href="<@ofbizUrl>ModelWriter?savetofile=true</@ofbizUrl>" target='_blank'>Save Entity Model XML to Files</A><BR> @@ -50,18 +50,18 @@ under the License. <a href="<@ofbizUrl>view/ModelInduceFromDb</@ofbizUrl>" target='_blank'>${uiLabelMap.WebtoolsInduceModelXMLFromDatabase}</A><BR> </#if> <#if packageNames?has_content> - <hr/> + <hr /> <div class="section-header">${uiLabelMap.WebtoolsEntityPackages}</div> <#list packageNames as packageName> <#if forstatic> - <a href="entityref_main.html#${packageName}" target="entityFrame">${packageName}</a><br/> + <a href="entityref_main.html#${packageName}" target="entityFrame">${packageName}</a><br /> <#else> - <a href="<@ofbizUrl>view/entityref_main#${packageName}</@ofbizUrl>" target="entityFrame">${packageName}</a><br/> + <a href="<@ofbizUrl>view/entityref_main#${packageName}</@ofbizUrl>" target="entityFrame">${packageName}</a><br /> </#if> </#list> </#if> <#if entitiesList?has_content> - <hr/> + <hr /> <div class="section-header">${uiLabelMap.WebtoolsEntitiesAlpha}</div> <#list entitiesList as entity> <#if forstatic> @@ -69,7 +69,7 @@ under the License. <#else> <a href="<@ofbizUrl>view/entityref_main#${entity.entityName}${entity.url?if_exists}</@ofbizUrl>" target="entityFrame">${entity.entityName}</a> </#if> - <br/> + <br /> </#list> </#if> </div> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/EntityRefMain.ftl Wed Mar 24 09:23:07 2010 @@ -47,12 +47,12 @@ under the License. </style> </head> <body> - <div class='toptext'>${uiLabelMap.WebtoolsEntityReferenceChart}<br/> + <div class='toptext'>${uiLabelMap.WebtoolsEntityReferenceChart}<br /> ${numberOfEntities} ${uiLabelMap.WebtoolsTotalEntities} </div> <#assign numberShowed = 0> <#list packagesList as package> - <hr/><div id='${package.packageName}' class='packagetext'>${package.packageName}</div><hr/> + <hr /><div id='${package.packageName}' class='packagetext'>${package.packageName}</div><hr /> <#list package.entitiesList as entity> <table width="95%" border="1" cellpadding='2' cellspacing='0'> <tr class='entityheader'> @@ -110,7 +110,7 @@ under the License. </#list> <#if entity.relationsList?has_content> <tr class='entityheader'> - <td colspan="5"><hr/></td> + <td colspan="5"><hr /></td> </tr> <tr class='headertext'> <th>${uiLabelMap.WebtoolsRelation}</th> @@ -121,10 +121,10 @@ under the License. <td> <#if relation.title?has_content><b>${relation.title}</b> </#if><a href='#${relation.relEntity}'>${relation.relEntity}</a> <#if relation.fkName?has_content> - <br/>${uiLabelMap.WebtoolsFKName}: ${relation.fkName} + <br />${uiLabelMap.WebtoolsFKName}: ${relation.fkName} </#if> <#if relation.description?has_content> - <br/><span class='descriptiontext'>${relation.description}</span> + <br /><span class='descriptiontext'>${relation.description}</span> </#if> </td> <td width="60%" colspan='4'> @@ -134,7 +134,7 @@ under the License. </#if> <#if relation.keysList?has_content> <#list relation.keysList as keyList> - <br/> ${keyList.row}) + <br /> ${keyList.row}) <#if keyList.fieldName == keyList.relFieldName> ${keyList.fieldName} <#else> @@ -148,7 +148,7 @@ under the License. </#if> <#if entity.indexList?has_content> <tr class='entityheader'> - <td colspan="5"><hr/></td> + <td colspan="5"><hr /></td> </tr> <tr class='headertext'> <th>${uiLabelMap.WebtoolsIndexName}</th> @@ -166,12 +166,12 @@ under the License. </#list> </#if> </table> - <br/> + <br /> <#assign numberShowed = numberShowed + 1> </#list> </#list> <div align="center"> - <br/><br/> + <br /><br /> ${uiLabelMap.WebtoolsEntityDisplayed}: ${numberShowed} <div> </body> Modified: ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/FindGeneric.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/FindGeneric.ftl?rev=926987&r1=926986&r2=926987&view=diff ============================================================================== --- ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/FindGeneric.ftl (original) +++ ofbiz/branches/multitenant20100310/framework/webtools/webapp/webtools/entity/FindGeneric.ftl Wed Mar 24 09:23:07 2010 @@ -17,7 +17,7 @@ specific language governing permissions under the License. --> <form method="post" action="<@ofbizUrl>FindGeneric?entityName=${entityName}</@ofbizUrl>"> - <input type="hidden" name="find" value="true"> + <input type="hidden" name="find" value="true"/> <table class="basic-table hover-bar" cellspacing="0"> <tr class="header-row-2"> <td>${uiLabelMap.WebtoolsFieldName}</td> @@ -31,13 +31,13 @@ under the License. <td>${field.name}</td> <td><#if field.isPk == 'Y'>*</#if></td> <td>${field.javaType}, ${field.sqlType}</td> - <td><input type="text" name="${field.name}" value="${field.param}" size="40"></td> + <td><input type="text" name="${field.name}" value="${field.param}" size="40"/></td> </tr> <#assign alt_row = !alt_row> </#list> <tr> <td colspan="3"><h3>${uiLabelMap.WebtoolsToFindAll} ${entityName}, ${uiLabelMap.WebtoolsLeaveAllEntriesBlank}</h3></td> - <td><input type="submit" value="${uiLabelMap.CommonFind}"></td> + <td><input type="submit" value="${uiLabelMap.CommonFind}"/></td> </tr> </table> </form> |
Free forum by Nabble | Edit this page |