You need to sign in to do that
Don't have an account?
JieMe
about parameter
as follows,content:
<apex:commandButton value="删除" action="{!delOneIM}">
<apex:param value="{!lxr.Id}" name="iid"/>
</apex:commandButton>
like this,in the controller ,get param name's value is null.
but use commandLink ,as follows:
<apex:commandLink value="删除" action="{!delOneIM}">
<apex:param value="{!lxr.Id}" name="iid"/>
</apex:commandLink>
no problem ,can get param value.
why?can anyone explain?thanks!
No You have made a mistake in your code, the param you are passing should be assigned to any property ( property has to be public) in the controller. See this example
See this assignTo="{!state}" , that ius what you also need to do.
assignTo : A setter method that assigns the value of this param to a 10.0 global variable in the associated Visualforce controller. If this assignTo Object attribute is used, getter and setter methods, or a property with get and set values, must be defined.
hi,sharma,
<apex:commandLink value="删除" action="{!delOneIM}">
<apex:param value="{!lxr.Id}" name="iid"/>
</apex:commandLink>
like this,no problem ,can get param value in the controller.
in addition,Attribute assignTo is not required.
like that you say,<apex:commandLink value="删除" action="{!delOneIM}">
<apex:param value="{!lxr.Id}" name="iid"/>
</apex:commandLink>
so,the must be not work,can'it ge param value in the controller also.
discuss together,thanks!
just try this one time
<apex:param value="lidvalue" assignTo="{!lxr.Id}" name="iid"/>
Even though assignTo="{!lxr.Id}" is not required and even you provide any wrong parameter like assignTo="{!doesNotExistInController}" it will not give you compile time error. But in order to pass value to controller it is necessary that you provide this assignTo attribute and the propety you bind should be a public property in the controller.
<apex:commandLink value="删除" action="{!delOneIM}">
<apex:param value="{!lxr.Id}" name="iid"/>
</apex:commandLink>
in the controller , String gmid = ApexPages.currentPage().getParameters().get('iid'); can get the param value.
sure ,i will try it that you say,also.
can i add your msn? mine:xuwenliang1987@Hotmail.com
here are my contact details
yahoo : shashi_99_rocks@yahoo.co.in
gmail : shashi99rocks@gmail.com
skypeid : shashikant99sharma
you can catch me on my blog also : http://forceschool.blogspot.com/
OK,may be i am in china,can't open your blog web.
you have to use the rerender attribute in the command link component... create a dummy outputpanel and give the rerender attribute as output panel..and the param will set....try like this... hope this will resolve your issue..