Actually each chapter is a separate project which gets imported into
Eclipse, and, of course, contains only 1 Session class. Furthermore I
have not made ANY change to the project files ie. Main or Session.java,
nor the Main.wod files. I simple want to demo their technique of
managing security using a few methods in the session class to control
access to various public/secure areas in the application.
WOComponentEditor does not complain about the bindings - that is there
are no red X's or other symbols indicating a problem. Matter of fact, I
did change the binding to 'Session.isUserAuthenticated'(with a capital S
since WOLips does create a default Session.java file), and when I ran
the app it did complain that there was no 'Session' class. So I
interpret this to mean the session class is referenced Ok, but none of
the session class methods or variables are accessible. But I can't see why!
I am totally stumped on this one.
Jean Pierre Malrieu wrote:
> My guess is that there are several "Session" classes corresponding to
> different chapters in the book, and that somehow, you are using the
> wrong "Session" (from a previous chapter?) which does not have the
> required variables and functions.
> What does WOComponentEditor say about the bindings? Does it complain?
>
> jpm
>
>
>
> Le 28 sept. 07 à 19:56, Fred Shurtleff a écrit :
>
>> Yes - this is the conditional causing the exception. So I changed the
>> condition = true (to get around this problem), and then another
>> 'unknown key' exception is triggered: authenticatedUser is
>> unknown(but is in fact a public method in session.java).
>>
>> So for some reason none of the bindings on Main.wod using session
>> PUBLIC methods/vars are recognizable eg. they trigger exception
>> errors. Can anyone see what might be the problem here?
>>
>> Jean Pierre Malrieu wrote:
>>> Without taking a look at the book, or the code, so just a guess: Did
>>> you try changing the wod to
>>>
>>> Conditional: WOConditional {
>>> condition = session.isUserAuthenticated;
>>> }
>>>
>>> ?
>>>
>>>
>>> jpm
>>>
>>> Le 27 sept. 07 à 21:49, Fred Shurtleff a écrit :
>>>
>>>> Has anyone been able to run the Chapter4App demo from the Practical
>>>> WebObjects Book by Hill & Mallais?
>>>>
>>>> I am unable to get this project to run - it raises an Exception >
>>>> An instance variable or method of the name 'isUserAuthenticated' is
>>>> not found(this is a WOConditional binding on the Main page). But
>>>> 'isUserAuthenticated' is, in fact, a method in Session.java. So I
>>>> am now at a dead end.
>>>>
>>>> Thanks for any ideas or suggestions.
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
This archive was generated by hypermail 2.0.0 : Fri Sep 28 2007 - 18:00:46 EDT