質問編集履歴
3
タイトル修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
<ui:composition>を使うとメソッドが実行されない
|
1
|
+
<ui:composition>を使うとその中にあるメソッドが実行されない
|
body
CHANGED
File without changes
|
2
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -49,4 +49,17 @@
|
|
49
49
|
|
50
50
|
</h:body>
|
51
51
|
|
52
|
+
```
|
53
|
+
|
54
|
+
こちらがテンプレートです
|
55
|
+
```xhtml
|
56
|
+
<h:body>
|
57
|
+
<ui:composition template="/templates/topbar-template.xhtml">
|
58
|
+
<ui:define name="content">
|
59
|
+
<ui:include src="find-content.xhtml"/>
|
60
|
+
</ui:define>
|
61
|
+
</ui:composition>
|
62
|
+
|
63
|
+
</h:body>
|
64
|
+
|
52
65
|
```
|
1
情報追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,1 +1,52 @@
|
|
1
|
-
タイトルの通りです。<ui:composition>が使えないとテンプレート機能が使えないので困っています。しかし使うとメソッドが動かないのでどうしたらいいのかわかりません。<h:form>を使う必要があるのですが[この回答](http://stackoverflow.com/questions/2118656/commandbutton-commandlink-ajax-action-listener-method-not-invoked-or-input-value/2120183#2120183)の一番上の1番目の箇所をを参考に<h:form>内に<ui:composition>を置いたのですが
|
1
|
+
タイトルの通りです。<ui:composition>が使えないとテンプレート機能が使えないので困っています。しかし使うとメソッドが動かないのでどうしたらいいのかわかりません。<h:form>を使う必要があるのですが[この回答](http://stackoverflow.com/questions/2118656/commandbutton-commandlink-ajax-action-listener-method-not-invoked-or-input-value/2120183#2120183)の一番上の1番目の箇所をを参考に<h:form>内に<ui:composition>を置いたのですが解決しませんでした。
|
2
|
+
下記の<ui:composition>のコメントアウトを外すとメソッドが動かなくなってしまいます。
|
3
|
+
|
4
|
+
```xhtml
|
5
|
+
|
6
|
+
<h:body>
|
7
|
+
<!--<ui:composition>-->
|
8
|
+
|
9
|
+
<h:form>
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
<link rel="stylesheet" type="text/css" href="resources/css/find.css" />
|
15
|
+
<h:outputStylesheet library="css" name="find.css" />
|
16
|
+
|
17
|
+
<br/>
|
18
|
+
<br/>
|
19
|
+
|
20
|
+
<p:dataTable id="examplej" class="table couple-table"
|
21
|
+
var="info" value="#{bb.coupleList}" widgetVar="couple" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
22
|
+
rowsPerPageTemplate="5,10,15" paginator="true" emptyMessage="まだ登録している人はいません">
|
23
|
+
<f:facet name="header">
|
24
|
+
<!--<p:outputPanel>-->
|
25
|
+
<h:outputText value="地域で検索" />
|
26
|
+
|
27
|
+
|
28
|
+
<p:inputText id="search" value="#{bb.search}" style="width:150px" p:placeholder="例:世田谷区"/> <br/>
|
29
|
+
<br/>
|
30
|
+
<h:commandLink type="submit" value="地域で検索" action="#{bb.filterTable()}" class="Button"/>
|
31
|
+
|
32
|
+
<!--</p:outputPanel>-->
|
33
|
+
|
34
|
+
</f:facet>
|
35
|
+
<p:ajax event="rowSelect" listener="#{bb.detail(info)}"
|
36
|
+
/>
|
37
|
+
|
38
|
+
<p:column class="column-couple" >
|
39
|
+
<p:graphicImage value="#{bb.pic}" >
|
40
|
+
<f:param name="id" value="#{info.id}"/>
|
41
|
+
</p:graphicImage>
|
42
|
+
</p:column>
|
43
|
+
|
44
|
+
|
45
|
+
</p:dataTable>
|
46
|
+
|
47
|
+
</h:form>
|
48
|
+
<!--</ui:composition>-->
|
49
|
+
|
50
|
+
</h:body>
|
51
|
+
|
52
|
+
```
|