You need to sign in to do that
Don't have an account?
Dvisha T
Unknown property Error on myopportunities
Hi,
Am having similar error am new to visualforce and apex do correct my code thanks in advance.
Error: Unknown property 'myOpportunities' referenced in OppExt
public with sharing class OppExt {
public List<Opportunity> myOpportunities { get; private set; }
public OppExt(){
myOpportunities = [ SELECT Id, Name, Account.Name,StageName,Amount,CloseDate
from Opportunity
WHERE OwnerId = :UserInfo.getUserId()];
}
}
<apex:page>
<apex:repeat value="{!myOpportunities}" var="opp" >
<apex:outputlink value="/{!opp.Id}">{!opp.Name}</apex:outputlink><br/>
</apex:repeat>
</apex:page>
Am having similar error am new to visualforce and apex do correct my code thanks in advance.
Error: Unknown property 'myOpportunities' referenced in OppExt
public with sharing class OppExt {
public List<Opportunity> myOpportunities { get; private set; }
public OppExt(){
myOpportunities = [ SELECT Id, Name, Account.Name,StageName,Amount,CloseDate
from Opportunity
WHERE OwnerId = :UserInfo.getUserId()];
}
}
<apex:page>
<apex:repeat value="{!myOpportunities}" var="opp" >
<apex:outputlink value="/{!opp.Id}">{!opp.Name}</apex:outputlink><br/>
</apex:repeat>
</apex:page>
the controller attribute is not defined on the <apex:page tag. Try this should work
Thank you for your help.
But somehow the logic dis not work for me.~Hope you can help on my requirement.
Display a link to an opportunity object in my VF page rather than just the name.
Display opportunity name as a link in a VF page that expand and collapse its product related details.
I hope the question you have asked initially has been fixed. If you have any other issue which is not related to this then create another post for that not in this post. so that people who get stuck in similar issue will get the answer from this post.