Yes, the resultsetvector is rendered in any case. But you can specify a filter in the exceptor which never will return a row, e.g. .... where 1=0!
Then you do not break the rendering and will not get a row too.... Henner > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 08, 2005 11:59 PM > To: [EMAIL PROTECTED]; [email protected] > Subject: searchFilterRequired > > Well, here is a new attribute for the dbforms tag. Before > you judge me, let me explain... > > I have a very large data set that gets loaded when the > dbform's page is first rendered. The user is then encouraged > to specify 1 or more search filters to obtain a smaller list > of data. Now, this original list is so big that I sometimes > run out of memory! So, what I wanted to do is display an > empty list and give the user a chance to enter search fields > BEFORE I go and get the result set. > > I would have liked to use your form interceptor solution > however I believe that the resultSet is already obtained and > stored into memory. I DON'T want to get the result set > because its too big! > > If I am wrong, please let me know... If all is OK, here's the code: > > > > /* > * Philip Grunikiewicz > * 2005-12-08 > * > * Added a new attribute which allows the > developer to control if data should be retrieved when search > * filters are empty. > searchFilterRequired="true" verifies if the user has > specified search filter(s). > * If so, the query is allowed to proceed, if > not, return empty data > */ > > if ("true".equalsIgnoreCase(searchFilterRequired) > && searchFieldValues == null) { > // ResultSet is going to be hardcoded empty > resultSetVector = new ResultSetVector(getTable()); > } > else > { > // Business as usual > resultSetVector = > navEvent.processEvent(mergedFieldValues, > orderConstraint, sqlFilterString, > sqlFilterParams, count, > firstPosition, lastPosition, interceptorData); > } > > dbforms.tld > > <attribute> > <name>searchFilterRequired</name> > <required>false</required> > <rtexprvalue>true</rtexprvalue> > <description>If set to true, the actual resultSet is obtained > only if search filters have been specified, > otherwise an empty resultset is returned. Perfect for > situations where, without search filters, > the resultset would be much too large. > </description> > </attribute> > > > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ DbForms Mailing List http://www.wap-force.net/dbforms
