Re: [Wonder-disc] D2W ERModernLook - login welcome page
Re: [Wonder-disc] D2W ERModernLook - login welcome page
- Subject: Re: [Wonder-disc] D2W ERModernLook - login welcome page
- From: David Holt <email@hidden>
- Date: Wed, 23 Mar 2011 17:27:41 -0700
Hi Matthias,
I don't have time to expand on this previous message below, but for your welcome page you'll want to use a named pageConfiguration with the rules like David LeBer outlines in this message from last year. If you're still having issues let me/us know and I'll help you more tomorrow.
Replace "Foo" with "Welcome" and I think you should be most of the way there :-)
David
> I want to create content (WOComponent) inside of the PageWrapper. The
> PageWrapper requires a bodyClass, d2wContext, etc. My WOComponent is
> not extending D2W, so I was wondering what was the informed opinion on
> how to do this correctly.
The current implementation of ERModernMoviesDemo (and the ERModern D2W Template) assumes that you are going to have a valid D2WContext for every page in the app. Yeah, I know, shoot me.
Given that a D2WContext really needs three things to display a page:
1. An Entity.
2. A task
3. The template for the task.
We can set up some rules to fudge this. Assuming we have a page named 'MyFooPage.wo' that inherits from D2WPage (we won't use any of D2WPage's features, just it's D2WContext), and we want a Tab named "Foo" to trigger it.
1. Add Foo to the NavigationMenu.plist:
{ name = "Foo"; action = "session.navController.goToFooPage"; },
2. Add a goToFooPage method in the navigation controller:
public WOComponent goToFooPage() {
return D2W.factory().pageForConfigurationNamed("DoThatFooThatYouDo", session());
}
3. Add Foo to Localizable.strings
"Nav.Foo" = "Foo";
4. Add the rules to fudge this page:
100: pageConfiguration = 'DoThatFooThatYouDo' => entity = "AValidEntityFromYourModel" [EntityAssignment]*
100: pageConfiguration = 'DoThatFooThatYouDo' => task = "inspect" [Assignment]
100: pageConfiguration = 'DoThatFooThatYouDo' => templateNameForInspectPage = "MyFooPage" [Assignment]
5. Set the navigation state:
100: pageConfiguration = 'DoThatFooThatYouDo' => navigationState = "Foo" [Assignment]
* AValidEntityFromYourModel does not have to be an Entity you are going to use on your page, we just need it to make the D2WContext happy.
The css class of the body tag on your page will be "DoThatFooThatYouDoBody"
On 2011-03-23, at 4:59 PM, Matthias Jakob wrote:
> Hi David,
> 1 thank you for ERModernLook ;-) !
>
> Yes i ve done that but i don't know how to integrate header etc. so that it's an embedded page ... and also the right selected navigation -> home
>
>
> Matthias
>
>
>
> Am 24.03.2011 um 00:34 schrieb David LeBer:
>
>>
>> On 2011-03-23, at 7:25 PM, Matthias Jakob wrote:
>>
>>> Hi list,
>>> I've a small problem with ERModernLook and defaultPage.
>>>
>>> I try to show a Welcome page after a successfully login. But I don't know exactly how i can do that.
>>> I've tryed to overwrite the defaultpage with no success ;-(
>>>
>>> I simply need my own small page width an localized welcome message ... thats all ... so how i can do that ... ?
>>
>> Change the loginAction in DirectAction to return your page upon successful login?
>>
>> ;david
>>
>> --
>> David LeBer
>> Codeferous Software
>> 'co-def-er-ous' adj. Literally 'code-bearing'
>> site: http://codeferous.com
>> blog: http://davidleber.net
>> profile: http://www.linkedin.com/in/davidleber
>> twitter: http://twitter.com/rebeld
>> --
>> Toronto Area Cocoa / WebObjects developers group:
>> http://tacow.org
>>
>>
>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________
> Wonder-disc mailing list
> email@hidden
> https://lists.sourceforge.net/lists/listinfo/wonder-disc
_______________________________________________
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