I prefer:
public String loadAttributgroup()
{
try
{
// get Table
FacesContext t_context = FacesContext.getCurrentInstance();
UIData t_table = (UIData)t_context.getViewRoot().findComponent("SearchAGForm:AGSearchResultTable");
// get actual selected row from table
AttributgroupHeaderInterface t_attrib = (AttributgroupHeaderInterface)t_table.getRowData();
// do something else
t_attrib = AttributgroupBroker.current().loadAttribgroup(t_attrib.getA_AttrGrpNbr());
}
catch (CouldNotFindAGException e)
{
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, null, GMsgBean.getMyBundle().getString(AGMsgBean.COULD_NOT_FIND_AG)));
}
return "AGDetails";
}
Chris
| Ray Clark <[EMAIL PROTECTED]>
07.04.2005 04:45
|
An: [email protected] Kopie: Thema: dataTable and commandButton question |
I'm sure this must have been asked before but I can't
find it in the archives. So please forgive me if it
has been asked before.
I have a dataTable with a commandButton rendered on
each row. When the commandButton is pressed I need
it's managed bean method to know which row the button
was pressed for. So how can the method know which row
to process?
Thanks,
Ray
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo

