gaurav_thakare Posted May 9, 2014 Share Posted May 9, 2014 Consider Two input parameter Category and Products(Both are util.collection)For Product i have query:select Product_name from products where ($X{IN,Category_name ,Category})Product I/P controls works fine for 'All' or any particluar category i select.But on selection of 'NONE' i am getting all the values of products for all categories instead it must not show any products in list.Any pointer related to these could help?Thanking You RegardsGaurav Link to comment Share on other sites More sharing options...
ghudson_1 Posted May 9, 2014 Share Posted May 9, 2014 0nce you choose "none" , I wonder if the param is being calculated as "" or empty. And in $X syntax, empty results in 1=1 or 0=0.... so if you stick 0=0 instead your where clause instead of "where Category IN {x,y,z} - you get back all results.If you set defaultValueExpressions does the behavior change? For null try: <defaultValueExpression><![CDATA[]]></defaultValueExpression>[/code] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now