Newbie: Session variable problem

PaulM <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Could someone please help me solve this session variable problem.
If I use this line of code everything works as desired.
"nextPage.donationDisplayGroup.setCurrentBatchIndex(3);"

When I try the same line replacing the "3" with "sess.dBatch()" it doesn't
work. Gives error "can't resolve symbol"

What is the correct way to right these two lines...?

Session sess = (Session)session(); 
nextPage.donationDisplayGroup.setCurrentBatchIndex(sess.dBatch());

A more complete code sample is shown below. 

Thank You.

------- In Session.java  ---------------

public class Session extends WOSession {

< bunch of code snipped out>

public Integer dBatch ;
public Integer dBatch() {return  dBatch; }
public void setDBatch(Integer newDBatch) { dBatch = newDBatch; }

}



-----Code from a separate web component trying to read variable "dBatch"
from session----

 public SearchDonations doList()
    {
        SearchDonations nextPage =
(SearchDonations)pageWithName("SearchDonations");
		
		nextPage.donationDisplayGroup.qualifyDataSource();
		
		
		/* this next line works --- 
		nextPage.donationDisplayGroup.setCurrentBatchIndex( 3 );
		the correct batch of the displaygroup is shown on the next page
		*/ 

		Session sess = (Session)session(); 
		// this line does not work -- 
		// The code won't compile. Gives error can't resolve symbol
		nextPage.donationDisplayGroup.setCurrentBatchIndex(sess.dBatch());
        return nextPage;
    }

-------------------------------------------
-- 
View this message in context: http://www.nabble.com/Newbie%3A-Session-variable-problem-tf2529717.html#a7050072
Sent from the WebObjects-Dev mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.