• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: default values in a query page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >default values in a query page (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: default values in a query page
  • Next by Date: Re: Eclipse/Java cannot connect to jenkins.wocommmunity.org anymore
  • Previous by thread: default values in a query page
  • Next by thread: Re: maven.wocommunity.org is down
  • Index(es):
    • Date
    • Thread