You need to sign in to do that
Don't have an account?
U
Highlight row by selecting checkbox
Hi experts,
I would like to ask you some advise for what I am doing now.
I made following page block on Visualforce page so far. I want to highligh row when I click checkbox (Address 1 Line 1 H) on the right.
This is sample screen that I want to get see when I select the checkbox.
Visualforce
Apex - Retrieve FieldSet, called "Account_Address", by using FieldSet
How do you implement highligh feature?
Thank you for your comment in advance!
I would like to ask you some advise for what I am doing now.
I made following page block on Visualforce page so far. I want to highligh row when I click checkbox (Address 1 Line 1 H) on the right.
This is sample screen that I want to get see when I select the checkbox.
Visualforce
<apex:form> <apex:inlineEditSupport event="ondblclick"/> <apex:pageBlock title="Sample Page Block"> <apex:pageBlockSection collapsible="false" title="Address" columns="2"> <apex:repeat value="{!AddressFields}" var="f"> <!--AddressFields contains FieldSet, retreived by Apex--> <apex:outputField value="{!account[f.fieldPath]}" /> </apex:repeat> </apex:pageBlockSection> </apex:pageBlock> </apex:form>
Apex - Retrieve FieldSet, called "Account_Address", by using FieldSet
public list<Schema.FieldSetMember> getAddressFields(){ return SobjectType.Account.FieldSets.Account_Address.getFields(); }
How do you implement highligh feature?
Thank you for your comment in advance!
Just add Javascript code to your check box onclick or onchange event :
Add this code to the check box components as : onclick="toggleHighLight(this);"
You can find many options and ways in Jquery.
All Answers
Just add Javascript code to your check box onclick or onchange event :
Add this code to the check box components as : onclick="toggleHighLight(this);"
You can find many options and ways in Jquery.
Thank you for your response and sample code above.
I needed to use inputField instead of outputField tag to use your code since outputField tag does not support onClick or onChange action..
↓
I have not found completed answer for my issue yet but your idea helps me a lot!
As you suggested, I will have a look at JQuery.
Thank you.
I have gone through many requirements like this where user want to add their custom JS code at the time of inline edit.
So thought to have a work arround. May be if you would have find the solution kindly share.
Follow the code snipset below and try to 1) attach JQuery library into the VF Page. 2) Add a
"\<div class="accFieldSets"\>" component This is working for me, you may have to fine tune it a little. :) Good Luck