|
List Info
Thread: @PostConstruct - managed properties not set first
|
|
| @PostConstruct - managed properties not
set first |
  United States |
2007-08-27 12:31:00 |
I'm trying to use PostConstruct with MyFaces 1.2.0 as
described by Jacob
Hookom:
http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
I added the javax.annotation dependency to my pom.xml:
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
</dependency>
My managed bean looks as follows:
<managed-bean>
<managed-bean-name>userForm</managed-bean-name>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>id</property-name>
<value>#{param.id}</value>
</managed-property>
<managed-property>
<property-name>userManager</property-name>
<value>#</value>
</managed-property>
</managed-bean>
If I fire up a debugger, my PostConstruct method gets
hit, but none of my
managed properties have been initialized. Even if I pass in
?id=12.
I'm using the latest release of the maven-jetty-plugin
(6.1H.5-beta).
Any ideas?
Thanks,
Matt
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a12353855
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-08-27 17:40:24 |
Is there a working example that uses PostConstruct I can look
at? Google
doesn't seem to help much on this one. A bunch of folks
saying it works, but
no proof.
Thanks,
Matt
mraible wrote:
>
> I'm trying to use PostConstruct with MyFaces 1.2.0 as
described by Jacob
> Hookom:
>
> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>
> I added the javax.annotation dependency to my pom.xml:
>
> <dependency>
>
<groupId>javax.annotation</groupId>
>
<artifactId>jsr250-api</artifactId>
> <version>1.0</version>
> </dependency>
>
> My managed bean looks as follows:
>
> <managed-bean>
>
<managed-bean-name>userForm</managed-bean-name>
>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>
<managed-bean-scope>request</managed-bean-scope>
> <managed-property>
>
<property-name>id</property-name>
> <value>#{param.id}</value>
> </managed-property>
> <managed-property>
>
<property-name>userManager</property-name>
> <value>#</value>
> </managed-property>
> </managed-bean>
>
> If I fire up a debugger, my PostConstruct method gets
hit, but none of my
> managed properties have been initialized. Even if I
pass in ?id=12.
>
> I'm using the latest release of the maven-jetty-plugin
(6.1H.5-beta).
>
> Any ideas?
>
> Thanks,
>
> Matt
>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a12359140
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-10-21 08:15:04 |
Hi Matt,
did you get this to work for you? Im using appfuse 2 with
myfaces 1.20
implementation. Do I have to switch to Suns RI to use
this?
..kace
mraible wrote:
>
> Is there a working example that uses PostConstruct I can look at? Google
> doesn't seem to help much on this one. A bunch of folks
saying it works,
> but no proof.
>
> Thanks,
>
> Matt
>
>
> mraible wrote:
>>
>> I'm trying to use PostConstruct with MyFaces
1.2.0 as described by Jacob
>> Hookom:
>>
>> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>>
>> I added the javax.annotation dependency to my
pom.xml:
>>
>> <dependency>
>>
<groupId>javax.annotation</groupId>
>>
<artifactId>jsr250-api</artifactId>
>> <version>1.0</version>
>> </dependency>
>>
>> My managed bean looks as follows:
>>
>> <managed-bean>
>>
<managed-bean-name>userForm</managed-bean-name>
>>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>>
<managed-bean-scope>request</managed-bean-scope>
>> <managed-property>
>>
<property-name>id</property-name>
>> <value>#{param.id}</value>
>> </managed-property>
>> <managed-property>
>>
<property-name>userManager</property-name>
>>
<value>#</value>
>> </managed-property>
>> </managed-bean>
>>
>> If I fire up a debugger, my PostConstruct method gets
hit, but none of
>> my managed properties have been initialized. Even
if I pass in ?id=12.
>>
>> I'm using the latest release of the
maven-jetty-plugin (6.1H.5-beta).
>>
>> Any ideas?
>>
>> Thanks,
>>
>> Matt
>>
>>
>>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a13328973
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-10-21 11:05:32 |
I never got this to work on Tomcat or Jetty, I only got it
to work on
GlassFish. I suspect that changing web.xml to use a Servlet
2.5 XSD might
fix the problem.
Matt
kace wrote:
>
> Hi Matt,
>
> did you get this to work for you? Im using appfuse 2
with myfaces 1.20
> implementation. Do I have to switch to Suns RI to use
this?
>
> ..kace
>
> mraible wrote:
>>
>> Is there a working example that uses PostConstruct I can look at? Google
>> doesn't seem to help much on this one. A bunch of
folks saying it works,
>> but no proof.
>>
>> Thanks,
>>
>> Matt
>>
>>
>> mraible wrote:
>>>
>>> I'm trying to use PostConstruct with MyFaces
1.2.0 as described by
>>> Jacob Hookom:
>>>
>>> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>>>
>>> I added the javax.annotation dependency to my
pom.xml:
>>>
>>> <dependency>
>>>
<groupId>javax.annotation</groupId>
>>>
<artifactId>jsr250-api</artifactId>
>>> <version>1.0</version>
>>> </dependency>
>>>
>>> My managed bean looks as follows:
>>>
>>> <managed-bean>
>>>
<managed-bean-name>userForm</managed-bean-name>
>>>
>>>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>>>
<managed-bean-scope>request</managed-bean-scope>
>>> <managed-property>
>>>
<property-name>id</property-name>
>>>
<value>#{param.id}</value>
>>> </managed-property>
>>> <managed-property>
>>>
<property-name>userManager</property-name>
>>>
<value>#</value>
>>> </managed-property>
>>> </managed-bean>
>>>
>>> If I fire up a debugger, my PostConstruct method gets hit, but none of
>>> my managed properties have been initialized.
Even if I pass in ?id=12.
>>>
>>> I'm using the latest release of the
maven-jetty-plugin (6.1H.5-beta).
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>>
>>> Matt
>>>
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a13330444
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-10-22 16:41:06 |
Hey Matt, are you in a position to provide a working example
for how you got
it to work on Glassfish so i can mess around with it on
tomcat/jetty with
appfuse in mind?
Appreciate any help on this.
Thanks.
..kace
mraible wrote:
>
> I never got this to work on Tomcat or Jetty, I only got
it to work on
> GlassFish. I suspect that changing web.xml to use a
Servlet 2.5 XSD might
> fix the problem.
>
> Matt
>
>
> kace wrote:
>>
>> Hi Matt,
>>
>> did you get this to work for you? Im using appfuse
2 with myfaces 1.20
>> implementation. Do I have to switch to Suns RI to
use this?
>>
>> ..kace
>>
>> mraible wrote:
>>>
>>> Is there a working example that uses PostConstruct I can look at?
>>> Google doesn't seem to help much on this one. A
bunch of folks saying it
>>> works, but no proof.
>>>
>>> Thanks,
>>>
>>> Matt
>>>
>>>
>>> mraible wrote:
>>>>
>>>> I'm trying to use PostConstruct with MyFaces
1.2.0 as described by
>>>> Jacob Hookom:
>>>>
>>>> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>>>>
>>>> I added the javax.annotation dependency to
my pom.xml:
>>>>
>>>> <dependency>
>>>>
<groupId>javax.annotation</groupId>
>>>>
<artifactId>jsr250-api</artifactId>
>>>> <version>1.0</version>
>>>> </dependency>
>>>>
>>>> My managed bean looks as follows:
>>>>
>>>> <managed-bean>
>>>>
<managed-bean-name>userForm</managed-bean-name>
>>>>
>>>>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>>>>
<managed-bean-scope>request</managed-bean-scope>
>>>> <managed-property>
>>>>
<property-name>id</property-name>
>>>>
<value>#{param.id}</value>
>>>> </managed-property>
>>>> <managed-property>
>>>>
<property-name>userManager</property-name>
>>>>
<value>#</value>
>>>> </managed-property>
>>>> </managed-bean>
>>>>
>>>> If I fire up a debugger, my PostConstruct method gets hit, but none of
>>>> my managed properties have been
initialized. Even if I pass in ?id=12.
>>>>
>>>> I'm using the latest release of the
maven-jetty-plugin (6.1H.5-beta).
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks,
>>>>
>>>> Matt
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a13353232
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-10-22 16:51:48 |
I can probably whip up an example with AppFuse Light if that
works.
Matt
kace wrote:
>
> Hey Matt, are you in a position to provide a working
example for how you
> got it to work on Glassfish so i can mess around with
it on tomcat/jetty
> with appfuse in mind?
>
> Appreciate any help on this.
> Thanks.
>
> ..kace
>
> mraible wrote:
>>
>> I never got this to work on Tomcat or Jetty, I only
got it to work on
>> GlassFish. I suspect that changing web.xml to use a
Servlet 2.5 XSD might
>> fix the problem.
>>
>> Matt
>>
>>
>> kace wrote:
>>>
>>> Hi Matt,
>>>
>>> did you get this to work for you? Im using
appfuse 2 with myfaces 1.20
>>> implementation. Do I have to switch to Suns RI
to use this?
>>>
>>> ..kace
>>>
>>> mraible wrote:
>>>>
>>>> Is there a working example that uses PostConstruct I can look at?
>>>> Google doesn't seem to help much on this
one. A bunch of folks saying
>>>> it works, but no proof.
>>>>
>>>> Thanks,
>>>>
>>>> Matt
>>>>
>>>>
>>>> mraible wrote:
>>>>>
>>>>> I'm trying to use PostConstruct with MyFaces 1.2.0 as described by
>>>>> Jacob Hookom:
>>>>>
>>>>> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>>>>>
>>>>> I added the javax.annotation dependency
to my pom.xml:
>>>>>
>>>>> <dependency>
>>>>>
<groupId>javax.annotation</groupId>
>>>>>
<artifactId>jsr250-api</artifactId>
>>>>>
<version>1.0</version>
>>>>> </dependency>
>>>>>
>>>>> My managed bean looks as follows:
>>>>>
>>>>> <managed-bean>
>>>>>
<managed-bean-name>userForm</managed-bean-name>
>>>>>
>>>>>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>>>>>
<managed-bean-scope>request</managed-bean-scope>
>>>>> <managed-property>
>>>>>
<property-name>id</property-name>
>>>>>
<value>#{param.id}</value>
>>>>> </managed-property>
>>>>> <managed-property>
>>>>>
<property-name>userManager</property-name>
>>>>>
<value>#</value>
>>>>> </managed-property>
>>>>> </managed-bean>
>>>>>
>>>>> If I fire up a debugger, my PostConstruct method gets hit, but none
>>>>> of my managed properties have been
initialized. Even if I pass in
>>>>> ?id=12.
>>>>>
>>>>> I'm using the latest release of the
maven-jetty-plugin (6.1H.5-beta).
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Matt
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a13353353
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-10-22 16:52:58 |
That would be fantastic. Thankyou
..kace
mraible wrote:
>
> I can probably whip up an example with AppFuse Light if
that works.
>
> Matt
>
>
> kace wrote:
>>
>> Hey Matt, are you in a position to provide a
working example for how you
>> got it to work on Glassfish so i can mess around
with it on tomcat/jetty
>> with appfuse in mind?
>>
>> Appreciate any help on this.
>> Thanks.
>>
>> ..kace
>>
>> mraible wrote:
>>>
>>> I never got this to work on Tomcat or Jetty, I
only got it to work on
>>> GlassFish. I suspect that changing web.xml to
use a Servlet 2.5 XSD
>>> might fix the problem.
>>>
>>> Matt
>>>
>>>
>>> kace wrote:
>>>>
>>>> Hi Matt,
>>>>
>>>> did you get this to work for you? Im using
appfuse 2 with myfaces 1.20
>>>> implementation. Do I have to switch to
Suns RI to use this?
>>>>
>>>> ..kace
>>>>
>>>> mraible wrote:
>>>>>
>>>>> Is there a working example that uses
PostConstruct I can look at?
>>>>> Google doesn't seem to help much on
this one. A bunch of folks saying
>>>>> it works, but no proof.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Matt
>>>>>
>>>>>
>>>>> mraible wrote:
>>>>>>
>>>>>> I'm trying to use PostConstruct with MyFaces 1.2.0 as described by
>>>>>> Jacob Hookom:
>>>>>>
>>>>>> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>>>>>>
>>>>>> I added the javax.annotation
dependency to my pom.xml:
>>>>>>
>>>>>> <dependency>
>>>>>>
<groupId>javax.annotation</groupId>
>>>>>>
<artifactId>jsr250-api</artifactId>
>>>>>>
<version>1.0</version>
>>>>>> </dependency>
>>>>>>
>>>>>> My managed bean looks as follows:
>>>>>>
>>>>>> <managed-bean>
>>>>>>
<managed-bean-name>userForm</managed-bean-name>
>>>>>>
>>>>>>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>>>>>>
<managed-bean-scope>request</managed-bean-scope>
>>>>>> <managed-property>
>>>>>>
<property-name>id</property-name>
>>>>>>
<value>#{param.id}</value>
>>>>>> </managed-property>
>>>>>> <managed-property>
>>>>>>
<property-name>userManager</property-name>
>>>>>>
<value>#</value>
>>>>>> </managed-property>
>>>>>> </managed-bean>
>>>>>>
>>>>>> If I fire up a debugger, my PostConstruct method gets hit, but none
>>>>>> of my managed properties have been
initialized. Even if I pass in
>>>>>> ?id=12.
>>>>>>
>>>>>> I'm using the latest release of the
maven-jetty-plugin (6.1H.5-beta).
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Matt
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a13353354
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-10-23 23:45:47 |
Download from http://static.raibledesigns.com/downloads/jsf-pos
tconstruct.zip
To use, install MySQL and Maven 2.
Set src/main/resources/jdbc.properties to match your MySQL
instance.
Start with "mvn jetty:run" in the
jsf-postconstruct directory.
I tried putting the contents of edit() into void init() and
it didn't work -
nor did it work when the method body was in edit(). The
tests don't pass, so
you might need to use -Dmaven.test.skip=true.
Matt
kace wrote:
>
> That would be fantastic. Thankyou
>
> ..kace
>
> mraible wrote:
>>
>> I can probably whip up an example with AppFuse
Light if that works.
>>
>> Matt
>>
>>
>> kace wrote:
>>>
>>> Hey Matt, are you in a position to provide a
working example for how you
>>> got it to work on Glassfish so i can mess
around with it on tomcat/jetty
>>> with appfuse in mind?
>>>
>>> Appreciate any help on this.
>>> Thanks.
>>>
>>> ..kace
>>>
>>> mraible wrote:
>>>>
>>>> I never got this to work on Tomcat or
Jetty, I only got it to work on
>>>> GlassFish. I suspect that changing web.xml
to use a Servlet 2.5 XSD
>>>> might fix the problem.
>>>>
>>>> Matt
>>>>
>>>>
>>>> kace wrote:
>>>>>
>>>>> Hi Matt,
>>>>>
>>>>> did you get this to work for you? Im
using appfuse 2 with myfaces 1.20
>>>>> implementation. Do I have to switch to
Suns RI to use this?
>>>>>
>>>>> ..kace
>>>>>
>>>>> mraible wrote:
>>>>>>
>>>>>> Is there a working example that
uses PostConstruct I can look at?
>>>>>> Google doesn't seem to help much on
this one. A bunch of folks saying
>>>>>> it works, but no proof.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Matt
>>>>>>
>>>>>>
>>>>>> mraible wrote:
>>>>>>>
>>>>>>> I'm trying to use PostConstruct with MyFaces 1.2.0 as described by
>>>>>>> Jacob Hookom:
>>>>>>>
>>>>>>> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>>>>>>>
>>>>>>> I added the javax.annotation
dependency to my pom.xml:
>>>>>>>
>>>>>>> <dependency>
>>>>>>>
<groupId>javax.annotation</groupId>
>>>>>>>
<artifactId>jsr250-api</artifactId>
>>>>>>>
<version>1.0</version>
>>>>>>> </dependency>
>>>>>>>
>>>>>>> My managed bean looks as
follows:
>>>>>>>
>>>>>>> <managed-bean>
>>>>>>>
<managed-bean-name>userForm</managed-bean-name>
>>>>>>>
>>>>>>>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>>>>>>>
<managed-bean-scope>request</managed-bean-scope>
>>>>>>>
<managed-property>
>>>>>>>
<property-name>id</property-name>
>>>>>>>
<value>#{param.id}</value>
>>>>>>>
</managed-property>
>>>>>>>
<managed-property>
>>>>>>>
<property-name>userManager</property-name>
>>>>>>>
<value>#</value>
>>>>>>>
</managed-property>
>>>>>>> </managed-bean>
>>>>>>>
>>>>>>> If I fire up a debugger, my
PostConstruct method gets hit, but none
>>>>>>> of my managed properties have
been initialized. Even if I pass in
>>>>>>> ?id=12.
>>>>>>>
>>>>>>> I'm using the latest release of
the maven-jetty-plugin
>>>>>>> (6.1H.5-beta).
>>>>>>>
>>>>>>> Any ideas?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Matt
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a13379031
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-10-24 07:42:33 |
Cheeers Mate.
mraible wrote:
>
> Download from
> http://static.raibledesigns.com/downloads/jsf-pos
tconstruct.zip
>
> To use, install MySQL and Maven 2.
>
> Set src/main/resources/jdbc.properties to match your
MySQL instance.
> Start with "mvn jetty:run" in the
jsf-postconstruct directory.
>
> I tried putting the contents of edit() into void init()
and it didn't work
> - nor did it work when the method body was in edit().
The tests don't
> pass, so you might need to use -Dmaven.test.skip=true.
>
> Matt
>
>
> kace wrote:
>>
>> That would be fantastic. Thankyou
>>
>> ..kace
>>
>> mraible wrote:
>>>
>>> I can probably whip up an example with AppFuse
Light if that works.
>>>
>>> Matt
>>>
>>>
>>> kace wrote:
>>>>
>>>> Hey Matt, are you in a position to provide
a working example for how
>>>> you got it to work on Glassfish so i can
mess around with it on
>>>> tomcat/jetty with appfuse in mind?
>>>>
>>>> Appreciate any help on this.
>>>> Thanks.
>>>>
>>>> ..kace
>>>>
>>>> mraible wrote:
>>>>>
>>>>> I never got this to work on Tomcat or
Jetty, I only got it to work on
>>>>> GlassFish. I suspect that changing
web.xml to use a Servlet 2.5 XSD
>>>>> might fix the problem.
>>>>>
>>>>> Matt
>>>>>
>>>>>
>>>>> kace wrote:
>>>>>>
>>>>>> Hi Matt,
>>>>>>
>>>>>> did you get this to work for you?
Im using appfuse 2 with myfaces
>>>>>> 1.20 implementation. Do I have to
switch to Suns RI to use this?
>>>>>>
>>>>>> ..kace
>>>>>>
>>>>>> mraible wrote:
>>>>>>>
>>>>>>> Is there a working example that
uses PostConstruct I can look at?
>>>>>>> Google doesn't seem to help
much on this one. A bunch of folks
>>>>>>> saying it works, but no proof.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Matt
>>>>>>>
>>>>>>>
>>>>>>> mraible wrote:
>>>>>>>>
>>>>>>>> I'm trying to use PostConstruct with MyFaces 1.2.0 as described by
>>>>>>>> Jacob Hookom:
>>>>>>>>
>>>>>>>> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>>>>>>>>
>>>>>>>> I added the
javax.annotation dependency to my pom.xml:
>>>>>>>>
>>>>>>>> <dependency>
>>>>>>>>
<groupId>javax.annotation</groupId>
>>>>>>>>
<artifactId>jsr250-api</artifactId>
>>>>>>>>
<version>1.0</version>
>>>>>>>> </dependency>
>>>>>>>>
>>>>>>>> My managed bean looks as
follows:
>>>>>>>>
>>>>>>>> <managed-bean>
>>>>>>>>
<managed-bean-name>userForm</managed-bean-name>
>>>>>>>>
>>>>>>>>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>>>>>>>>
<managed-bean-scope>request</managed-bean-scope>
>>>>>>>>
<managed-property>
>>>>>>>>
<property-name>id</property-name>
>>>>>>>>
<value>#{param.id}</value>
>>>>>>>>
</managed-property>
>>>>>>>>
<managed-property>
>>>>>>>>
<property-name>userManager</property-name>
>>>>>>>>
<value>#</value>
>>>>>>>>
</managed-property>
>>>>>>>> </managed-bean>
>>>>>>>>
>>>>>>>> If I fire up a debugger, my
PostConstruct method gets hit, but
>>>>>>>> none of my managed
properties have been initialized. Even if I pass
>>>>>>>> in ?id=12.
>>>>>>>>
>>>>>>>> I'm using the latest
release of the maven-jetty-plugin
>>>>>>>> (6.1H.5-beta).
>>>>>>>>
>>>>>>>> Any ideas?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Matt
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a13384520
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
| Re: @PostConstruct - managed properties
not set first |
  United States |
