Safari中的空JSF graphicImage显示问号

时间:2015-12-21 21:37:12

标签: java jsf primefaces safari

我有一些jsf代码,可以生成带有空图像的结果。在Windows中的Mozilla中执行相同的代码我只是没有图像。

这是实际生成此代码的代码:

<p:dataScroller id="timelineDatascroller"
                                value="#{searchController.commentModel}" var="comment"
                                scrollHeight="653" chunkSize="3" lazy="true">
                                <f:facet name="loader">
                                    <p:commandLink type="button" value="load more"
                                        icon="ui-icon-circle-triangle-s" />
                                </f:facet>
                                <p:panel>
                                    <h:panelGrid columns="1" style="width:100%"
                                        columnClasses="logo,detail">
                                        <h:panelGrid columns="2">
                                            <h:graphicImage height="40" width="40"
                                                value="imageservlet?id=#{comment.ownerProfile.photoId}" />
                                            <p:commandLink id="userNameToPreview" update="@all"
                                                action="#{searchController.searchUserByName(comment.ownerProfile.userName)}"
                                                style="font-weight:bold"
                                                rendered="#{comment.commentTp eq 'normalComment'}"
                                                value="#{comment.ownerProfile.userName}" />
                                            <h:outputText style="font-weight:bold"
                                                rendered="#{comment.commentTp eq 'sharedComment'}"
                                                value="#{comment.sharedOwnerAccount.userName} shared from #{comment.ownerProfile.userName}" />
                                        </h:panelGrid>
                                        <h:outputText value="#{comment.description}" />
                                        <p:media value="#{comment.youtubeURL}" width="425"
                                            height="344" player="flash"
                                            rendered="#{comment.youtubeURL != null}" />
                                        <h:graphicImage rendered="#{comment.uploadedPhotoId ne null}"
                                            height="300" width="300"
                                            value="imageservlet?id=#{comment.uploadedPhotoId}" />
                                        <p:gmap rendered="#{comment.commentMapModel ne null}"
                                            id="tabGmapId" center="41.381542, 2.122893" zoom="15"
                                            type="HYBRID" model="#{comment.commentMapModel}"
                                            style="width:100%;height:400px" />

                                        <p:row>
                                            <p:commandLink title="View who liked" value="Liked By"
                                                style="color:blue"
                                                oncomplete="PF('viewlikesDlgWidget').show()"
                                                actionListener="#{searchController.buildLikes(comment)}"
                                                update=":viewLikesFrmId" />&nbsp;
                                            <p:commandLink value="like it" style="color:blue;"
                                                actionListener="#{profileController.like(comment)}"
                                                update=":commentForm" />&nbsp;
                                            <p:commandLink value="delete" style="color:blue"
                                                action="#{profileController.deleteComment(comment, true)}"
                                                disabled="#{!(comment.ownerProfile.id eq user.account.profile.id or searchController.resultAccount.id eq user.account.id)}"
                                                update=":commentForm" />&nbsp;
                                            <p:commandLink value="edit" style="color:blue"
                                                actionListener="#{profileController.initEditComment(comment)}"
                                                disabled="#{!(comment.ownerProfile.id eq user.account.profile.id or searchController.resultAccount.id eq user.account.id)}"
                                                oncomplete="PF('EditCommentDlgWidget').show();" />&nbsp;
                                            <p:commandLink value="respond" style="color:blue"
                                                actionListener="#{searchController.buildChildrenComments(comment)}"
                                                update=":viewCommentsFrmId"
                                                oncomplete="PF('viewCommentsDlgWidget').show();" />&nbsp;
                                                <p:commandLink value="share" style="color:blue"
                                                actionListener="#{profileController.shareComment(comment)}" />
                                        </p:row>
                                    </h:panelGrid>
                                </p:panel>
                                <br />
                                <br />

                                <p:tooltip id="previewToolTip" for="userNameToPreview">
                                    <p:panelGrid id="previewPanelId" columns="2">
                                        <f:facet name="header">
                                            <p:panelGrid columns="">
                                                <h:graphicImage
                                                    value="imageservlet?id=#{comment.ownerProfile.photo.id}" />
                                            </p:panelGrid>
                                        </f:facet>

                                        <h:outputText value="Name:" />
                                        <h:outputText value="#{comment.ownerProfile.userName}" />

                                        <h:outputText value="Description:" />
                                        <h:outputText value="#{comment.ownerProfile.description}" />

                                        <h:outputText value="Age:" />
                                        <h:outputText value="#{comment.ownerProfile.age}" />
                                    </p:panelGrid>
                                </p:tooltip>
                            </p:dataScroller>

问题出在这个位置:

 <h:graphicImage rendered="#{comment.uploadedPhotoId ne null}"
                                        height="300" width="300"
                                        value="imageservlet?id=#{comment.uploadedPhotoId}" />

enter image description here

0 个答案:

没有答案