Re: Container types with interfaces
Alex Rau <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Ok, so according to your reply I consider the generics interface inside
the container actually should not be (a known) problem.
Thanks for your help.
Regards Alex
-------------------
If getNextedProp() returns null, then foo.nestedProp?exists will
indeed return false.
Attila.
On 2009.02.10., at 0:59, Alex Rau wrote:
> Hi all,
>
> I've a question regarding supported types in freemarker. Is it
> possible
> to access a container on a class Foo as defined below in a freemarker
> template ?
>
> public class Foo {
>
> private Map<String, IType<?>> nestedProp;
>
> public .. getNestedProp() {..}
>
> public setNestedProp(..) {..}
>
> }
>
> public interface IType<T> {
>
> public String getIdentifier();
>
> public String getDescription();
>
> public T getValues();
>
> }
>
> public class EnumType implements IType<Set<String>> {..}
>
> public class IntegerType implements IType<Set<Integer>> {..}
>
>
>
> When I try to access the property in a template by checking with
> foo.nestedProp?exists the latter always returns false.
>
> I had a look on the docs and especially the beanwrapper description
> but
> could not find more infos about my specific question.
>
> Thanks and Regards,
>
> Alex
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com