• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing Session
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing Session


  • Subject: Re: Accessing Session
  • From: David LeBer <email@hidden>
  • Date: Wed, 2 Apr 2008 23:33:59 -0400

Please keep questions on the list.

On 2-Apr-08, at 11:19 PM, Eleni Manou wrote:
Hi David

I am just copying some lines from my project in WO 5.3. There in Session.java I define

public String userName;

and then in a component I set this variable using

((Session)session()).userName = .....

This should work, though personally I'd wrap userName with accessor methods.


This is not working in WOLips project, wher I get the error message

Unresolved compilation problem:
	username cannot be resolved or is not a field

Why is username not here not camelCased like above?

Can you help more? Many thanks

Stavros

On 02 Απρ 2008, at 6:23 ΠΜ, David LeBer wrote:

On 1-Apr-08, at 11:14 PM, Eleni Manou wrote:

Hi all,

Can anyone help e on how to access session variables? Before (WO 5.3) I had simply to declare a variable in to the session.java class and then I cold read and and set this variable using (Session)session(). This seems that does not work in my Eclipse/ WOLips project.

Am I doing something wrong (probably)?

Many thanks in advance


Are your variables private or protected?

They need to be public or (better yet) have public accessors.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Accessing Session (From: Eleni Manou <email@hidden>)
 >Re: Accessing Session (From: David LeBer <email@hidden>)

  • Prev by Date: Re: [OT] Limiting File Upload Sizes
  • Next by Date: Re: WO 5.4 Linux Deployment
  • Previous by thread: Re: Accessing Session
  • Next by thread: Re: Accessing Session
  • Index(es):
    • Date
    • Thread