This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes public static field of a public inner class cant be accessed as @FQClassName@Field in struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "public static field of a public inner class cant be accessed as @FQClassName@Field in struts 2" Watch "public static field of a public inner class cant be accessed as @FQClassName@Field in struts 2" New topic
Author

public static field of a public inner class cant be accessed as @FQClassName@Field in struts 2

Saikat Podder
Greenhorn

Joined: Jan 09, 2009
Posts: 5
I found in the OGNL Language reference that the a static field of a class has to be referenced using the syntax @FQClassName@field where FQClassName is the fully qualified name of the target class. It is working for any normal class. But I failed to access the fields of an inner class using the same syntax.

Trying to access it as

Is not working!! I also have tried it after making Plan as public static, still dosnt work

so my question is, is there any way (at all) to access the static field of the inner class?

Thanks in advance
Saikat,
 
 
subject: public static field of a public inner class cant be accessed as @FQClassName@Field in struts 2
 
Similar Threads
Static Class
Static inner class
When is an anonymous inner class NOT an inner class? Always?
A Inner Class question
Strange behavior of compilers