pf showcase datatable example "Expandable Rows" problems...

UI Components for JSF
Post Reply
jan.marti
Posts: 3
Joined: 08 Feb 2011, 12:38

08 Feb 2011, 12:46

hi at all,

i made a copy paste of this code here: http://www.primefaces.org/showcase/ui/d ... leRows.jsf

but it does not work; the only thing i get is this:

Image


source code:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml">
    
<head>
<title>Aastra Template...</title>
</head>
<body><script type="text/javascript">var _AdfWindowOpenError='In Ihrem Browser wurde ein Blocker für Popup-Fenster ermittelt. Popup Blocker stören die Ausführung dieser Anwendung. Deaktivieren Sie den Popup Blocker, oder lassen Sie Popups von dieser Site zu.';</script><script type="text/javascript" src="/SLS/adf/jsLibs/DebugCommon2_0_0_beta_1.js"></script><form id="j_id1427926268_551c6ce6" name="j_id1427926268_551c6ce6" method="POST" onkeypress="return _submitOnEnter(event,'j_id1427926268_551c6ce6');" action="/SLS/test/DataTableJSF.xhtml"><div id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8" class="ui-datatable ui-widget"><div class="ui-datatable-header ui-widget-header ui-corner-tl ui-corner-tr">
             Expand rows to see detailed information</div><table><thead><tr><th id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8:j_id1427926268_551c6c94" class="ui-state-default" style="width:16px"></th><th id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8:j_id1427926268_551c6c73" class="ui-state-default">
                    Model</th><th id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8:j_id1427926268_551c6c2c" class="ui-state-default">
                    Year</th></tr></thead><tbody id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_data" class="ui-datatable-data"><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_0" class="ui-widget-content ui-datatable-even"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>52157450</td><td>1997</td></tr><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_1" class="ui-widget-content ui-datatable-odd"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>c6549220</td><td>1986</td></tr><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_2" class="ui-widget-content ui-datatable-even"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>fabed986</td><td>1985</td></tr><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_3" class="ui-widget-content ui-datatable-odd"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>5015360b</td><td>1989</td></tr><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_4" class="ui-widget-content ui-datatable-even"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>9f542e65</td><td>1971</td></tr><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_5" class="ui-widget-content ui-datatable-odd"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>4ad7c620</td><td>1984</td></tr><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_6" class="ui-widget-content ui-datatable-even"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>371fdea8</td><td>2000</td></tr><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_7" class="ui-widget-content ui-datatable-odd"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>4e1d1283</td><td>1999</td></tr><tr id="j_id1427926268_551c6ce6:j_id1427926268_551c6cc8_row_8" class="ui-widget-content ui-datatable-even"><td style="width:16px"><span class="ui-row-toggler ui-icon ui-icon-circle-triangle-e"></span></td><td>94c6b319</td><td>1985</td></tr></tbody></table></div><script type="text/javascript">widget_j_id1427926268_551c6ce6_j_id1427926268_551c6cc8 = new PrimeFaces.widget.DataTable('j_id1427926268_551c6ce6:j_id1427926268_551c6cc8',{url:'/SLS/test/DataTableJSF.xhtml',formId:'j_id1427926268_551c6ce6',expansion:true});</script><input type="hidden" name="org.apache.myfaces.trinidad.faces.FORM" value="j_id1427926268_551c6ce6"><input type="hidden" name="_noJavaScript" value="false"><span id="tr_j_id1427926268_551c6ce6_Postscript"><input type="hidden" name="javax.faces.ViewState" value="!znt85d0gr"><script type="text/javascript">function _j_id1427926268_551c6ce6Validator(f,s){return _validateInline(f,s);}var j_id1427926268_551c6ce6_SF={};</script></span><script type="text/javascript">_submitFormCheck();</script></form>
 
<div id="javax_faces_developmentstage_messages"></div></body>
</html>

thanks & regards, jan

jan.marti
Posts: 3
Joined: 08 Feb 2011, 12:38

08 Feb 2011, 14:42

IE tells me: "Primefaces in undefined"...

i declared <p:resources />...

what's the problem???

regards, jan marti

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

08 Feb 2011, 15:31

Hi,

do you have h:head in your xhtml?

Yigit

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

08 Feb 2011, 16:17

Hi Jan,

You don't need <p:resources />. You should have h:head and h:body.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

jan.marti
Posts: 3
Joined: 08 Feb 2011, 12:38

08 Feb 2011, 16:47

hi at all,

now it's solved, thank you very much!

but now, i have a new problem:

i use a "normal" HttpServlet as a controller, and i use request dispatching from servlet -> facelet

when i use a jsf form tag ("h:form"), the form action in the built output html (broser-side) will be something like /SLS/WEB-INF/pres/jsf/MyFacelet.xhtml

this it NOT the entry point of the web application; the servlet is it... it should be something like this: /SLS/MyServlet

the request dispatch "source" should be in the auto-generated form tag, but not the request dispatch "target"...

does somebody know how this works? i think a wrapper class/tag for the h:form-element is not the best solution...:-(


best regards, jan marti

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests