You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alan Chandler <al...@chandlerfamily.org.uk> on 2005/08/25 22:51:59 UTC

What page event should I use for the following

I am using iBATIS sqlmap to access my database.  I have what I have set up to 
be am ASO with Application Scope (although I don't think I am using it as 
that???) an object (of class DataMap which effectively holds the sqlMap 
instance for my database.

In my pages class file I have  

	private PaginatedList personList = null;
	
	public void pageBeginRender (PageEvent event) throws SQLException {
		if (personList == null) {
			SqlMapClient map=DataMap.getSqlMapInstance();
			try{
				map.startTransaction();
				personList = map.queryForPaginatedList("getPeopleList",null,PAGE_SIZE);
			}finally {
				map.endTransaction();
			}
		}
	
	}


And in my page.html file the following

<span jwcid="@DirectLink"
	listener="listener:doShowPrevPage"
	parameters="ognl:personList"
	disabled="ognl:personList.firstPage"
	>

This is failing to be parsed because (I think) personList is still null at the 
point at which its parsing the html. (I _think_ I have a breakpoint inside 
pageBeginRender - and I never hit it - ALTHOUGH I am not sure because I am 
not yet sure I understand the effect of the abstract class)

What page event should I use to initialise personList BEFORE the parsing.

-- 
Alan Chandler
http://www.chandlerfamily.org.uk

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


Class loader problems?

Posted by Jonathan O'Connor <Jo...@xcom.de>.
I have a tapestry 3.0.3 app, and I am getting a funny error:
Unable to enhance class de.xcom.emv.tapestry.pages.Archive because it
contains property 'selectedVermittler' of type
de.xcom.provimax.emv.EmvVermittler, not the expected type
de.xcom.provimax.emv.EmvVermittler.

Does this happen because I have two versions of the EmvVermittler class,
each in a different class loader, and therefore they are not considered the
same class? Or is there any other reason I should see this message.

Ciao,
Jonathan O'Connor
XCOM Dublin


*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und ist allein
für den Gebrauch durch den vorgesehenen Empfaenger bestimmt. Dritten ist
das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten,
eine fehlgeleitete E-Mail unverzueglich vollstaendig zu loeschen und uns
eine Nachricht zukommen zu lassen.

This email may contain material that is confidential and for the sole use
of the intended recipient. Any review, distribution by others or forwarding
without express permission is strictly prohibited. If you are not the
intended recipient, please contact the sender and delete all copies.

Re: What page event should I use for the following

Posted by Alan Chandler <al...@chandlerfamily.org.uk>.
On Friday 26 Aug 2005 04:16, Darío Vasconcelos wrote:
> One quick question: does your class implement PageRenderListener? That
> would be an explanation for your pageBeginRender never being called...

Yes it did.  Actually I think I have found the problem - I need to implement 
PageValidateListener, rather than  PageBeginRenderListener.  (and 
PageAttachListener seems to be too early).


-- 
Alan Chandler
http://www.chandlerfamily.org.uk

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


Re: What page event should I use for the following

Posted by Darío Vasconcelos <da...@gmail.com>.
One quick question: does your class implement PageRenderListener? That
would be an explanation for your pageBeginRender never being called...

The abstract class is just a mechanism for allowing Tapestry to
"enhance" your class at runtime, saving you the effort to define
concrete accessor methods for your properties (the ones that are
defined in the .page). All your methods are still called whenever
they're supposed to, only you won't see the code for all methods
declared as abstract inside your class.

Hope it helps,

Dario

On 8/25/05, Alan Chandler <al...@chandlerfamily.org.uk> wrote:
> I am using iBATIS sqlmap to access my database.  I have what I have set up to
> be am ASO with Application Scope (although I don't think I am using it as
> that???) an object (of class DataMap which effectively holds the sqlMap
> instance for my database.
> 
> In my pages class file I have
> 
>         private PaginatedList personList = null;
> 
>         public void pageBeginRender (PageEvent event) throws SQLException {
>                 if (personList == null) {
>                         SqlMapClient map=DataMap.getSqlMapInstance();
>                         try{
>                                 map.startTransaction();
>                                 personList = map.queryForPaginatedList("getPeopleList",null,PAGE_SIZE);
>                         }finally {
>                                 map.endTransaction();
>                         }
>                 }
> 
>         }
> 
> 
> And in my page.html file the following
> 
> <span jwcid="@DirectLink"
>         listener="listener:doShowPrevPage"
>         parameters="ognl:personList"
>         disabled="ognl:personList.firstPage"
>         >
> 
> This is failing to be parsed because (I think) personList is still null at the
> point at which its parsing the html. (I _think_ I have a breakpoint inside
> pageBeginRender - and I never hit it - ALTHOUGH I am not sure because I am
> not yet sure I understand the effect of the abstract class)
> 
> What page event should I use to initialise personList BEFORE the parsing.
> 
> --
> Alan Chandler
> http://www.chandlerfamily.org.uk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
I have enough money to last me the rest of my life, unless I buy something.
    Jackie Mason

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