01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: BeanHandlerXhtml.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.template;
09:
10: import com.uwyn.rife.cmf.MimeType;
11: import com.uwyn.rife.site.FormBuilder;
12: import com.uwyn.rife.site.FormBuilderXhtml;
13: import com.uwyn.rife.tools.BeanUtils;
14: import com.uwyn.rife.tools.exceptions.BeanUtilsException;
15: import java.util.Map;
16:
17: public class BeanHandlerXhtml extends AbstractBeanHandler {
18: private FormBuilder mFormBuilder = new FormBuilderXhtml();
19:
20: BeanHandlerXhtml() {
21: }
22:
23: public static BeanHandlerXhtml getInstance() {
24: return BeanHandlerXhtmlSingleton.INSTANCE;
25: }
26:
27: public MimeType getMimeType() {
28: return MimeType.APPLICATION_XHTML;
29: }
30:
31: public FormBuilder getFormBuilder() {
32: return mFormBuilder;
33: }
34:
35: protected Map<String, Object> getPropertyValues(Template template,
36: Object bean, String prefix) throws BeanUtilsException {
37: return BeanUtils.getPropertyValues(bean, null, null, prefix);
38: }
39: }
|