• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simulate clicking of edit column command button in data table from another component in data table

 
M Kent
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a <hx:commandExRowEdit> component on my jsp page and want to know if I can invoke 'clicking' of this component from the action attribute of a <h:commandLink> component. I don't want to see the edit button on my page but I do need the popup edit window so I am trying this as a work around.

Thanks,
M Kent
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask JSF questions in the JSF forum. I have moved this post there for you.
 
M Kent
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for misdirecting my post...

I will try to rephrase my question since I didn't get any replies

I want to use a commandlink action to execute what happens if I actually clicked a 'hidden' commandexrowedit button... Is this possible?

Here is my datatable:
 
Kavita Tipnis
Ranch Hand
Posts: 177
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure whether it will solve your problem or not,but you can try specifying an action listener for your 'cmdAddApprName' link
and invoke the action method for 'commandExRowEdit'
 
M Kent
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used upper case to highlight what I am trying to do now...

The jsp page:

<h:dataTable...>
<h:column id="column1">
<hx:commandExRowEdit styleClass="dataTableContent"
action="#{pc_SubmissionMaint.doApprNameEdit}"
id="apprNameEdit1" style="display:none">
<hx:jspPanel id="jspPanel1">
<hutputText id="outText" styleClass="dataTableContent"
value="Enter approver's name" />
<h:inputText id="inTxtApprName" styleClass="dataTableContent"
value="#{pc_SubmissionMaint.submissionBean.apprNames" />
</hx:jspPanel>
</hx:commandExRowEdit>
</h:column>

<h:column id="ApprAction">
<h:commandLink id="cmdAddApprName"
title="Click here to enter approver's name" style="dataTableContent"
ACTION="#{PC_SUBMISSIONMAINT.SUBMISSIONBEAN.HANDLECOMMANDLINKACTION" >
<hutputText id="outTxtApprs" styleClass="dataTableContent"
value="#{varApprovers}" />
</h:commandLink>
</h:column>

<h:column id="columnAddApproverName"
rendered="#{pc_SubmissionMaint.submissionBean.apprNames ne null}">
<hutputText id="outTxtApprName" styleClass="formFieldData"
value="#{pc_SubmissionMaint.submissionBean.apprNames" />
</h:column>
</h:dataTable>


The method to invoke commandExRowEdit (id=apprNameEdit1):

PUBLIC VOID HANDLECOMMANDLINKACTION(ACTIONEVENT EVENT) {
APPRNAMEEDIT1.GETACTION().INVOKE(ARG0, ARG1);
}



I’m not sure what to put for the arguments…
invoke(FacesContext arg0, Object[] arg1)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic