You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "seloha ." <se...@hotmail.com> on 2005/05/26 13:18:46 UTC

Tapestry 4.0 Unable to read OGNL expression

I am getting an error message:

Unable to read OGNL expression '<parsed OGNL expression>' of 
$UserAddPage_67@9bd23c[UserAdd]: $UserAddPage_67.cancel

which highlights this line in my template:

<input type="submit" jwcid="@Submit" value="Cancel" 
selected="ognl:whichButton" tag="cancel" onclick="form.onsubmit = null;"/>

after I have pressed this cancel button.

In my page specification I have:

<property name="whichButton"/>

and in my java file I have:

public abstract String getWhichButton();

I used this technique in Tapestry 3.0 to determine which button was being 
pressed.

Has anyone any ideas why this now fails and how to fix it.

Thanks in advance,

Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tapestry 4.0 Unable to read OGNL expression

Posted by Howard Lewis Ship <hl...@gmail.com>.
The most likely cause is that you haven't defined your Java class in
the .page file.

Failing that, it might be the case that tag parameter needs looking at.  

The full stack trace would have been useful here. I'm surprised you
got as much response as you did, providing so little data.

On 5/26/05, seloha . <se...@hotmail.com> wrote:
> I am getting an error message:
> 
> Unable to read OGNL expression '<parsed OGNL expression>' of
> $UserAddPage_67@9bd23c[UserAdd]: $UserAddPage_67.cancel
> 
> which highlights this line in my template:
> 
> <input type="submit" jwcid="@Submit" value="Cancel"
> selected="ognl:whichButton" tag="cancel" onclick="form.onsubmit = null;"/>
> 
> after I have pressed this cancel button.
> 
> In my page specification I have:
> 
> <property name="whichButton"/>
> 
> and in my java file I have:
> 
> public abstract String getWhichButton();
> 
> I used this technique in Tapestry 3.0 to determine which button was being
> pressed.
> 
> Has anyone any ideas why this now fails and how to fix it.
> 
> Thanks in advance,
> 
> Paul
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tapestry 4.0 Unable to read OGNL expression

Posted by Mikaël Cluseau <nw...@nwrk.dyndns.org>.
to me, it seems that the «tag» attribute is interpreted as OGNL... try
tag="'cancel'".

Le jeudi 26 mai 2005 à 12:18 +0100, seloha . a écrit :
> I am getting an error message:
> 
> Unable to read OGNL expression '<parsed OGNL expression>' of 
> $UserAddPage_67@9bd23c[UserAdd]: $UserAddPage_67.cancel
> 
> which highlights this line in my template:
> 
> <input type="submit" jwcid="@Submit" value="Cancel" 
> selected="ognl:whichButton" tag="cancel" onclick="form.onsubmit = null;"/>
> 
> after I have pressed this cancel button.
> 
> In my page specification I have:
> 
> <property name="whichButton"/>
> 
> and in my java file I have:
> 
> public abstract String getWhichButton();
> 
> I used this technique in Tapestry 3.0 to determine which button was being 
> pressed.
> 
> Has anyone any ideas why this now fails and how to fix it.
> 
> Thanks in advance,
> 
> Paul
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tapestry 4.0 Unable to read OGNL expression

Posted by "seloha ." <se...@hotmail.com>.
Thanks Paul

That was one of the first things I had already tried but found that it still 
did not work.

I am still unable to get this working and it is reasonably important for me 
to be able to continue using 4.0 since it is how I tend to always submit 
forms with multiple buttons.

I should state that the title of the exception is: 
org.apache.tapestry.BindingException which then proceeds with the more 
detailed description in the original email. This is still the same with the 
ognl: removed from the selected tag. Even more confused.

Paul



Paul Ferrar wrote:

>In 4.0, component parameters have a default binding type.  The default 
>binding type for the "selected" >parameter is ognl: 
>http://jakarta.apache.org/tapestry/current/tapestry/ComponentReference/Submit.html
>
>Try this instead:
>
><input type="submit" jwcid="@Submit" value="Cancel" selected="whichButton" 
>tag="cancel" >onclick="form.onsubmit = null;"/>
>
>It appears that Tapestry is trying to parse "ognl:whichButton" as an ognl 
>expression, instead of just >"whichButton".
>
>Confused?  Me too.  I was under the impression that "ognl:whichButton" 
>would still work...
>
>Paul

seloha . wrote:

	 	 I am getting an error message:

Unable to read OGNL expression '<parsed OGNL expression>' of 
$UserAddPage_67@9bd23c[UserAdd]: $UserAddPage_67.cancel

which highlights this line in my template:

<input type="submit" jwcid="@Submit" value="Cancel" 
selected="ognl:whichButton" tag="cancel" onclick="form.onsubmit = null;"/>

after I have pressed this cancel button.

In my page specification I have:

<property name="whichButton"/>

and in my java file I have:

public abstract String getWhichButton();

I used this technique in Tapestry 3.0 to determine which button was being 
pressed.

Has anyone any ideas why this now fails and how to fix it.

Thanks in advance,

Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tapestry 4.0 Unable to read OGNL expression

Posted by Paul Ferraro <pm...@columbia.edu>.
In 4.0, component parameters have a default binding type.  The default 
binding type for the "selected" parameter is ognl:
http://jakarta.apache.org/tapestry/current/tapestry/ComponentReference/Submit.html

Try this instead:

<input type="submit" jwcid="@Submit" value="Cancel" 
selected="whichButton" tag="cancel" onclick="form.onsubmit = null;"/>

It appears that Tapestry is trying to parse "ognl:whichButton" as an 
ognl expression, instead of just "whichButton".

Confused?  Me too.  I was under the impression that "ognl:whichButton" 
would still work...

Paul

seloha . wrote:

> I am getting an error message:
>
> Unable to read OGNL expression '<parsed OGNL expression>' of 
> $UserAddPage_67@9bd23c[UserAdd]: $UserAddPage_67.cancel
>
> which highlights this line in my template:
>
> <input type="submit" jwcid="@Submit" value="Cancel" 
> selected="ognl:whichButton" tag="cancel" onclick="form.onsubmit = 
> null;"/>
>
> after I have pressed this cancel button.
>
> In my page specification I have:
>
> <property name="whichButton"/>
>
> and in my java file I have:
>
> public abstract String getWhichButton();
>
> I used this technique in Tapestry 3.0 to determine which button was 
> being pressed.
>
> Has anyone any ideas why this now fails and how to fix it.
>
> Thanks in advance,
>
> Paul
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org