Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how add button to datatable header with example action. ? ADF

3376762Jan 9 2017 — edited Jan 9 2017

0 down vote  favorite  

ADF Faces Button in header.

How can add a button to the header column in the control datatable Oracle ADF

(button functionality: when i click on header adding value "Xxxx" to the rows in this column )

Quest
2. whether it is worth to use javascript to describe the action of this
button because the value in rows should be added locally.

i try
do sth and create button and action in jdev11 release 2 but cant set
button on table header. how can i dynamicly get row id on one column ?


  
  <af:resource type="javascript">
function aaa(evt)
{
var msg = "  ,information";
var sourceOutput=evt.getSource();
var inputTXT = sourceOutput.findComponent("it1").getValue();
var inputTXT2 = sourceOutput.findComponent("it2").getValue();
var input = sourceOutput.findComponent("it1"); var input2 = sourceOutput.findComponent("it2");
input.setValue(inputTXT+msg); input2.setValue(inputTXT2+msg);
   var nameInputText = evt.getSource().findComponent("cb10");
nameInputText.setProperty("visible", false); evt.cancel();
}
</af:resource>

and my button

   <af:commandButton text="commandButton 1" id="cb10"> 
<af:clientListener method="aaa" type="action"/>
</af:commandButton>

and form :


 <af:panelFormLayout id="pfl2">
<af:inputText value="#{bindings.Name.inputValue}" label="#{bindings.Name.hints.label}" required="#{bindings.Name.hints.mandatory}" columns="#{bindings.Name.hints.displayWidth}" maximumLength="#{bindings.Name.hints.precision}" shortDesc="#{bindings.Name.hints.tooltip}" id="it1">
<f:validator binding="#{bindings.Name.validator}"/> </af:inputText> <af:inputText value="#{bindings.State.inputValue}" label="#{bindings.State.hints.label}" required="#{bindings.State.hints.mandatory}" columns="#{bindings.State.hints.displayWidth}" maximumLength="#{bindings.State.hints.precision}" shortDesc="#{bindings.State.hints.tooltip}" id="it2">
<f:validator binding="#{bindings.State.validator}"/> </af:inputText>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2017
Added on Jan 9 2017
2 comments
807 views