Inline LightBox Contained in <h:form> Not Working

UI Components for JSF
Post Reply
mmatulevich
Posts: 2
Joined: 04 Mar 2010, 00:40

04 Mar 2010, 02:38

When I create an inline LightBox component (1.0.0) inside an <h:form> tag, I get a JavaScript error (see error message below):

Code: Select all

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.4; SLCC1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Timestamp: Thu, 4 Mar 2010 00:25:32 UTC


Message: Exception thrown and not caught
Line: 82
Char: 75
Code: 0
URI: http://localhost:8080/Test/primefaces_resource/1.0.0/jquery/jquery.js


Message: Exception thrown and not caught
Line: 82
Char: 75
Code: 0
URI: http://localhost:8080/Test/primefaces_resource/1.0.0/jquery/jquery.js

An iframe version seems to work fine, but I cannot seem to get the inline version to display correctly (see code below). Any ideas on what I may be doing wrong or how to fix this problem? Any suggestions would be greatly appreciated. Thank you.

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

  <head>
    <p:resources />
    <title>Prime Faces Test</title>
  </head>
  <body>
    <h:form id="lightBoxForm">
      <p:lightBox width="50%" height="50%">
        <h:outputLink value="#" title="LightBox Test" >
          <h:outputText value="LightBox Test"/>
        </h:outputLink>
        <f:facet name="inline">
          <h:panelGrid columns="1">
            <h:outputText id="output" style="color:#FFFFFF" value="Test the inline LightBox"></h:outputText>
          </h:panelGrid>
        </f:facet>
      </p:lightBox>
      <p:lightBox iframe="true" width="80%" height="80%">
        <h:outputLink value="http://www.flowserve.com" title="Flowserve HomePage">
          <h:outputText value="Flowserve HomePage"/>
        </h:outputLink>
      </p:lightBox>
    </h:form>
  </body>
</html>

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Mar 2010, 15:04

I'm guessing lightbox is not handling prependedIds.

Can you try with setting prependId to false in your form.

Code: Select all

 <h:form prependId="false">

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests