dev@glassfish.java.net

Re: Using HK2 _at_Configured... how can I read "body content"?

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Mon, 29 Jun 2009 14:42:20 -0500

Hi, Ken.

For an example, look at web/gui-plugin-common EnvEntry. It has
subelements EnvEntryName, EnvEntryType, EnvEntryValue and Description
all of which expose their values as the text body.

Basically,

@Configured
interface KensElement {

        @Element
        String getContent();
        void setContent(String content);
}

should do it.

- Tim

Ken Paulsen wrote:
>
> Can someone point me in the right direction to read body content using
> HK2's @Configured/_at_Attribute/etc infrastructure? Or is this not
> possible?
>
> Specifically, I want to read "Hello World!" from something like:
>
> <Content type="html">
> <![CDATA[
> Hello, world!
> ]]>
> </Content>
>
> Thanks in advance!
>
> Ken
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>