質問編集履歴
1
xhtmlの内容を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,3 +11,125 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
よろしくお願いします。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
xhtmlファイルの内容は、
|
18
|
+
|
19
|
+
```lang-<xhtml>
|
20
|
+
|
21
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
22
|
+
|
23
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
24
|
+
|
25
|
+
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
26
|
+
|
27
|
+
xmlns:ui="http://java.sun.com/jsf/facelets"
|
28
|
+
|
29
|
+
xmlns:h="http://java.sun.com/jsf/html"
|
30
|
+
|
31
|
+
xmlns:f="http://java.sun.com/jsf/core"
|
32
|
+
|
33
|
+
xmlns:p="http://primefaces.org/ui">
|
34
|
+
|
35
|
+
<ui:define name="content">
|
36
|
+
|
37
|
+
<h:form id="form">
|
38
|
+
|
39
|
+
<div class="listpanel">
|
40
|
+
|
41
|
+
<p:panel>
|
42
|
+
|
43
|
+
<p:dataTable id="datatable" var="car"
|
44
|
+
|
45
|
+
value="#{carBean.list}" editable="true"
|
46
|
+
|
47
|
+
editMode="cell" paginator="true" rows="10"
|
48
|
+
|
49
|
+
rowsPerPageTemplate="10,20,30"
|
50
|
+
|
51
|
+
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
|
52
|
+
|
53
|
+
<p:ajax event="cellEdit"
|
54
|
+
|
55
|
+
listener="#{carBean.onCellEdit}"
|
56
|
+
|
57
|
+
update=":form:datatable" />
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<p:column headerText="DATE">
|
62
|
+
|
63
|
+
<p:cellEditor>
|
64
|
+
|
65
|
+
<f:facet name="output">
|
66
|
+
|
67
|
+
<p:outputLabel value="#{car.date}">
|
68
|
+
|
69
|
+
<f:convertDateTime pattern="yyyy/MM/dd" />
|
70
|
+
|
71
|
+
</p:outputLabel>
|
72
|
+
|
73
|
+
</f:facet>
|
74
|
+
|
75
|
+
<f:facet name="input">
|
76
|
+
|
77
|
+
<p:calendar pattern="yyyy/MM/dd"
|
78
|
+
|
79
|
+
value="#{car.date}"/>
|
80
|
+
|
81
|
+
</f:facet>
|
82
|
+
|
83
|
+
</p:cellEditor>
|
84
|
+
|
85
|
+
</p:column>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<p:column headerText="DETAIL">
|
90
|
+
|
91
|
+
<p:cellEditor>
|
92
|
+
|
93
|
+
<f:facet name="output">
|
94
|
+
|
95
|
+
<p:outputLabel value="#{car.detail}" />
|
96
|
+
|
97
|
+
</f:facet>
|
98
|
+
|
99
|
+
<f:facet name="input">
|
100
|
+
|
101
|
+
<p:inputText value="#{car.detail}" />
|
102
|
+
|
103
|
+
</f:facet>
|
104
|
+
|
105
|
+
</p:cellEditor>
|
106
|
+
|
107
|
+
</p:column>
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<p:column headerText="EDIT STATUS">
|
112
|
+
|
113
|
+
<p:outputLabel value="#{car.editStatus}" />
|
114
|
+
|
115
|
+
</p:column>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
</p:dataTable>
|
120
|
+
|
121
|
+
</p:panel>
|
122
|
+
|
123
|
+
</div>
|
124
|
+
|
125
|
+
</h:form>
|
126
|
+
|
127
|
+
</ui:define>
|
128
|
+
|
129
|
+
</ui:composition>
|
130
|
+
|
131
|
+
```
|
132
|
+
|
133
|
+
です。headerTextがDATEやDETAILの内容を編集すると、headerTextがEDIT_STATUSの列にあるセルの内容が変化するようにしたいと考えています。
|
134
|
+
|
135
|
+
以上よろしくお願いします。
|