You need to sign in to do that
Don't have an account?
Null Values passed from CustomButtom to Controller
HEllo,
I've written the following VF Page code:
.
.
<apex:panelBarItem label="Genehmigungen" rendered="{!NOT(ISNULL(Genehmigungen_prop))}">
<apex:PageBlock ID="GenBlock" >
<apex:pageBlockSection title="Genehmigungen"
collapsible="false" id="GenBlocksection" >
<apex:pageBlockTable style="text-align:center;white-space: pre;"
value="{!Genehmigungen_prop}" var="AP" id="GenBlockTable">
<apex:column headerValue="Kopieren" >
<apex:commandButton id="GenKop" action="{!GenKopieren}"
rerender="BarForm,RezeptForm,Gesamtpreis" value="Kopieren">
<apex:param name="genkop" assignTo="{!applylfdNr}" value="{!AP.lfdNr}" />
<apex:param name="testTyp" assignTo="{!applyTyp}" value="Genehmigung" />
</apex:commandButton>
</apex:column>
<apex:column headerValue="LZ bearb" >
<apex:commandButton id="LZGenBearb" action="{!BarVerkaufAposLaufzettel}"
value="LZ bearb">
<apex:param name="LZGb" assignTo="{!applylfdNr}" value="{!AP.lfdNr}" />
<apex:param name="genT" assignTo="{!applyTyp}" value="Genehmigung" />
</apex:commandButton>
</apex:column>
<apex:column headerValue="Positionsart">
<apex:outputField value="{!AP.theRecord.Positionsart__c}" />
</apex:column>
And the following controller code:
public Integer applylfdNr {
get;
set{
applylfdNr = value;
system.debug('############################ ApplylfdNr ' + applylfdNr);
}
}
public String applyTyp {
get{
return applyTyp;
}
set{
applyTyp = value;
system.debug('############################ ApplyTyp ' + applyTyp);
}
}
If I now press the second buttom with id LZGenBearb both variables applylfdNr and applyTyp are null in the controller. If I press the first buttom with the id GenKop both variables are set in the controller. If I then again press the second buttom the values of the first buttom are in the controller. What is wrong in my code?
Thanks for your help!
Harry
Hello Chamil,
I got an email, with your advice, but I cannot see it here. I tried your code even though I could not find any changes to my code. The result is the same, as with my code. Maybe, you forgot to change my code? Thanks for your help!
Harry