You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andrew Chung <an...@rogers.com> on 2004/12/02 18:41:27 UTC

Best way to implement skins?

Hello all,

Newbie Tapestry user here.  First post (woot :).
Getting my feet wet concurrently with JBoss, Hibernate and Tapestry.

I need to implement a way so that the presentation is customized according 
to the user.
Think "skins".

For example, instead of
<span jwcid="@Border">
...
</span>

I need to implement something like
<span jwcid="ognl:customBorder">
...
</span>

I admit that I haven't reached the stage of trying this as yet.
I have the Tapestry in Action book and have not found any reference to 
dynamically generated jwcids being allowed.

Does anyone have a quick answer for this or a better solution?


Thanks,

Andrew Chung
Northcastle Systems


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


Re: Best way to implement skins?

Posted by Jose Gonzalez Gomez <jg...@opentechnet.com>.
    Darren,

    Where do you store the CSS files? I guess you don't package them 
with the web application... How do you reference them?

    Thanks in advance, best regards
    Jose

Darren foltinek wrote:

> We took the plunge and implemented skins using Cascading Style Sheets 
> (CSS).  It was a bit difficult to learn to layout pages using CSS 
> instead of "normal" HTML, but no regrets.   There are several major 
> advantages:
>
> 1) Tapestry can produce pages skinned by user preferences, source 
> domain, time of day, whatever - just send a different CSS file.
> 2) Browser compability issues are easily managed by including special 
> CSS files to fix bugs by using server-side browser detection.
> 3) The app can be reskinned without wading through pages and pages of 
> HTML.
> 4) Layout bugs can be fixed in very quicky by editing the CSS file - 
> no need to re-deploy the webapp.
>
> Disadvantages?  Well, you have to learn CSS...
>
> Don't think it's possible to have full control of layout from CSS?  
> Check out this site for motivation:  http://www.csszengarden.com/
>
> See our resulting Tapestry driven site at: http://www.canadianfocus.com
>
> Cheers,
> -- Darren
>
>
>> Newbie Tapestry user here.  First post (woot :).
>> Getting my feet wet concurrently with JBoss, Hibernate and Tapestry.
>>
>> I need to implement a way so that the presentation is customized 
>> according to the user.
>> Think "skins".
>>
>> For example, instead of
>> <span jwcid="@Border">
>> ...
>> </span>
>>
>> I need to implement something like
>> <span jwcid="ognl:customBorder">
>> ...
>> </span>
>>
>> I admit that I haven't reached the stage of trying this as yet.
>> I have the Tapestry in Action book and have not found any reference 
>> to dynamically generated jwcids being allowed.
>>
>> Does anyone have a quick answer for this or a better solution?
>>
>>
>> Thanks,
>>
>> Andrew Chung
>> Northcastle Systems
>
>
>
> ---------------------------------------------------------------------
> 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: Best way to implement skins?

Posted by Andrew Chung <an...@rogers.com>.
Thanks Darren

I must say that this page is definitely an enlightenment and I've bookmarked 
it for future reference.

I do know CSS but not on the order of these guys.

The problem I'm facing is that the links/capabilities are also based on the 
user, not just the look and feel.
Given that the links are Tapestry generated, it seems that the CSS solution 
addresses my needs partway.


Regards,
Andrew



----- Original Message ----- 
From: "Darren foltinek" <da...@frontrange.ca>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, December 02, 2004 1:25 PM
Subject: Re: Best way to implement skins?


