You need to sign in to do that
Don't have an account?
lnryan
specify a SOQL query in value of apex:dataTable
At Dreamforce, I thought I saw an example in which a SOQL dataset was instantiated directly from within the value="..." element of an apex: container such as apex:dataTable, ie
but now that I'm searching for it I can't find anything like this. Is it possible? Is there some functionality like it that I may be confusing it with?
Thanks,
Lindsay
Code:
<apex:pageBlockList var="myItem" value="!{[Select ID, Name From...]}">
but now that I'm searching for it I can't find anything like this. Is it possible? Is there some functionality like it that I may be confusing it with?
Thanks,
Lindsay
you still need a controller to execute that statement.
you can specify the list of related items when using standard controller. example if using account
then the following is a valid list to iterate over.
{!account.contacts}
{!account.Tasks}
etc..
Message Edited by dchasman on 05-14-2008 07:18 PM
I have a client who wants all entries (created in the previous month) of a custom object displayed as a PDF. They have Professional edition only, which means that I cannot write a query (for records of the previous month only) on a custom controller extension. Is there any way to query from a Visualforce tag such as datatable?
Andi Giri
Does professional edition still have VF? (we have unlimited so i'm not so familiar...)
If so, you could probably do the following without needing Apex Code:
- Create a List view for the Custom Object
- Follow the documentation provided in the VF Dev Guide for refreshing a data table based on an existing List View
- Use either fieldsets or explicitely defined fields in your data table (field sets would give your client better flexibility in the long run)
- Include a render as PDF button for after the list view is selected
I haven't looked into how to pre-define which list view to use, but you could probably figure it out by lifting the ID from the standard list view page's querystring parameters or by dumping the list view variable into an apex:outputText tag.