The easiest way to reproduce this is to add new column in
documents_table.xhtml :

      <!--  Actions -->
      <h:column>
        <f:facet name="header">
          <h:panelGroup>
            <h:outputText
value="#{messages['label.content.header.actions']}" />
          </h:panelGroup>
        </f:facet>

        <!--  here is the problem: -->
        <h:outputLink rendered="#{row.data.downloadable}"
          value="#{nxd:fileUrl('downloadFile', row.data, 'file:content',
row.data.file.filename)}">
          <nxu:graphicImage
            value="/icons/download.png"
alt="#{messages['label.content.actions.download']}"
title="#{messages['label.content.actions.download']}"
            rendered="#{row.data.file.filename != null}">
          </nxu:graphicImage>
        </h:outputLink>
      </h:column>

If values are stored as longs, may be call to
#{row.data.downloadable}
is on lazy loaded document or something like that?

10x in advance

On Tue, Mar 3, 2009 at 1:56 PM, Florent Guillaume <[email protected]> wrote:

> On 26 Feb 2009, at 14:29, [email protected] wrote:
>
>> When calling method DocumentModelImpl#isDownloadable() for document with
>> facet "Downloadable" I always get:
>> java.lang.ClassCastException: java.lang.Integer on cast here:
>>           Long size = (Long) getProperty("common", "size");
>>
>> This is expected because element size of schema "common" is defined as:
>>        <xs:element name="size" type="xs:integer"/>
>>
>
> Actually this is not expected because Nuxeo only stores Longs, even if the
> schema says xs:integer. Properties are supposed to return Long values, I
> don't understand how an Integer got there. Is it a document that's just been
> created but not yet saved?
>
>  I think this is bug. Can you fix it?
>>
>
> It's a bug but we need more details on how to reproduce it to be able to
> fix it.
>
> Florent
>
> --
> Florent Guillaume, Head of R&D, Nuxeo
> Open Source, Java EE based, Enterprise Content Management (ECM)
> http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87
>
>
> _______________________________________________
> ECM mailing list
> [email protected]
> http://lists.nuxeo.com/mailman/listinfo/ecm
>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to