Re: default values in a query page
Re: default values in a query page
- Subject: Re: default values in a query page
- From: Ramsey Gurley <email@hidden>
- Date: Thu, 19 Feb 2015 15:06:19 -0700
Those are just the localized strings for the form labels. If I remember correctly, what you want to do is set the query min and query max on your query page display group before you return it. Something like
public D2WPage myQueryAction() {
ERD2WQueryPage page = (ERD2WQueryPage)D2W.factory().queryPageForEntityNamed(Event.ENTITY_NAME, session());
//Set up page data source?
//Calculate min/max
page.displayGroup().queryMin().setObjectForKey(min, Event.DATE_KEY);
page.displayGroup().queryMax().setObjectForKey(max, Event.DATE_KEY);
return page;
}
On Feb 19, 2015, at 2:26 PM, Theodore Petrosky <email@hidden> wrote:
> I am creating a query page in my d2w app with
>
> //query events main page
> public WOComponent queryMainEvents() {
>
> QueryPageInterface newQueryPage = D2W.factory().queryPageForEntityNamed(EVENT, session());
>
> return (WOComponent) newQueryPage;
> }
>
>
> Event has an attribute eventDate. Of course on the query page I get Event Date (and two date framing the start and end of the query).
>
>
> I see the ERD2WQueryDateRange has to and from values:
>
> SessionLocalizerERD2WQueryDateRangeTo: ERXLocalizedString {
> value = "ERD2WQueryDateRange.to";
> }
>
> SessionLocalizerERD2WQueryDateRangeFrom: ERXLocalizedString {
> value = "ERD2WQueryDateRange.from";
> }
>
> how can I target them so when this query page opens it is loaded with a calculated range (this week)?
>
> Ted
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden