You need to sign in to do that
Don't have an account?
eswari
URGENT: Redirect to new page with actionSupport
Hi,
I am displaying a list of images and some corresponding image data using <apex:repeat> on my page. On click of a particular block (image and corresponding data) i need to pass some parameters and redirect to another page.
I am using the actionSupport tag to invoke a method on click of the block and passing parameters to the controller.
However, I should keep the rerender in actionSupport tag to pass the parameters as it is not working if I miss the rerender.
So , how can I redirect to the new page after assigning the parameters ?
Hi,
Below is the sample code that worked on actionsupport with apex:param , you can manipulate your task with the help of below code snippet.
<apex:page standardController="Account">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are displaying contacts from the {!account.name} account.
Mouse over a contact's name to view his or her details.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:form>
<apex:dataTable value="{!account.Contacts}" var="contact" cellPadding="4" border="1">
<apex:column>
<apex:outputPanel>
<apex:actionSupport event="onmouseover" rerender="detail">
<apex:param name="cid" value="{!contact.id}"/>
</apex:actionSupport>
{!contact.Name}
</apex:outputPanel>
</apex:column>
</apex:dataTable>
</apex:form>
</apex:pageBlock>
<apex:outputPanel id="detail">
<apex:actionStatus startText="Requesting...">
<apex:facet name="stop">
<apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false" title="false"/>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
Below is the sample code that worked on actionsupport with apex:param , you can manipulate your task with the help of below code snippet.
<apex:page standardController="Account">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are displaying contacts from the {!account.name} account.
Mouse over a contact's name to view his or her details.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:form>
<apex:dataTable value="{!account.Contacts}" var="contact" cellPadding="4" border="1">
<apex:column>
<apex:outputPanel>
<apex:actionSupport event="onmouseover" rerender="detail">
<apex:param name="cid" value="{!contact.id}"/>
</apex:actionSupport>
{!contact.Name}
</apex:outputPanel>
</apex:column>
</apex:dataTable>
</apex:form>
</apex:pageBlock>
<apex:outputPanel id="detail">
<apex:actionStatus startText="Requesting...">
<apex:facet name="stop">
<apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false" title="false"/>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks for your reply.
I am able to redirect to the new page by having the pageInclude tag in the outpanel and making the outpanel rendered as true after clicking on the image.
But I am not able to show the startText for the action status.
Could you please help on this?