> We took the plunge and implemented skins using Cascading Style Sheets 
> (CSS).  It was a bit difficult to learn to layout pages using CSS instead 
> of "normal" HTML, but no regrets.   There are several major advantages:
>
> 1) Tapestry can produce pages skinned by user preferences, source domain, 
> time of day, whatever - just send a different CSS file.
> 2) Browser compability issues are easily managed by including special CSS 
> files to fix bugs by using server-side browser detection.
> 3) The app can be reskinned without wading through pages and pages of 
> HTML.
> 4) Layout bugs can be fixed in very quicky by editing the CSS file - no 
> need to re-deploy the webapp.
>
> Disadvantages?  Well, you have to learn CSS...
>
> Don't think it's possible to have full control of layout from CSS?  Check 
> out this site for motivation:  http://www.csszengarden.com/
>
> See our resulting Tapestry driven site at: http://www.canadianfocus.com
>
> Cheers,
> -- Darren
>
>
>> Newbie Tapestry user here.  First post (woot :).
>> Getting my feet wet concurrently with JBoss, Hibernate and Tapestry.
>>
>> I need to implement a way so that the presentation is customized 
>> according to the user.
>> Think "skins".
>>
>> For example, instead of
>> <span jwcid="@Border">
>> ...
>> </span>
>>
>> I need to implement something like
>> <span jwcid="ognl:customBorder">
>> ...
>> </span>
>>
>> I admit that I haven't reached the stage of trying this as yet.
>> I have the Tapestry in Action book and have not found any reference to 
>> dynamically generated jwcids being allowed.
>>
>> Does anyone have a quick answer for this or a better solution?
>>
>>
>> Thanks,
>>
>> Andrew Chung
>> Northcastle Systems
>
>
> ---------------------------------------------------------------------
> 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: Best way to implement skins?

Posted by Darren foltinek <da...@frontrange.ca>.
We took the plunge and implemented skins using Cascading Style Sheets 
(CSS).  It was a bit difficult to learn to layout pages using CSS 
instead of "normal" HTML, but no regrets.   There are several major 
advantages:

1) Tapestry can produce pages skinned by user preferences, source 
domain, time of day, whatever - just send a different CSS file.
2) Browser compability issues are easily managed by including special 
CSS files to fix bugs by using server-side browser detection.
3) The app can be reskinned without wading through pages and pages of HTML.
4) Layout bugs can be fixed in very quicky by editing the CSS file - no 
need to re-deploy the webapp.

Disadvantages?  Well, you have to learn CSS...

Don't think it's possible to have full control of layout from CSS?  
Check out this site for motivation:  http://www.csszengarden.com/

See our resulting Tapestry driven site at: http://www.canadianfocus.com

Cheers,
-- Darren


> Newbie Tapestry user here.  First post (woot :).
> Getting my feet wet concurrently with JBoss, Hibernate and Tapestry.
>
> I need to implement a way so that the presentation is customized 
> according to the user.
> Think "skins".
>
> For example, instead of
> <span jwcid="@Border">
> ...
> </span>
>
> I need to implement something like
> <span jwcid="ognl:customBorder">
> ...
> </span>
>
> I admit that I haven't reached the stage of trying this as yet.
> I have the Tapestry in Action book and have not found any reference to 
> dynamically generated jwcids being allowed.
>
> Does anyone have a quick answer for this or a better solution?
>
>
> Thanks,
>
> Andrew Chung
> Northcastle Systems


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


Re: Initializing Components [auf Viren geprueft]

Posted by Jamie Orchard-Hays <ja...@dang.com>.
If you're initializing a property on a component, then you have to lazy 
initialize it. pageBeginRender won't work for you because you can't specify 
the order.


----- Original Message ----- 
From: "Jonathan O'Connor" <Jo...@xcom.de>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, December 02, 2004 1:08 PM
Subject: Initializing Components [auf Viren geprueft]


Folks,
after much thrashing this week, I'm wondering how best to initialize a
component. This should be easy, but ???

