Binding Exception
7 answers - 647 bytes -

Hi all
I am trying to make my AS available to an @If component on my templates,
but I can't get past the following error:
"Unable to read GNL expression '<parsed GNL expression>' of
$XWords_24@1d20651[palavras]: ".
The AS is being properly instanciated and I can access it from my
component.
I'm doing the evaluation on the template this way:
<span jwcid="@If" condition="ognl:! user.isActive">
<span jwcid="@RedMenu">Red Menu</span>
</span>
User is my AS and isActive is a public NN abstract method.
How do I negatively test that condition?
No.1 | | 904 bytes |
| 
No luck.
Has anyone done this before?
7/26/06, Shing Hing Man <matmsh (AT) yahoo (DOT) comwrote:
Please try :
ognl:!user.active
Shing
Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:
Hi all
I am trying to make my AS available to an @If
component on my templates,
but I can't get past the following error:
"Unable to read GNL expression '<parsed GNL
expression>' of
$XWords_24@1d20651[palavras]:
".
The AS is being properly instanciated and I can
access it from my
component.
I'm doing the evaluation on the template this way:
<span jwcid="@If" condition="ognl:! user.isActive">
<span jwcid="@RedMenu">Red Menu</span>
</span>
User is my AS and isActive is a public NN abstract
method.
How do I negatively test that condition?
No.2 | | 1132 bytes |
| 
$XWords_24@1d20651[palavras]: ".
Isn't that a string being returned? Can you do ! with a string here?
isActive should be boolean.
Adam
26/07/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:
No luck.
Has anyone done this before?
7/26/06, Shing Hing Man <matmsh (AT) yahoo (DOT) comwrote:
Please try :
ognl:!user.active
Shing
Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:
Hi all
I am trying to make my AS available to an @If
component on my templates,
but I can't get past the following error:
"Unable to read GNL expression '<parsed GNL
expression>' of
$XWords_24@1d20651[palavras]:
".
The AS is being properly instanciated and I can
access it from my
component.
I'm doing the evaluation on the template this way:
<span jwcid="@If" condition="ognl:! user.isActive">
<span jwcid="@RedMenu">Red Menu</span>
</span>
User is my AS and isActive is a public NN abstract
method.
How do I negatively test that condition?
No.3 | | 1291 bytes |
| 
If it is a boolean, try:
!user.isActive()
or if that doesn't work
user.isActive() == false
Wednesday 26 July 2006 12:36, adasal wrote:
$XWords_24@1d20651[palavras]: ".
Isn't that a string being returned? Can you do ! with a string here?
isActive should be boolean.
Adam
26/07/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:
No luck.
Has anyone done this before?
7/26/06, Shing Hing Man <matmsh (AT) yahoo (DOT) comwrote:
Please try :
ognl:!user.active
Shing
Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:
Hi all
I am trying to make my AS available to an @If
component on my templates,
but I can't get past the following error:
"Unable to read GNL expression '<parsed GNL
expression>' of
$XWords_24@1d20651[palavras]:
".
The AS is being properly instanciated and I can
access it from my
component.
I'm doing the evaluation on the template this way:
<span jwcid="@If" condition="ognl:! user.isActive">
<span jwcid="@RedMenu">Red Menu</span>
</span>
User is my AS and isActive is a public NN abstract
method.
How do I negatively test that condition?
No.4 | | 1485 bytes |
| 
I believe the java beans syntax for accessing a method that looked like:
User-
public boolean isActive();
Would be "ognl:user.active".
You can always force ognl to call your method via explicit functions calls
as well:
"ognl:user.isActive()"
7/26/06, adasal <adam.saltiel (AT) gmail (DOT) comwrote:
$XWords_24@1d20651[palavras]: ".
Isn't that a string being returned? Can you do ! with a string here?
isActive should be boolean.
Adam
--
26/07/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:
No luck.
Has anyone done this before?
7/26/06, Shing Hing Man <matmsh (AT) yahoo (DOT) comwrote:
Please try :
ognl:!user.active
Shing
Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:
Hi all
I am trying to make my AS available to an @If
component on my templates,
but I can't get past the following error:
"Unable to read GNL expression '<parsed GNL
expression>' of
$XWords_24@1d20651[palavras]:
".
The AS is being properly instanciated and I can
access it from my
component.
I'm doing the evaluation on the template this way:
<span jwcid="@If" condition="ognl:! user.isActive">
<span jwcid="@RedMenu">Red Menu</span>
</span>
User is my AS and isActive is a public NN abstract
method.
How do I negatively test that condition?
No.5 | | 2437 bytes |
| 
My bad:
There is another error beneath this one, I just hadn't noticed it:
"Cannot create a session after the response has been committed"
And the stack trace includes this:
Stack Trace:
(Request.java:2214)
(Request.java:2024)
(RequestFacade.java:831)
(ServletWebRequest.java:82)
$($WebRequest_10cabda2aa0.java)
$($WebRequest_10cabda2a59.java)
(
SessionScopeManager.java:48)
(
SessionScopeManager.java:64)
$($)
$($)
(
SManagerImpl.java:50)
(
)
$($)
$($)
$XWords_24.getUser($XWords_24.java)
(Native Method)
I have injected the User object into the parent class of XWords and if I try
to access it through getUser, it returns a valid object and not an NPE.
I'm sorry for the misleading error from before, I should have scrolled down
a bit more.
7/26/06, Jesse Kuhnert <jkuhnert (AT) gmail (DOT) comwrote:
I believe the java beans syntax for accessing a method that looked like:
User-
public boolean isActive();
Would be "ognl:user.active".
You can always force ognl to call your method via explicit functions calls
as well:
"ognl:user.isActive()"
7/26/06, adasal <adam.saltiel (AT) gmail (DOT) comwrote:
$XWords_24@1d20651[palavras]: ".
Isn't that a string being returned? Can you do ! with a string here?
isActive should be boolean.
Adam
--
26/07/06, Rui Pacheco < rui.pacheco (AT) gmail (DOT) comwrote:
No luck.
Has anyone done this before?
7/26/06, Shing Hing Man <matmsh (AT) yahoo (DOT) com wrote:
Please try :
ognl:!user.active
Shing
Rui Pacheco < rui.pacheco (AT) gmail (DOT) comwrote:
Hi all
I am trying to make my AS available to an @If
component on my templates,
but I can't get past the following error:
"Unable to read GNL expression '<parsed GNL
expression>' of
$XWords_24@1d20651[palavras]:
".
The AS is being properly instanciated and I can
access it from my
component.
I'm doing the evaluation on the template this way:
<span jwcid="@If" condition="ognl:! user.isActive">
<span jwcid="@RedMenu">Red Menu</span>
</span>
User is my AS and isActive is a public NN abstract
method.
How do I negatively test that condition?
No.6 | | 3010 bytes |
| 
my Tomcat logs I have something else:
Jul 26, 2006 6:51:17 PM reset
SEVERE: Unable to reset response buffer:
at (ResponseFacade.java
:307)
at (ServletWebResponse.java
:128)
at (
ServletWebResponse.java:90)
at $($WebResponse_10cabf5ab61.java)
at $($WebResponse_10cabf5aa3c.java)
at (
ResponseRendererImpl.java:67)
I'm doing something wrong with my Sessions, I just don't know what.
7/26/06, Rui Pacheco <rui.pacheco (AT) gmail (DOT) comwrote:
My bad:
There is another error beneath this one, I just hadn't noticed it:
"Cannot create a session after the response has been committed"
And the stack trace includes this:
Stack Trace:
(Request.java:2214)
(Request.java:2024)
(RequestFacade.java:831)
(
ServletWebRequest.java:82)
$($WebRequest_10cabda2aa0.java)
$($WebRequest_10cabda2a59.java)
(
SessionScopeManager.java:48)
(
SessionScopeManager.java:64)
$($)
$($)
(
SManagerImpl.java:50)
(
)
$($)
$($)
$XWords_24.getUser($XWords_24.java)
(Native Method)
I have injected the User object into the parent class of XWords and if I
try to access it through getUser, it returns a valid object and not an NPE.
I'm sorry for the misleading error from before, I should have scrolled
down a bit more.
>
>
>
7/26/06, Jesse Kuhnert < jkuhnert (AT) gmail (DOT) comwrote:
I believe the java beans syntax for accessing a method that looked like:
User-
public boolean isActive();
Would be "ognl:user.active".
You can always force ognl to call your method via explicit functions
calls
as well:
"ognl:user.isActive()"
7/26/06, adasal < adam.saltiel (AT) gmail (DOT) comwrote:
$XWords_24@1d20651[palavras]: ".
Isn't that a string being returned? Can you do ! with a string here?
isActive should be boolean.
Adam
--
26/07/06, Rui Pacheco < rui.pacheco (AT) gmail (DOT) comwrote:
No luck.
Has anyone done this before?
7/26/06, Shing Hing Man < matmsh (AT) yahoo (DOT) com wrote:
Please try :
ognl:!user.active
Shing
Rui Pacheco < rui.pacheco (AT) gmail (DOT) comwrote:
Hi all
I am trying to make my AS available to an @If
component on my templates,
but I can't get past the following error:
"Unable to read GNL expression '<parsed GNL
expression>' of
$XWords_24@1d20651[palavras]:
".
The AS is being properly instanciated and I can
access it from my
component.
I'm doing the evaluation on the template this way:
<span jwcid="@If" condition="ognl:! user.isActive">
<span jwcid="@RedMenu">Red Menu</span>
</span>
User is my AS and isActive is a public NN abstract
method.
How do I negatively test that condition?
No.7 | | 290 bytes |
| 
I found what was going on and I'm replying to this in case someone else
stumbles upon this error in the future:
Although the AS was being created, I wasn't passing it to the template. As
soon as I called getUser() from my component, everything worked like a
charm.