You need to sign in to do that
Don't have an account?
SFDC AVINASH
Parameters Issue!
Hi All,
Bellow is my part of VF source code. This is for a row delete button.
and the corresponding Delete methode is as bellow.
But its not deleting the records from the row. Any suggestions plz!
Bellow is my part of VF source code. This is for a row delete button.
<apex:column> <apex:commandlink action="{!Deleterow}" immediate="true"><apex:param name="tentryid" value="{!Project.Id}"/><apex:param name="rowNumber" value="{!rowNum}"/><apex:commandbutton value="Delete" /> </apex:commandlink> </apex:column>
and the corresponding Delete methode is as bellow.
public void Deleterow(){ String rownumber = System.currentPagereference().getParameters().get('rownumber'); Decimal rownumb = Decimal.Valueof(rownumber); Integer rowno = rownumb.IntValue(); if (rownumber != ' '){ system.debug('This is the record' + rownumber); tentries.remove(rowno); UPSERT tentries; } }
But its not deleting the records from the row. Any suggestions plz!
SFDC AVINASH
Just to givee a clear picture here is my full VF code.
James Loghry
Looks like your checking for the incorrect parameter. Map keys are case sensitive, so rowNumber is different than rownumber. That being said, here's how I would approach it. Note, that the rerender="idofpageblock" should point to the id of a parent element, which is also case sensitive.
James Loghry
For more on the command button and parameters, see here: http://blog.jeffdouglas.com/2010/03/04/passing-parameters-with-a-commandbutton/