0

i have a datatable in with filtering, sorting n pagination functionalities. all was working fine until i apllied a readymade design template to my application. the custom readymade template is overiding the default primefaces theme i guess. so datatable functionalities are not working... now i get a plain datatable with no theme... i want to apply the custom template just to enhance my app design but i also want to keep the primefaces component design as it is with no change. what should i do? pls suggest a solution...

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
   <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/> 
<title>Scrip Master | Dashboard Admin</title> 

    <h:outputStylesheet library="css" name="reset.css"/>
    <h:outputStylesheet library="css" name="text.css"/>
    <h:outputStylesheet library="css" name="layout.css"/>
    <h:outputStylesheet library="css" name="jquery-ui-1.css"/>
    <h:outputStylesheet library="css" name="jquery.css"/>
    <h:outputStylesheet library="css" name="custom.css"/>

<link rel="stylesheet" href="css/layout.css" type="text/css" media="screen" title="no title"/>

<h:outputScript library="js" name="jquery-1.js"/>
<h:outputScript library="js" name="excanvas.js"/>
<h:outputScript library="js" name="facebox.js"/>
<h:outputScript library="js" name="jquery-ui-1.js"/>
<h:outputScript library="js" name="jquery_002.js"/>
<h:outputScript library="js" name="jquery_003.js"/>
<h:outputScript library="js" name="jquery_005.js"/>
<h:outputScript library="js" name="jquery_004.js"/>
<h:outputScript library="js" name="jquery.js"/>
<h:outputScript library="js" name="widgets.js"/>
<h:outputScript library="js" name="dashboard.js"/>

</h:head>
z22
  • 10,013
  • 17
  • 70
  • 126
  • all that you added was a css? or some js also included? also look in your firebug console for some errors also you might wanna use to make sure that your custom stuff will be loaded first... (http://stackoverflow.com/a/10205451/617373) – Daniel May 17 '12 at 06:24
  • thanks for ur help, the css is working fine now but i guess there's some problem with jquery, still the datatable is not working... have a look at my code below and suggest some solution, what am i missing? – z22 May 17 '12 at 07:22

1 Answers1

0

all that you added was a css? or some js also included? also look in your firebug console for some errors also you might wanna use

<f:facet name="first"> 
   <h:outputScript ..../>
   <h:outputStylesheet.../> 
</f:facet> 

to make sure that your custom stuff will be loaded first...

also look here taking care of the order that js files being loaded

are you by any chance trying to include your own jquery library ? or any other jquery plugin ?

EDIT

seems like a jquery conflict to me

remove the include of additional jquery library js file

and instead add the following

<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<h:outputScript target="head">
    $ = jQuery;
</h:outputScript>

if wont work try wrapping it with <f:facet name="first"> ... </f:facet>

Community
  • 1
  • 1
Daniel
  • 36,833
  • 10
  • 119
  • 200
  • please re edit you original question by appending the code in the comment , so it will be readable... (also , if you find some other question helpful / useful to you you can +1 it :) – Daniel May 17 '12 at 07:43
  • what name should i give to the ...? error: name attribute is missing(for h:outputScrip tag) – z22 May 17 '12 at 07:56
  • weird... never had this error... is it in your eclipse/netbeans ? or your web server says that ? – Daniel May 17 '12 at 08:01
  • i also tried with ...still not working...i also removed all the custom jqueries, still the same, the datatable is not working – z22 May 17 '12 at 08:08
  • thanks mate for your help...actually i made a silly mistake - i forgot to give my its id and was trying to access the missing id... – z22 May 17 '12 at 12:21