You need to sign in to do that
Don't have an account?
Meer Salman
events for output field or label
Hi..
I have a following PageBlock in my page. I wonder how can I acheive onchange event for output field and rerender another field when the value is changed?
In my case I have two custom fields Journal.Period__c and Journal.Journal_Date__c, as you can see the PageBlock is in mode="inlineEdit" thus if I change the Journal.Period__c value i want to change the value for Journal.Journal_Date__c accordingly. I have use <apex:inputField> tag to acheive my target but it doesn't give a nice look to the page so I was looking something like onchange event for <apex:outfield> or <apex:outlabel> etc.
<apex:pageBlock mode="inlineEdit" title="Journal Detail">
<apex:pageBlockSection columns="2">
<apex:inputField id="period_date" value="{!Journal.Period__c}" onchange="ShowJournalDate(this)"/>
<apex:outputLabel />
<apex:inputField id="journal_date" value="{!Journal.Journal_Date__c}"/>
<apex:outputLabel />
<apex:outputField value="{!Journal.Card__c}"/>
<apex:outputLabel ></apex:outputLabel>
<apex:outputField value="{!Journal.Description__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
I wish there must be some solution for what I am looking for.
Regards,
Meer Salman
Did you try using ActionSupport? if not try and let me know if you are not able to fix this.
I tried something like below:
I made some changes in my Extension and VFPage as given below:
*****Controller*****
*****VFPage*****
Try this and let me know if it doesnt work.
Sorry still not working. Well I belive <apex:outputfield> doesn't have the events associated with it therefore <apex:actionsupport> event tag doesn't fire. I guess <apex:actionsupport> will only work with those components which have their own event handlers.I doubt I am right.
Regards,
Meer Salman