aspose file tools*
The moose likes JSF and the fly likes simulate clicking of edit column command button in data table from another component in data table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "simulate clicking of edit column command button in data table from another component in data table" Watch "simulate clicking of edit column command button in data table from another component in data table" New topic
Author

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

M Kent
Greenhorn

Joined: Jun 02, 2009
Posts: 3
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

Joined: Jan 10, 2002
Posts: 61433
    
  67

Please be sure to ask JSF questions in the JSF forum. I have moved this post there for you.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
M Kent
Greenhorn

Joined: Jun 02, 2009
Posts: 3
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

Joined: Sep 21, 2008
Posts: 177
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

Joined: Jun 02, 2009
Posts: 3
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)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: simulate clicking of edit column command button in data table from another component in data table