List Info

Thread: Calling Customer Controls from POJOs




Calling Customer Controls from POJOs
country flaguser name
Australia
2007-06-11 17:15:30
Hi,

 

I'm writing a web application (WLP 9.2) which has a
scheduler component to it. I'm trying to call a custom
control from a POJO that the scheduler calls. But whenever i
call a method on the control I always get a NPE, even though
all the correct annotations are present. All the necessary
control generated files are created, but it would just seem
at runtime that the JVM doesn't have any idea of this and
never instantiates the control.

 

Is there some 'hook' i'm missing, or can controls only be
called from within the beehive framework - pageflows and
other controls.

 

Thanks in advance.

 
Anthony Maguire
Oakton
ph:  (03) 9617 0200
fax: (03) 9621 1951
Mobile: 0416 766 931
www.oakton.com.au <https://melb.oakton.com.au/exch
web/bin/redir.asp?URL=http://www.oakton.com.au> 

IMPORTANT
1.	This email and any attachments are confidential.  Any
unauthorised dissemination or other use of these materials
is prohibited.  If received in error, please contact us and
delete all copies.  
2.	Before opening or using attachments, check them for
viruses and defects.  Our liability is limited to
resupplying any affected attachments. 
3.	Protecting your privacy is important to us.  Our privacy
statement and further information is available at
www.oakton.com.au.

Re: Calling Customer Controls from POJOs
user name
2007-06-12 10:20:42
Hi Anthony,

While it is possible to use some Beehive controls directly
from a POJO
it is not a use case we support.

If your custom control does not contain any 'Context'
annotations you
may be able to use it from a POJO.  You will need to
instantiate the
control using programmatic instantiation, see:

http://beehive.apache.o
rg/docs/1.0.2/controls/programming.html#Programmatic+Instant
iation

in the Beehive documentation.  You won't get any lifecycle
events or
have access to any resource from a control container context
when
using the control from within a pojo.

  - Chad






On 6/11/07, Anthony Maguire <anthony.maguireoakton.com.au> wrote:
> Hi,
>
>
>
> I'm writing a web application (WLP 9.2) which has a
scheduler component to it. I'm trying to call a custom
control from a POJO that the scheduler calls. But whenever i
call a method on the control I always get a NPE, even though
all the correct annotations are present. All the necessary
control generated files are created, but it would just seem
at runtime that the JVM doesn't have any idea of this and
never instantiates the control.
>
>
>
> Is there some 'hook' i'm missing, or can controls only
be called from within the beehive framework - pageflows and
other controls.
>
>
>
> Thanks in advance.
>
>
> Anthony Maguire
> Oakton
> ph:  (03) 9617 0200
> fax: (03) 9621 1951
> Mobile: 0416 766 931
> www.oakton.com.au <https://melb.oakton.com.au/exch
web/bin/redir.asp?URL=http://www.oakton.com.au>
>
> IMPORTANT
> 1.      This email and any attachments are
confidential.  Any unauthorised dissemination or other use
of these materials is prohibited.  If received in error,
please contact us and delete all copies.
> 2.      Before opening or using attachments, check them
for viruses and defects.  Our liability is limited to
resupplying any affected attachments.
> 3.      Protecting your privacy is important to us. 
Our privacy statement and further information is available
at www.oakton.com.au.
>

RE: Calling Customer Controls from POJOs
country flaguser name
Australia
2007-06-12 16:30:15
Chad,
 
Thanks for the response, appreciate you taking the time to
answer. It's what i figured. Pity that!!!
 
Cheers,
Anthony Maguire
Oakton
ph:  (03) 9617 0200
fax: (03) 9621 1951
Mobile: 0416 766 931
www.oakton.com.au <https://melb.oakton.com.au/exch
web/bin/redir.asp?URL=http://www.oakton.com.au> 

________________________________

From: Chad Schoettger [mailto:chad.schoettgergmail.com]
Sent: Wed 13/06/2007 1:20 AM
To: Beehive Users
Subject: Re: Calling Customer Controls from POJOs



Hi Anthony,

While it is possible to use some Beehive controls directly
from a POJO
it is not a use case we support.

If your custom control does not contain any 'Context'
annotations you
may be able to use it from a POJO.  You will need to
instantiate the
control using programmatic instantiation, see:

http://beehive.apache.o
rg/docs/1.0.2/controls/programming.html#Programmatic+Instant
iation

in the Beehive documentation.  You won't get any lifecycle
events or
have access to any resource from a control container context
when
using the control from within a pojo.

  - Chad






On 6/11/07, Anthony Maguire <anthony.maguireoakton.com.au> wrote:
> Hi,
>
>
>
> I'm writing a web application (WLP 9.2) which has a
scheduler component to it. I'm trying to call a custom
control from a POJO that the scheduler calls. But whenever i
call a method on the control I always get a NPE, even though
all the correct annotations are present. All the necessary
control generated files are created, but it would just seem
at runtime that the JVM doesn't have any idea of this and
never instantiates the control.
>
>
>
> Is there some 'hook' i'm missing, or can controls only
be called from within the beehive framework - pageflows and
other controls.
>
>
>
> Thanks in advance.
>
>
> Anthony Maguire
> Oakton
> ph:  (03) 9617 0200
> fax: (03) 9621 1951
> Mobile: 0416 766 931
> www.oakton.com.au <https://melb.oakton.com.au/exch
web/bin/redir.asp?URL=http://www.oakton.com.au>
>
> IMPORTANT
> 1.      This email and any attachments are
confidential.  Any unauthorised dissemination or other use
of these materials is prohibited.  If received in error,
please contact us and delete all copies.
> 2.      Before opening or using attachments, check them
for viruses and defects.  Our liability is limited to
resupplying any affected attachments.
> 3.      Protecting your privacy is important to us. 
Our privacy statement and further information is available
at www.oakton.com.au.
>



IMPORTANT
1.	This email and any attachments are confidential.  Any
unauthorised dissemination or other use of these materials
is prohibited.  If received in error, please contact us and
delete all copies.  
2.	Before opening or using attachments, check them for
viruses and defects.  Our liability is limited to
resupplying any affected attachments. 
3.	Protecting your privacy is important to us.  Our privacy
statement and further information is available at
www.oakton.com.au.
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )