You need to sign in to do that
Don't have an account?

how to display a link in a row only for one particular column value
I have a requirement need to display a table if any of the row value is acitive in one of the column called status now how to display a link(cancel) with in the same column that is next to acitve value.if user click on that link status should turn to cancle and link should disappear. Any thoughts....
I would suggest building a wrapper class for your objects. In your table used the rendered property for editing. Below I am using the Case object just for example:
All Answers
if My understanding is correct ,below may accomplish your requirement.
(keep in mind that you have to add jquerybase library in ur page)
<script>
function ToggleStatDiv()
{
('#main-div').hide('fast'); ('#status-div').show('fast');
}
</script>
function ToggleMainDiv()
{
('#main-div').show('fast'); ('#status-div').hide('fast');
}
</script>
<table>
<thead>
<tr>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div id="main-div">
<a href="javascript:void(0)" onclick="ToggleStatDiv();">Show Status</a>
</div>
<div id="status-div" style="display:none;">
{!Your Status}
<a href="javascript:void(0)" onclick="ToggleMainDiv();">Cancel</a>
</div>
</td>
</tr>
</tbody>
</table>
I would suggest building a wrapper class for your objects. In your table used the rendered property for editing. Below I am using the Case object just for example:
Made an adjustment to the Constructor of my Wrapper. I forgot the parameter portion.
It worked .Thank you so much.
Could you please mark the solution that worked for you so that others may see?
there is an extension to the above requirement that is a number datatyoe field exist in the record when click on that link if the value in the number field is not with in the required range it should display an alert along with the buttons like continue or cancel the request. if the user click on continue the status should turn to cancelled or if the user selects cancel it should come back to the same page. could please let me know how this can be developed.
You might want something similar to this:
//You may need to make a few modifications to be more directly for your purposes.
Thank you for replying back. Here an alert means a popup window that window should contain these buttons.I know really don't understand how to handle rendered field and action methods from a wrapper class.
Well, you could do some javascript to get the values, but the quickest way to get to where you need with what I've given you already would be something like:
There is definately better and more efficient ways, but this keeps you more along the line of what we've already built. On the commandLinks add