0

I'm using a p:selectOneMenu to render a list of values. When the user click in the p:selectOneMenu the list of values is being painted below a 'html object tag' that is used to show a PDF. In the image I've attached is possible to see what is my problem.

Here is the code:

   <p:layout style="width:100%; height:100%; min-height: 600px;" id="layoutShowScannedDocs" >
        <p:layoutUnit position="center" >                                   
            <p:outputPanel  id="opScannedDoc" style="width: 100%; height: 100%; margin: 0px; padding:0px; z-index:20;"> 
              <object id="iframescanneddoc" type="application/pdf" width="100%" data="...url.." />
            </p:outputPanel>
        </p:layoutUnit>
        <p:layoutUnit position="south" size="60" >
            <div style="width: 100%; text-align: center;">
              <p:selectOneMenu id="listOfValues" widgetVar="listOfValues"  value="#{MyBean.selectedValue}" style="float:center;" >
                 <p:ajax event="change" />                                                                          
                <f:selectItem itemLabel="#{msgs.field_estadoelaboracion_original}" itemValue="1" />
                <f:selectItem itemLabel="#{msgs.field_estadoelaboracion_cambioformato}" itemValue="2" />
                <f:selectItem itemLabel="#{msgs.field_estadoelaboracion_docpapel}" itemValue="3" />
                <f:selectItem itemLabel="#{msgs.field_estadoelaboracion_parcial}" itemValue="4" />
                <f:selectItem itemLabel="#{msgs.field_estadoelaboracion_otros}" itemValue="5" />                                        
            </p:selectOneMenu>          
           </div>
        </p:layoutUnit>
   </p:layout>          

What could I do to see the list of values of the p:selectOneMenu over the 'html object tag'?

Thanks

enter image description here

Eduardo
  • 1,169
  • 5
  • 21
  • 56
  • maybe play with the z-index (css).. – Raphael Roth Mar 02 '16 at 17:15
  • I've tried it but it doesn't work. Thanks – Eduardo Mar 03 '16 at 07:37
  • make your question more general. It is all client-side. The object tag is one... Does it work with a non-primefaces selectone? if not it is plain html and object tag related. Tagging you question like that might get you better and quicker help – Kukeltje Mar 03 '16 at 08:24
  • I'm sorry if it is not properly tagged. I've tried to be concise when describing my problem, because I thought it was better. Anyway, I'm going to update my question with more info. – Eduardo Mar 04 '16 at 10:03
  • You posted **server side** xhtml while the basic problem is the client-side html (as mentioned in my comment). Downvote from me now – Kukeltje Mar 06 '16 at 22:37
  • I don't understand at all why downvote. You are right is a client-side problem but the selectOneMenu tag is not rendered as a normal html select, and I thought that perhaps someone who have had a similar problem using a primefaces selectOneMenu could help me. Anyway, I'm going to think how to rewrite and retag my question – Eduardo Mar 07 '16 at 08:10
  • I've resolved my problem using h:selectOneMenu instead of p:selectOneMenu. I know that this is a workaround and not a real solution, but this is better than nothing. I've seen another possible solution, but it not a straightforward solution so I will try it when I have free time. The solution is playing with z-index and placing a iframe between the object tag and the div with the list of values. Here it is possible to read the solution: http://stackoverflow.com/questions/593176/div-layer-on-top-of-pdf – Eduardo Mar 07 '16 at 17:09
  • Try adding an `appendTo="@this"` on the `p:selectOneMenu`. See also http://stackoverflow.com/questions/15286454/pselectonemenu-dropdown-not-attached-to-the-component-inside-a-dialog – Kukeltje Mar 07 '16 at 17:49
  • Thanks for your reply! I tried it some time ago but it doesn't work. Adding an appendTo="@this" on the p:selectOneMenu place the div with the list of values in other place of the html, but is still below the object tag (Internet Explorer). So I'm afraid that the solution is what I suggested in my last comment. – Eduardo Mar 08 '16 at 12:28

0 Answers0