You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Claude Dubois <cd...@gmail.com> on 2010/04/28 10:51:04 UTC

Re: Grid / sortable additionnal column

Hello,

I am trying to add a sortable column like you, but when I try to implement
PropertyConduit, as you explained, it doesn't work, and I have a
java.lang.NullPointerException.

Could you explain how you implement your class, and what problems you got
(if you got someones).

Thank you


Francois Malet wrote:
> 
> Perfect!
> Here is my PropertyConduit implementation
> 
> public class DownloadPropertyConduit implements PropertyConduit {
> 
>     public <T extends Annotation> T getAnnotation(Class<T>
> annotationClass) {
>         return null;
>     }
> 
>     /**
>      * @see org.apache.tapestry5.PropertyConduit#get(java.lang.Object)
>      */
>     public Object get(Object instance) {
>         Upload upload = (Upload) instance;
>         return upload.getName();
>     }
> 
>     @SuppressWarnings("unchecked")
>     public Class getPropertyType() {
>         return String.class;
>     }
> 
>     public void set(Object instance, Object value) {
>         Upload upload = (Upload) instance;
>         upload.setName((String) value);
>     }
> 
> 
> }
> 

-- 
View this message in context: http://old.nabble.com/Grid---sortable-additionnal-column-tp24288365p28386255.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org