Hi Radu,
Not sure why this problem exists, however a quick way to get rid of this could be passing a parameter (f:param) along with the command link; get this parameter in the action listener and then perform the necessary operation. ~Sandeep -----Original Message----- From: radu_milos [mailto:[EMAIL PROTECTED] Sent: Monday, September 03, 2007 2:55 PM To: users@myfaces.apache.org Subject: Re: CommandLink in dataTabl First, thanks for the interest. Problem is that with WebLogic 8.1(this is my constrain) I am stuck to sun RI 1.1 and tomahawk 1.1.1 I've tryed the other versions of tomahawk (from 1.1.2 to 1.1.6) and I couldn't get them working. Radu Martin Marinschek wrote: > > Hi Radu, > > you've run into a compatibility problem between Sun RI 1.1 and > Tomahawk, both in earlier versions. An upgrade to the latest 1.1 > version of both libraries should help! > > regards, > > Martin > > On 9/3/07, radu_milos <[EMAIL PROTECTED]> wrote: >> >> Hello, >> I am a newbie learning JSF while trying to meet deadlines on a JSF >> refactoring project. >> The docs & forums have helped me quite a lot.... untill now when I seem >> to >> be facing >> a wierd problem. Here is the context : I have a dataTable and a >> commandLink >> on every >> line. The actionListener associated with this commandLink should only >> update >> some db information >> for the concerned record(and then redisplay the same page again). >> My problem is that when i click on _one_ link the actionListener is >> called >> for every link from the dataTable. >> It is just like had clicked _all_ the links!! very weird. >> (If I have 30 links displayed, I click one link and the actionListener is >> called 30 times.. for >> all 30 rows) >> >> Environement : >> app server : WebLogic 8.1 SP4 >> jsf implementation : SUN RI 1.1 >> tomahawk version : 1.1.1 (the only one working with weblogic 8.1) >> >> ---THE VIEW--- >> #################################################adminLogging.jsp####### ########### >> >> <h:form id="displayLogForm"> >> <t:dataTable id="logs" >> value="#{logSort.loggers}" >> var="log" >> binding="#{logSort.dataTable}" >> sortColumn="#{logSort.sort}" >> sortAscending="#{ logSort.ascending}" >> preserveSort="true" >> > >> <h:column> >> <f:facet name="header"> >> <t:commandSortHeader columnName="loggerName" arrow="true" >> > >> <h:outputText value="LoggerName" /> >> </t:commandSortHeader> >> </f:facet> >> <h:outputText value="#{log.loggerName }" /> >> </h:column> >> >> <h:column> >> <f:facet name="header"> >> <h:outputText value="Change Log Level" /> >> </f:facet> >> <h:commandLink value="Debug3" >> actionListener="#{logSort.modifyLogOnServer3}"/> >> </h:column> >> </t:dataTable> >> </h:form> >> >> ######################################################################## ########## >> >> >> ---BACKING BEAN--- >> public class LogSortHelper extends SortableList{ >> >> private HtmlDataTable dataTable; >> .... >> public void modifyLogOnServer3(javax.faces.event.ActionEvent event) { >> >> LoggerBean row = (LoggerBean) dataTable.getRowData(); >> String attributeName = row.getLoggerName(); >> logger.debug("atribute Name:"+attributeName+"|"); >> } >> ... >> } >> >> ---LOGGERBEAN--- >> public class LoggerBean { >> ... >> private String loggerName ; >> .... >> } >> >> >> in faces-config.xml, logSort = LogSortHelper >> >> >> >> Further on , I've tryed to get rid of the component binding stuff... >> (which >> in fact I only needed >> for the dataTable.getRowData() method) . >> >> So i did the following modifications : >> (http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters ) >> >> ---VIEW--- >> <h:commandLink value="Debug3" >> actionListener="#{logSort.modifyLogOnServer4}"> >> <f:param name="logDebugId" >> value="#{log.loggerName}"/> >> </h:commandLink> >> >> >> ---BACKING BEAN--- >> >> public String modifyLogOnServer4(javax.faces.event.ActionEvent event) { >> FacesContext context = FacesContext.getCurrentInstance(); >> Map map = context.getExternalContext().getRequestParameterMap(); >> String attributeName = (String) map.get("logDebugId"); >> } >> >> Now I have my actionListener called 30 times... but for the same link( >> not >> anymore for all the links >> in the dataTable, but for the same link... 30 times) >> >> >> And then something else : I am having inconsistent behaviour when >> changing >> from commandButton to commandLink... >> IE : using commandButton my parameter is not passed to the backing >> bean.(with commandLink I see params >> in the backing bean) >> >> Anybody got any solutions? >> >> Regards, >> Radu Milos >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/CommandLink-in-dataTabl-tf4370964.html#a12458281 >> Sent from the MyFaces - Users mailing list archive at Nabble.com. >> >> > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > > -- View this message in context: http://www.nabble.com/CommandLink-in-dataTabl-tf4370964.html#a12458540 Sent from the MyFaces - Users mailing list archive at Nabble.com.