Hi, I have a strange problem. I'm trying to compare two values in the "<esql:row-results>"-Part with an if-compare, but somehow the if-construct is never entered even if there are matches. (I put the System.out's to see if there are matches. There are some.)
Here my XSP: <?xml version="1.0" encoding="ISO-8859-1"?> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:esql="http://apache.org/cocoon/SQL/v2"> <interactive> <!-- Get the passed parameters (if there are any) --> <xsp:logic> String report_id = <xsp-request:get-parameter name ="report_id"/>; String service_id = <xsp-request:get-parameter name ="service_id"/>; </xsp:logic> <main> <report_id> <esql:connection> <esql:pool>xxxx</esql:pool> <esql:execute-query> <esql:query> SELECT DESCRIPTION, ID FROM REPORT </esql:query> <esql:results> <esql:row-results> <option> <xsp:attribute name="value"> <esql:get-string column="ID"/> </xsp:attribute> <xsp:attribute name="description"> <esql:get-string column="description"/> </xsp:attribute> <xsp:logic> System.out.println("\'" + report_id + "\' == \'" + <esql:get-string column="ID"/> +"\'"); if(report_id == <esql:get-string column ="ID"/>) { System.out.println("Yipie"); <xsp:attribute name="selected"/> } </xsp:logic> </option> </esql:row-results> </esql:results> <esql:no-results> </esql:no-results> <esql:error-results> </esql:error-results> </esql:execute-query> </esql:connection> </report_id> </main> </interactive> </xsp:page> Thanks Jonny ---------------------------------------------------------------------------------------------------- This electronic message contains information from the mmo2 plc Group which may be privileged or confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or email (to the numbers or address above) immediately. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>