Hello,
In my application, I have three pages (the most important ones that is). On the first
page, StockInput, the user inserts stock values for today's date into the text boxes,
and
when he/she presses the "Insert" button, I have these values storec into the database
and into the Sesstion Object at the same time. Then, by pressing the button
"Insert" the user gets into the TextInput page, where he/she inserts news articles,
and
they, in turn get stored in the database and in the Session Object. When the user gets
to the third page, he/she sees all of the Stock info displayed once and News info --
as many times as I enter them (there is a button on this page, which permits you to add
new articles after the user saw them being displayed). Also, the third page, pulls
these
records out of the database where they have been inserted previously, and it sorts them
by today's date (only today's records need to be displayed).
I put the article items in the Repeated (so that I would be able to display as many of
them as
needed). However, with the Java code that I wrote, the stock info gets displayed
correctly, but the Articles in the Repeated seem to have problems. The the old records
never seem to clear, even if they are not in the database anymore and they are not
from the
date that I specified.
I'm not very good at Java, so I assume that there is some problem with my code.
Here's the code that I'm using. Does anybody know what is wrong with it?
//[[SPIDER_EVENT<this_onBeforeDisplayEvent>
public int this_onBeforeDisplayEvent(CSpDisplayEvent event)
{
CSpValue date = CSpider.getUserSessionObject("sesDate");
CSpSelect doViewResults = (CSpSelect) CSpider.getDataObject
("doViewResults");
doViewResults.clearDynamicCriteria ();
doViewResults.addDynamicCriterion ("dataAndStockPrices_Date",
CSpCriteriaSQLObject.EQUAL_TO_STR_OPERATOR, date); //this is the WHERE clause for the
Stock info
doViewResults.addDynamicCriterion ("textArticles_Date",
CSpCriteriaSQLObject.EQUAL_TO_STR_OPERATOR, date); //this is the WHERE clause for the
Articles info
//probably I need to put this in a loop or something?
doViewResults.execute ();
return (PROCEED);
}
//]]SPIDER_EVENT<this_onBeforeDisplayEvent>
I would really appreciate your help. Thanks in advance,
Rimma Stavitskaya
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]