You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by eg...@optonline.net on 2006/01/17 18:33:03 UTC

Stuck: Is ognl config different for Portal Server?

Can someone tell me how the configuration for ognl resolution differs between a servlet environment and a portlet environment?

I am trying to come up to speed with using Tapestry for Websphere Portal 5.1
I am developing using RAD 6.
I have successfully deployed the Hello World tutorial as a portlet, but I am having trouble with the Direct Link tutorial.  Apparently, I don't have things wired up correctly, as I am getting a BindingException.  My class that extends BasePage is not being found.

Here is the relevant excerpt of the exception:

org.apache.tapestry.BindingException
Unable to read OGNL expression '<parsed OGNL expression>' of $BasePage_3@48500da0[DirectLink]: $BasePage_3.counter
binding ExpressionBinding[DirectLink counter]  
location context:/DirectLink.html, line 3
1 <p> 
2 The current value is:  
3 <span style="font-size:xx-large"><span jwcid="@Insert" value="ognl:counter">37</span></span> 
4 </p>  
5  
6 <p> 
7 <a href="#" jwcid="@DirectLink" listener="listener:doClick">increment counter</a> 
8 </p> 
 

org.apache.hivemind.ApplicationRuntimeException
Unable to read OGNL expression '<parsed OGNL expression>' of $BasePage_3@48500da0[DirectLink]: $BasePage_3.counter
component $BasePage_3@48500da0[DirectLink]  
location context:/DirectLink.html 

ognl.NoSuchPropertyException
$BasePage_3.counter
name counter  
target $BasePage_3@48500da0[DirectLink]  

ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:123) 


My assumption is that my template, DirectLink.html, requires a corresponding class of the same name.  This is the source of DirectLink.java (Note: I've commented out annotations, as they are unsupported in jdk 1.4, and hard-coded a counter attribute just for initial testing.  I also created copies named Home.java and View.java with the same code, but to no effect):

package tutorial.forms.pages;

// import org.apache.tapestry.annotations.Persist;
import org.apache.tapestry.html.BasePage;

public abstract class DirectLink extends BasePage
{
    // @Persist
    private int counter = 17;
    public abstract int getCounter();
    public abstract void setCounter(int counter);
    
    public void doClick()
    {
        int counter = getCounter();
        
        counter++;
        
        setCounter(counter);
    }
}


Lastly, I have app.application in my WEB-INF folder with the following contents:

<?xml version="1.0"?>

<!DOCTYPE application PUBLIC 
  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
  
<application>  
  <meta key="org.apache.tapestry.page-class-packages" value="tutorial.forms.pages"/>
	
</application>


Have I overlooked something, or does portal require something different?

Regards,
Ed




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