2007-10-24 10:43:52 |
Cheers Matt
mraible wrote:
>
> Download from
> http://static.raibledesigns.com/downloads/jsf-pos
tconstruct.zip
>
> To use, install MySQL and Maven 2.
>
> Set src/main/resources/jdbc.properties to match your
MySQL instance.
> Start with "mvn jetty:run" in the
jsf-postconstruct directory.
>
> I tried putting the contents of edit() into void init()
and it didn't work
> - nor did it work when the method body was in edit().
The tests don't
> pass, so you might need to use -Dmaven.test.skip=true.
>
> Matt
>
>
> kace wrote:
>>
>> That would be fantastic. Thankyou
>>
>> ..kace
>>
>> mraible wrote:
>>>
>>> I can probably whip up an example with AppFuse
Light if that works.
>>>
>>> Matt
>>>
>>>
>>> kace wrote:
>>>>
>>>> Hey Matt, are you in a position to provide
a working example for how
>>>> you got it to work on Glassfish so i can
mess around with it on
>>>> tomcat/jetty with appfuse in mind?
>>>>
>>>> Appreciate any help on this.
>>>> Thanks.
>>>>
>>>> ..kace
>>>>
>>>> mraible wrote:
>>>>>
>>>>> I never got this to work on Tomcat or
Jetty, I only got it to work on
>>>>> GlassFish. I suspect that changing
web.xml to use a Servlet 2.5 XSD
>>>>> might fix the problem.
>>>>>
>>>>> Matt
>>>>>
>>>>>
>>>>> kace wrote:
>>>>>>
>>>>>> Hi Matt,
>>>>>>
>>>>>> did you get this to work for you?
Im using appfuse 2 with myfaces
>>>>>> 1.20 implementation. Do I have to
switch to Suns RI to use this?
>>>>>>
>>>>>> ..kace
>>>>>>
>>>>>> mraible wrote:
>>>>>>>
>>>>>>> Is there a working example that
uses PostConstruct I can look at?
>>>>>>> Google doesn't seem to help
much on this one. A bunch of folks
>>>>>>> saying it works, but no proof.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Matt
>>>>>>>
>>>>>>>
>>>>>>> mraible wrote:
>>>>>>>>
>>>>>>>> I'm trying to use PostConstruct with MyFaces 1.2.0 as described by
>>>>>>>> Jacob Hookom:
>>>>>>>>
>>>>>>>> http://weblogs.java.net/blog/jhook/archiv
e/2007/05/jsf_12_ri_backi.html
>>>>>>>>
>>>>>>>> I added the
javax.annotation dependency to my pom.xml:
>>>>>>>>
>>>>>>>> <dependency>
>>>>>>>>
<groupId>javax.annotation</groupId>
>>>>>>>>
<artifactId>jsr250-api</artifactId>
>>>>>>>>
<version>1.0</version>
>>>>>>>> </dependency>
>>>>>>>>
>>>>>>>> My managed bean looks as
follows:
>>>>>>>>
>>>>>>>> <managed-bean>
>>>>>>>>
<managed-bean-name>userForm</managed-bean-name>
>>>>>>>>
>>>>>>>>
<managed-bean-class>org.appfuse.web.UserForm</manag
ed-bean-class>
>>>>>>>>
<managed-bean-scope>request</managed-bean-scope>
>>>>>>>>
<managed-property>
>>>>>>>>
<property-name>id</property-name>
>>>>>>>>
<value>#{param.id}</value>
>>>>>>>>
</managed-property>
>>>>>>>>
<managed-property>
>>>>>>>>
<property-name>userManager</property-name>
>>>>>>>>
<value>#</value>
>>>>>>>>
</managed-property>
>>>>>>>> </managed-bean>
>>>>>>>>
>>>>>>>> If I fire up a debugger, my
PostConstruct method gets hit, but
>>>>>>>> none of my managed
properties have been initialized. Even if I pass
>>>>>>>> in ?id=12.
>>>>>>>>
>>>>>>>> I'm using the latest
release of the maven-jetty-plugin
>>>>>>>> (6.1H.5-beta).
>>>>>>>>
>>>>>>>> Any ideas?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Matt
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nab
ble.com/%40PostConstruct---managed-properties-not-set-first-
tf4337121.html#a13384958
Sent from the MyFaces - Users mailing list archive at
Nabble.com.
|
|
[1-10]
|
|