strange issue on certain environment (p:tabView)

UI Components for JSF
Post Reply
screemer
Posts: 5
Joined: 05 Jan 2012, 17:14

21 Oct 2016, 13:15

Hi, I have very strange issue. I am using p:tabView component with some tabs in my application, but same source code (compiled) gives me different output when deployed on different environment. In general in source code I have something like this (example)

Code: Select all

<f:subview id="tabs">
  <p:tabView id="technologyTabView">
    <p:tab id="someTab>
       <h:form id="someFormId">
          <h:inputText id="textInput"/>
       </h:form>
    </p:tab>
  </p:tabView>
</f:subview>
... etc

When I deploy on Windows 10 development machine (Tomcat 7.0.70, JDK 8u111, Mojarra 2.2.13, Primefaces 6.0) it is properly translated to something like this

Code: Select all

<div id="tabs:technologyTabView" > // this is ui-tabview etc - 
   ..
   <form id="tabs:technologyTabView:someFormId">
      <input type="text" id="tabs:technologyTabView:someFormId:textInput"/>
   </form>
<div>
etc.

But when I deploy on Ubuntu Linux 14.04 LTS(production) using exact same versions of everything the id attribute is ignored and the id in generated html of tabView <div> is generated dynamically by Mojarra, so when I check page source html it looks like :

Code: Select all

<div id="tabs:j_idt2636" > // this is ui-tabview etc - 
   ..
   <form id="tabs:j_idt2636:someFormId">
      <input type="text" id="tabs:j_idt2636:someFormId:textInput"/>
   </form>
<div>
Do you know what may be the reason of this issue ? And help would be a big help.
Last edited by screemer on 21 Oct 2016, 22:49, edited 1 time in total.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

21 Oct 2016, 13:25

don't think that "tabs:technologyTabView" is a valid id.
":" is used by JSF to split naming containers/ids, so i wouldn't use it in a id.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

screemer
Posts: 5
Joined: 05 Jan 2012, 17:14

21 Oct 2016, 22:38

Sorry ... my fault ... of course it is not tabs:technologyTabView. I just typed it wrong here on the forum ... thank you for spotting that. I will edit original post .

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 44 guests