We have a page containing a component. The component takes an DB record
key as a parameter (we've tried both in and auto (more thrashing)).
The component uses this DB key to get the full record from the DB which is
then displayed in a form.

Firstly: What comes first page.pageBeginRender or
component.pageBeginRender? In our debugging we found the component is
called first.
Secondly, we implemented our own param setter method. It does the DB query
and sets a property with the query result. But we get a PageLocked
exception, telling us we are not allowed to set any properties when the
setParam() method is running.

Finally, what is the normal way of initializing a component based on its
parameters?
Ciao,
Jonathan O'Connor
XCOM Dublin


*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist allein fur 
den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten ist das 
Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten, eine 
fehlgeleitete E-Mail unverzuglich vollstandig zu loschen 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.


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


Re: Initializing Components [auf Viren geprueft]

Posted by Nick Stuart <ba...@gmail.com>.
That would be my understand Kris. The component sounds like it should
completly control what is being displayed, so it doesn't (and
shouldn't) matter where it get intialized. Now if the component talks
to page and/or other components, then you would have a problem with
when things are intialized.

-Nick


On Thu, 2 Dec 2004 12:02:35 -0800 (PST), Kris Rasmussen
<kr...@yahoo.com> wrote:
> I've always used PageBeginRender to do this. I fetch the record in the PageBeginRender and store it in a property defined for the component. Shouldn't it work as long as the form components referencing the record are contained within the component that fetches the record?
> 
> Thanks,
> Kris
> 
> 
> 
> Jonathan O'Connor <Jo...@xcom.de> wrote:
> Folks,
> after much thrashing this week, I'm wondering how best to initialize a
> component. This should be easy, but ???
> 
> We have a page containing a component. The component takes an DB record
> key as a parameter (we've tried both in and auto (more thrashing)).
> The component uses this DB key to get the full record from the DB which is
> then displayed in a form.
> 
> Firstly: What comes first page.pageBeginRender or
> component.pageBeginRender? In our debugging we found the component is
> called first.
> Secondly, we implemented our own param setter method. It does the DB query
> and sets a property with the query result. But we get a PageLocked
> exception, telling us we are not allowed to set any properties when the
> setParam() method is running.
> 
> Finally, what is the normal way of initializing a component based on its
> parameters?
> Ciao,
> Jonathan O'Connor
> XCOM Dublin
> 
> *** XCOM AG Legal Disclaimer ***
> 
> Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist allein fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzuglich vollstandig zu loschen 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.
> 
>                 
> ---------------------------------
> Do you Yahoo!?
>  Yahoo! Mail - You care about security. So do we.
>

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


Initializing Components - Solution and Possible Tapestry Bug [auf Viren geprueft]

Posted by Jonathan O'Connor <Jo...@xcom.de>.
We finally got a solution for all this messing.

Our Solution:
1. We overrode component.prepareForRender(), calling super first, and then 
calling our initFromDB() method.
2. The DB record property can't be persistent, because if you set a 
persistent property in prepareForRender it complains about locked pages. 
Instead we store our DB record in the Visit. Note: non-persistent 
properties can be set with no problems in prepareForRender.

This is pretty horrible stuff. What I would like to know, is when can I 
set persistent properties of a component safely? Sadly, pageBeginRender is 
too early.

Also, I think its a bug not being able to set persistent properties in 
prepareForRender.
Ciao,
Jonathan O'Connor
XCOM Dublin



"Bryan Lewis" <br...@maine.rr.com> 
02/12/2004 21:07
Please respond to
"Tapestry users" <ta...@jakarta.apache.org>


To
"Tapestry users" <ta...@jakarta.apache.org>
cc

Subject
Re: Initializing Components [auf Viren geprueft]






To support that point... let's say later on you decide to make the page an
IExternalPage.  Which gets called first, page.activateExternalPage(),
page.pageBeginRender() or component.pageBeginRender()?
This little detail caught me a few days ago... the answer was
activateExternalPage(), so I had to duplicate a bit of code from
component.pageBeginRender() that I'd been relying on running first.


----- Original Message ----- 
From: "Jamie Orchard-Hays" <ja...@dang.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, December 02, 2004 3:17 PM
Subject: Re: Initializing Components [auf Viren geprueft]


> Jonathan said he was using pBR in his component. This is why he's having
the
> problem. If he was to populate the data in the component, gotta use lazy
> initialization. Say you have pBR used in both the calling page and the
> component. Which gets called first? Sometimes it might be the 
component's,
> sometimes the page's and there's no way to control it. So of the pBR in
the
> page relies on the component having values initialized, you're left with
> using lazy initialization in the property itself.
>
> Jamie
> ----- Original Message ----- 
> From: "Kris Rasmussen" <kr...@yahoo.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, December 02, 2004 3:02 PM
> Subject: Re: Initializing Components [auf Viren geprueft]
>
>
> > I've always used PageBeginRender to do this. I fetch the record in the
> > PageBeginRender and store it in a property defined for the component.
> > Shouldn't it work as long as the form components referencing the 
record
> > are contained within the component that fetches the record?
> >
> > Thanks,
> > Kris
> >
> > Jonathan O'Connor <Jo...@xcom.de> wrote:
> > Folks,
> > after much thrashing this week, I'm wondering how best to initialize a
> > component. This should be easy, but ???
> >
> > We have a page containing a component. The component takes an DB 
record
> > key as a parameter (we've tried both in and auto (more thrashing)).
> > The component uses this DB key to get the full record from the DB 
which
is
> > then displayed in a form.
> >
> > Firstly: What comes first page.pageBeginRender or
> > component.pageBeginRender? In our debugging we found the component is
> > called first.
> > Secondly, we implemented our own param setter method. It does the DB
query
> > and sets a property with the query result. But we get a PageLocked
> > exception, telling us we are not allowed to set any properties when 
the
> > setParam() method is running.
> >
> > Finally, what is the normal way of initializing a component based on 
its
> > parameters?
> > Ciao,
> > Jonathan O'Connor
> > XCOM Dublin
> >
> >
> > *** XCOM AG Legal Disclaimer ***
> >
> > Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist 
allein
> > fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten 
ist
> > das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir
> > bitten, eine fehlgeleitete E-Mail unverzuglich vollstandig zu loschen
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.
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail - You care about security. So do we.
>
>
> ---------------------------------------------------------------------
> 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





*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist allein fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzuglich vollstandig zu loschen 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: Initializing Components [auf Viren geprueft]

Posted by Bryan Lewis <br...@maine.rr.com>.
To support that point... let's say later on you decide to make the page an
IExternalPage.  Which gets called first, page.activateExternalPage(),
page.pageBeginRender() or component.pageBeginRender()?
This little detail caught me a few days ago... the answer was
activateExternalPage(), so I had to duplicate a bit of code from
component.pageBeginRender() that I'd been relying on running first.


----- Original Message ----- 
From: "Jamie Orchard-Hays" <ja...@dang.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, December 02, 2004 3:17 PM
Subject: Re: Initializing Components [auf Viren geprueft]


> Jonathan said he was using pBR in his component. This is why he's having
the
> problem. If he was to populate the data in the component, gotta use lazy
> initialization. Say you have pBR used in both the calling page and the
> component. Which gets called first? Sometimes it might be the component's,
> sometimes the page's and there's no way to control it. So of the pBR in
the
> page relies on the component having values initialized, you're left with
> using lazy initialization in the property itself.
>
> Jamie
> ----- Original Message ----- 
> From: "Kris Rasmussen" <kr...@yahoo.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, December 02, 2004 3:02 PM
> Subject: Re: Initializing Components [auf Viren geprueft]
>
>
> > I've always used PageBeginRender to do this. I fetch the record in the
> > PageBeginRender and store it in a property defined for the component.
> > Shouldn't it work as long as the form components referencing the record
> > are contained within the component that fetches the record?
> >
> > Thanks,
> > Kris
> >
> > Jonathan O'Connor <Jo...@xcom.de> wrote:
> > Folks,
> > after much thrashing this week, I'm wondering how best to initialize a
> > component. This should be easy, but ???
> >
> > We have a page containing a component. The component takes an DB record
> > key as a parameter (we've tried both in and auto (more thrashing)).
> > The component uses this DB key to get the full record from the DB which
is
> > then displayed in a form.
> >
> > Firstly: What comes first page.pageBeginRender or
> > component.pageBeginRender? In our debugging we found the component is
> > called first.
> > Secondly, we implemented our own param setter method. It does the DB
query
> > and sets a property with the query result. But we get a PageLocked
> > exception, telling us we are not allowed to set any properties when the
> > setParam() method is running.
> >
> > Finally, what is the normal way of initializing a component based on its
> > parameters?
> > Ciao,
> > Jonathan O'Connor
> > XCOM Dublin
> >
> >
> > *** XCOM AG Legal Disclaimer ***
> >
> > Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist allein
> > fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten ist
> > das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir
> > bitten, eine fehlgeleitete E-Mail unverzuglich vollstandig zu loschen
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.
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail - You care about security. So do we.
>
>
> ---------------------------------------------------------------------
> 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: Initializing Components [auf Viren geprueft]

Posted by Jamie Orchard-Hays <ja...@dang.com>.
Jonathan said he was using pBR in his component. This is why he's having the 
problem. If he was to populate the data in the component, gotta use lazy 
initialization. Say you have pBR used in both the calling page and the 
component. Which gets called first? Sometimes it might be the component's, 
sometimes the page's and there's no way to control it. So of the pBR in the 
page relies on the component having values initialized, you're left with 
using lazy initialization in the property itself.

Jamie
----- Original Message ----- 
From: "Kris Rasmussen" <kr...@yahoo.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, December 02, 2004 3:02 PM
Subject: Re: Initializing Components [auf Viren geprueft]


> I've always used PageBeginRender to do this. I fetch the record in the 
> PageBeginRender and store it in a property defined for the component. 
> Shouldn't it work as long as the form components referencing the record 
> are contained within the component that fetches the record?
>
> Thanks,
> Kris
>
> Jonathan O'Connor <Jo...@xcom.de> wrote:
> Folks,
> after much thrashing this week, I'm wondering how best to initialize a
> component. This should be easy, but ???
>
> We have a page containing a component. The component takes an DB record
> key as a parameter (we've tried both in and auto (more thrashing)).
> The component uses this DB key to get the full record from the DB which is
> then displayed in a form.
>
> Firstly: What comes first page.pageBeginRender or
> component.pageBeginRender? In our debugging we found the component is
> called first.
> Secondly, we implemented our own param setter method. It does the DB query
> and sets a property with the query result. But we get a PageLocked
> exception, telling us we are not allowed to set any properties when the
> setParam() method is running.
>
> Finally, what is the normal way of initializing a component based on its
> parameters?
> Ciao,
> Jonathan O'Connor
> XCOM Dublin
>
>
> *** XCOM AG Legal Disclaimer ***
>
> Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist allein 
> fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten ist 
> das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir 
> bitten, eine fehlgeleitete E-Mail unverzuglich vollstandig zu loschen 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.
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we. 


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


Re: Initializing Components [auf Viren geprueft]

Posted by Kris Rasmussen <kr...@yahoo.com>.
I've always used PageBeginRender to do this. I fetch the record in the PageBeginRender and store it in a property defined for the component. Shouldn't it work as long as the form components referencing the record are contained within the component that fetches the record?
 
Thanks,
Kris

Jonathan O'Connor <Jo...@xcom.de> wrote:
Folks,
after much thrashing this week, I'm wondering how best to initialize a
component. This should be easy, but ???

We have a page containing a component. The component takes an DB record
key as a parameter (we've tried both in and auto (more thrashing)).
The component uses this DB key to get the full record from the DB which is
then displayed in a form.

Firstly: What comes first page.pageBeginRender or
component.pageBeginRender? In our debugging we found the component is
called first.
Secondly, we implemented our own param setter method. It does the DB query
and sets a property with the query result. But we get a PageLocked
exception, telling us we are not allowed to set any properties when the
setParam() method is running.

Finally, what is the normal way of initializing a component based on its
parameters?
Ciao,
Jonathan O'Connor
XCOM Dublin


*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist allein fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzuglich vollstandig zu loschen 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.

		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.

Initializing Components [auf Viren geprueft]

Posted by Jonathan O'Connor <Jo...@xcom.de>.
Folks,
after much thrashing this week, I'm wondering how best to initialize a 
component. This should be easy, but ???

We have a page containing a component. The component takes an DB record 
key as a parameter (we've tried both in and auto (more thrashing)).
The component uses this DB key to get the full record from the DB which is 
then displayed in a form.

Firstly: What comes first page.pageBeginRender or 
component.pageBeginRender? In our debugging we found the component is 
called first.
Secondly, we implemented our own param setter method. It does the DB query 
and sets a property with the query result. But we get a PageLocked 
exception, telling us we are not allowed to set any properties when the 
setParam() method is running.

Finally, what is the normal way of initializing a component based on its 
parameters?
Ciao,
Jonathan O'Connor
XCOM Dublin


*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschlie?lich ihrer Anhange ist vertraulich und ist allein fur den Gebrauch durch den vorgesehenen Empfanger bestimmt. Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzuglich vollstandig zu loschen 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.