alternative to <p: resources>?

UI Components for JSF
Post Reply
chaseven
Posts: 16
Joined: 13 Jan 2011, 12:49

13 Jan 2011, 14:18

Hello

I'm trying to update my page a component of the menu

Code: Select all

        <p:outputPanel id="content"> 
              <p:messages globalOnly="true" id="global_messages"/>
              <ui:include src="#{menuBean.currentPage}" />
        </p:outputPanel>
and I call the bean menu to change the value of CurrentPage

Code: Select all

        <p:menubar zindex="100" appendToBody="false" >  
                <p:submenu label="#{bundle.employee}" >  
                        <p:menuitem value="#{bundle.emplyeeRegiter}"  action="#{menuBean.employeeRegister}" ajax="true" update="content" />
the bean menu changes the variable value and then updates the CurrentPage "p: outputPanel id ="content""

so far so good with no errors ... but when my piece is loaded, it does not load javascript

and this piece I use the tag p: password (using javascript) that ends up causing me a javascript error "Uncaught TypeError: undefined is not a function"

a way to avoid this mistake would be putting a <p:password> with dysplay: none, in my template
(but this is a lot of appeal .. lol)

I see the tag <p:resources/> solve this problem but it is Deprecated

Is there any other way to solve this problem?


Any help is welcome

Thx

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

14 Jan 2011, 11:48

You can use standard h:outputStylesheet and h:outputScript to add the resources you need.

chaseven
Posts: 16
Joined: 13 Jan 2011, 12:49

14 Jan 2011, 15:53

thx optimus.prime

but for every component I need to do this "import " (h: h and outputStylesheet: outputScript)

In the documentation there is no description to report to "import" that each component needs

Is there any other place that contains this list or I have to include all components on a page and copy each one?

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

14 Jan 2011, 16:31

You might try to use Firebug to determine which resources are needed.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests