Hi Claudio,
Please see comments inline..
Claudio Miranda wrote:
Hi Ken, thanks for the reply.
I suspect that issue is related to "
java.util.MissingResourceException: Can't find bundle for base name
LocalStrings, locale en_US " I was having yesterday.
I have testes the workaround, but it didn't work. Look at what I have done:
$ pwd
/opt/glassfish-v3/glassfish/bin
$ ./asadmin undeploy admingui
$ kill PID (glassfish process)
$ rm -f ../modules/console-certmanager-1.0-SNAPSHOT.jar
why do you remove this plugin module ? You definitely need to put it
under glassfish/modules directory so that Admin Console can detect
that.
$ ./startserv
I have moved 2 JSF and 2 classes to admingui/core structure,
including src/main/resources/META-INF/admingui/console-config.xml
You only need to move .java/.class to admingui/core. You can leave
other resources eg, .jsf, .jpg , Strings.properties etc in your plugin
module.
console-config.xml HAS to be in your plugin-module, eg.
certmanager/src/main/rsources/META-INF/admingui/console-config.xml,
so that Admin Console can detect it.
$ mvn clean
$ mvn -U install
$ ./asadmin deploy path/to/v3/admingui/war/target/admingui.war
Looking at server.log, looks like the certmanager-plugin is not
being loaded. It doesn't show up at admin console.
For the MissingResourceException I will write messages directly at
Strings.properties from admingui/core, this will solve this issue.
But the other one, I have no clue. I will keep trying, but if you
have another tip, please help me.
So, i believe the only thing you need to change is move the java code
to under admingui/core/src/main/java until we have a fix, hopefully
this week.
do 'mvn clean install' in both your plugin module and core module
copy your console-certmanager-1.0-SNAPSHOT.jar to glassfish/modules
directory
restart server
and you should see your plugin.
As for the MissingResourceException, you can have String.Properties
in your module, but you need to specify that according to your
console-config id.
Here is an example assuming your console-config id is "
certmanager"
-your Strings.properties is placed as :
certmanager-module/src/main/resources/
myStrings.properties
- in your jsf file, you do:
setResourceBundle(key="
cert" bundle="
certmanager/
myStrings");
and in it there is
pageTitle=Cert Manager Module
you then can specify the string in your resource as
<h:title id="title" title="$resource{
cert.
pageTitle}" />
you should see:
Cert Manager Module as your page title.
Hope this help.
Anissa.
Thanks
Claudio Miranda
On Mon, Apr 7, 2008 at 5:10 PM, Ken Paulsen <Ken.Paulsen@sun.com> wrote:
Hi Claudio!
Just saw your email, sorry I missed it until now.
You are doing the right thing... and this should work. :) However, you've
caught up to where we are in our plugin support. The problem is that we
have some classloader issues with finding / invoking Java code in plugin
modules. I got as far as correctly registering and instantiating the
handler classes, however, the handler is unable to resolve dependencies
correctly inside our web application (i.e. HandlerContext). So I have not
yet committed my changes. We're going to make more of the admin gui into
HK2 modules so they can be resolved by other modules (i.e. plugin modules).
I am waiting on support for Jerome for this, which I think will come very
soon... I will keep you posted.
In the meantime so that you can continue your development / testing, you
can move your files into the admingui/core/src/main/java/... area. The
@Handler files in this directory will work.
I hope this helps!
Ken
P.S. Anything relating to Handlers / .jsf files / etc, feel free to copy
the dev@jsftemplating email alias... it gets my attention faster. ;)