You need to sign in to do that
Don't have an account?
Luke@TWS
Possible to set standard subject object object using controller extension?
Hi,
I've been having a play around trying to setup a new app in Visual Force. I have a settings object which will probably only have one set of settings, so I would like to skip the object selection selection as I already know which one I wish to make the subject. I would also ideally like to keep the standard controller functionallity as this makes alot of other things easier. It is possible to use a controller extension to tell the standard controller which object it should be looking at?
I know you can use object = standardController.getSubject(); to tell the extension which object we're looking at, but can you do it the other way around?
object = [select Id from setting limit 1]
standardController.setSubject(object)
or something similar.
I've been having a play around trying to setup a new app in Visual Force. I have a settings object which will probably only have one set of settings, so I would like to skip the object selection selection as I already know which one I wish to make the subject. I would also ideally like to keep the standard controller functionallity as this makes alot of other things easier. It is possible to use a controller extension to tell the standard controller which object it should be looking at?
I know you can use object = standardController.getSubject(); to tell the extension which object we're looking at, but can you do it the other way around?
object = [select Id from setting limit 1]
standardController.setSubject(object)
or something similar.
with strong typing in the language you must specify which object you are dealing with , because this is also specified on the page.