KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > util > ServerObjectIDEditor


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.util;
10
11 import org.jboss.portal.common.value.ConversionException;
12 import org.jboss.util.propertyeditor.TextPropertyEditorSupport;
13
14 /**
15  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
16  * @version $Revision: 1.1.1.1 $
17  */

18 public class ServerObjectIDEditor extends TextPropertyEditorSupport
19 {
20
21    public Object JavaDoc getValue()
22    {
23       try
24       {
25          String JavaDoc text = getAsText();
26          return ServerObjectIDConverter.instance.toObject(text);
27       }
28       catch (ConversionException e)
29       {
30          throw new RuntimeException JavaDoc(e);
31       }
32    }
33 }
34
Popular Tags