質問編集履歴

3

タイトル修正

2017/01/05 09:21

投稿

anonyrabbit
anonyrabbit

スコア78

test CHANGED
@@ -1 +1 @@
1
- <ui:composition>を使うとメソッドが実行されない
1
+ <ui:composition>を使うとその中にあるメソッドが実行されない
test CHANGED
File without changes

2

情報追加

2017/01/05 09:21

投稿

anonyrabbit
anonyrabbit

スコア78

test CHANGED
File without changes
test CHANGED
@@ -101,3 +101,29 @@
101
101
 
102
102
 
103
103
  ```
104
+
105
+
106
+
107
+ こちらがテンプレートです
108
+
109
+ ```xhtml
110
+
111
+ <h:body>
112
+
113
+ <ui:composition template="/templates/topbar-template.xhtml">
114
+
115
+ <ui:define name="content">
116
+
117
+ <ui:include src="find-content.xhtml"/>
118
+
119
+ </ui:define>
120
+
121
+ </ui:composition>
122
+
123
+
124
+
125
+ </h:body>
126
+
127
+
128
+
129
+ ```

1

情報追加

2017/01/05 09:18

投稿

anonyrabbit
anonyrabbit

スコア78

test CHANGED
File without changes
test CHANGED
@@ -1 +1,103 @@
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>を置いたのですがjか
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
+
3
+ 下記の<ui:composition>のコメントアウトを外すとメソッドが動かなくなってしまいます。
4
+
5
+
6
+
7
+ ```xhtml
8
+
9
+
10
+
11
+ <h:body>
12
+
13
+ <!--<ui:composition>-->
14
+
15
+
16
+
17
+ <h:form>
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+ <link rel="stylesheet" type="text/css" href="resources/css/find.css" />
28
+
29
+ <h:outputStylesheet library="css" name="find.css" />
30
+
31
+
32
+
33
+ <br/>
34
+
35
+ <br/>
36
+
37
+
38
+
39
+ <p:dataTable id="examplej" class="table couple-table"
40
+
41
+ var="info" value="#{bb.coupleList}" widgetVar="couple" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
42
+
43
+ rowsPerPageTemplate="5,10,15" paginator="true" emptyMessage="まだ登録している人はいません">
44
+
45
+ <f:facet name="header">
46
+
47
+ <!--<p:outputPanel>-->
48
+
49
+ <h:outputText value="地域で検索" />
50
+
51
+
52
+
53
+
54
+
55
+ <p:inputText id="search" value="#{bb.search}" style="width:150px" p:placeholder="例:世田谷区"/> <br/>
56
+
57
+ <br/>
58
+
59
+ <h:commandLink type="submit" value="地域で検索" action="#{bb.filterTable()}" class="Button"/>
60
+
61
+
62
+
63
+ <!--</p:outputPanel>-->
64
+
65
+
66
+
67
+ </f:facet>
68
+
69
+ <p:ajax event="rowSelect" listener="#{bb.detail(info)}"
70
+
71
+ />
72
+
73
+
74
+
75
+ <p:column class="column-couple" >
76
+
77
+ <p:graphicImage value="#{bb.pic}" >
78
+
79
+ <f:param name="id" value="#{info.id}"/>
80
+
81
+ </p:graphicImage>
82
+
83
+ </p:column>
84
+
85
+
86
+
87
+
88
+
89
+ </p:dataTable>
90
+
91
+
92
+
93
+ </h:form>
94
+
95
+ <!--</ui:composition>-->
96
+
97
+
98
+
99
+ </h:body>
100
+
101
+
102
+
103
+ ```