Re: D2W/ERModernLook in non D2W app

2010-08-24 Thread Tim Worman
On Aug 24, 2010, at 5:57 AM, David LeBer wrote:

> 
> On 2010-08-24, at 3:26 AM, Tim Worman wrote:
> 
>> On Jun 10, 2010, at 7:56 AM, David Holt wrote:
>> 
>>> On 2010-06-10, at 7:44 AM, "Andrew R. Kinnie"  wrote:
>>> 
 OK . . . I started typing that in, and realized something I missed . . . I 
 copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the 
 ERModernDefaultSkin d2w.d2wmodel file into the skin.
 
 Now it works.  Mostly.  The tab panel's tabs are not tabs, but rather 
 strings running together.
>>> 
>>> This one is easy ;-)
>>> 
>>> If you edit the localizable strings file you will see that the words needs 
>>> to be wrapped in  tags. CSS issue. See demo for examples. Also, check 
>>> the archives of this and the wonder list where David explains what is going 
>>> on here.
>>> 
>>> David
>> 
>> I'm just following up on this because now I'm having the same problem. I've 
>> edited the localizable.strings file with my two entities, Jobs and 
>> Employees, however, I'm still getting just strings where the tabs should be. 
>> I also included this in my properties file:
>> 
>> ERXNavigationManager.localizeDisplayKeys=true
>> 
>> I have the exact same configuration working in a separate app but not with 
>> the D2W functionality in my existing app. I'm probably just missing 
>> something because I've burned through the midnight oil.
> 
> You no longer need to do the localized string mambo, just set this property:
> 
> er.extensions.ERXNavigationManager.includeLabelSpanTag=true
> 
> ;david
> 

Awesome! Thanks so much.

Tim Worman
UCLA GSE&IS ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: D2W/ERModernLook in non D2W app

2010-08-24 Thread David LeBer

On 2010-08-24, at 3:26 AM, Tim Worman wrote:

> On Jun 10, 2010, at 7:56 AM, David Holt wrote:
> 
>> On 2010-06-10, at 7:44 AM, "Andrew R. Kinnie"  wrote:
>> 
>>> OK . . . I started typing that in, and realized something I missed . . . I 
>>> copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the 
>>> ERModernDefaultSkin d2w.d2wmodel file into the skin.
>>> 
>>> Now it works.  Mostly.  The tab panel's tabs are not tabs, but rather 
>>> strings running together.
>> 
>> This one is easy ;-)
>> 
>> If you edit the localizable strings file you will see that the words needs 
>> to be wrapped in  tags. CSS issue. See demo for examples. Also, check 
>> the archives of this and the wonder list where David explains what is going 
>> on here.
>> 
>> David
> 
> I'm just following up on this because now I'm having the same problem. I've 
> edited the localizable.strings file with my two entities, Jobs and Employees, 
> however, I'm still getting just strings where the tabs should be. I also 
> included this in my properties file:
> 
> ERXNavigationManager.localizeDisplayKeys=true
> 
> I have the exact same configuration working in a separate app but not with 
> the D2W functionality in my existing app. I'm probably just missing something 
> because I've burned through the midnight oil.

You no longer need to do the localized string mambo, just set this property:

er.extensions.ERXNavigationManager.includeLabelSpanTag=true

;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




 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: D2W/ERModernLook in non D2W app

2010-08-24 Thread Tim Worman
On Jun 10, 2010, at 7:56 AM, David Holt wrote:

> On 2010-06-10, at 7:44 AM, "Andrew R. Kinnie"  wrote:
> 
>> OK . . . I started typing that in, and realized something I missed . . . I 
>> copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the 
>> ERModernDefaultSkin d2w.d2wmodel file into the skin.
>> 
>> Now it works.  Mostly.  The tab panel's tabs are not tabs, but rather 
>> strings running together.
> 
> This one is easy ;-)
> 
> If you edit the localizable strings file you will see that the words needs to 
> be wrapped in  tags. CSS issue. See demo for examples. Also, check the 
> archives of this and the wonder list where David explains what is going on 
> here.
> 
> David

I'm just following up on this because now I'm having the same problem. I've 
edited the localizable.strings file with my two entities, Jobs and Employees, 
however, I'm still getting just strings where the tabs should be. I also 
included this in my properties file:

ERXNavigationManager.localizeDisplayKeys=true

I have the exact same configuration working in a separate app but not with the 
D2W functionality in my existing app. I'm probably just missing something 
because I've burned through the midnight oil.

T

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: D2W/ERModernLook in non D2W app

2010-06-10 Thread Andrew R. Kinnie
Yeah, the problem is I saw that, and actually also copied the English.lproj 
directory (I had forgotten that, did it a while ago) and edited the 
Localizable.strings

{
  "Nav.Entity1s" = "Entity1";
...
  
  "ERD2W.advancedFindButtonLabel" = "Advanced...";
  
}

I also tried it with Entity1 rather than the plural.  (basing it one the 
NavigationMenu.plist.  I am not 100% clear on the association between this and 
the rule file.

Anyway, apparently there is also an 
ERXNavigationManager.localizeDisplayKeys=true that I needed to set in 
Properties.  NOW the tabs appear.

WOO HOO!

OK, so, to add it to an existing project, you need to:

1. Created a new framework (for your custom version of the default skin)
2. Copy the WSR from ERModernDefaultSkin into the new skin framework.
3. Add er.modern.look.skinframework = MySkin to the skin's Properties file in 
resources
4. Copy the d2w.d2wmodel file from the default skin into the new skin's 
resources folder
5. Add the skin to the project.
If based on ERModernMoviesDemo:
6. Copy the user.d2wmodel file from ERModernMoviesDemo into the app's resources 
(modifying it so it displayed the proper entities instead of movies)
7. Copy the Session, DirectAction and Application contents from 
ERModernMoviesDemo into my app (making appropriate changes to the package etc)
8. Copy the contents of PageWrapper into my own PageWrapper (and changed the 
rule to have pageWrapperName point to the new wrapper) - including wod and html
9. If you want copy the MenuHeader or I replace the MenuHeader in the wrapper 
with the ERXNavigationMenu and add the navigationContext method from the 
MenuHeader class in ERModernMoviesDemo
10. Copy the NavigationMenu.plist from ERModernMoviesDemo into mine, and 
changed the entities appropriately
11. Copy the English.lproj folder from ERModernMoviesDemo to the new project 
and edit the Localizable.strings to display the proper information from the 
NavigationMenu.plist

This seems to have worked for me.  so far.

Thanks to everyone


On Jun 10, 2010, at 10:56 AM, David Holt wrote:

> 
> 
> On 2010-06-10, at 7:44 AM, "Andrew R. Kinnie"  wrote:
> 
>> OK . . . I started typing that in, and realized something I missed . . . I 
>> copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the 
>> ERModernDefaultSkin d2w.d2wmodel file into the skin.
>> 
>> Now it works.  Mostly.  The tab panel's tabs are not tabs, but rather 
>> strings running together.
> 
> This one is easy ;-)
> 
> If you edit the localizable strings file you will see that the words needs to 
> be wrapped in  tags. CSS issue. See demo for examples. Also, check the 
> archives of this and the wonder list where David explains what is going on 
> here.
> 
> David
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: D2W/ERModernLook in non D2W app

2010-06-10 Thread David Holt


On 2010-06-10, at 7:44 AM, "Andrew R. Kinnie"  wrote:

> OK . . . I started typing that in, and realized something I missed . . . I 
> copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the 
> ERModernDefaultSkin d2w.d2wmodel file into the skin.
> 
> Now it works.  Mostly.  The tab panel's tabs are not tabs, but rather strings 
> running together.

This one is easy ;-)

If you edit the localizable strings file you will see that the words needs to 
be wrapped in  tags. CSS issue. See demo for examples. Also, check the 
archives of this and the wonder list where David explains what is going on here.

David

>  MASSIVE progress.  At least enough to prevent me from any immediate need to 
> quit my job and become a tibetan monk.
> 
> In short (!?!?):
> I went back and created a new framework (for my skin)
> I copied the WSR from ERModernDefaultSkin into my new skin framework.
> I added er.modern.look.skinframework = MySkin to my Properties file in the 
> skin
> I added the skin to my project.
> I copied the user.d2wmodel file from ERModernMoviesDemo into my app 
> (modifying it so it displayed my entities instead of movies)
> I copied the Session from ERModernMoviesDemo into my app (making appropriate 
> changes to the package etc)
> I copied Application and DirectAction as well (even though my login probably 
> won't use direct action when I get around to using it.  Though I might.  
> That's a future problem).
> I copied the contents of PageWrapper into my own AdminPageWrapper (and 
> changed the rule to have pageWrapperName point to it) - including wod and html
> I replaced MenuHeader with the ERXNavigationMenu and added the 
> navigationContext method from the MenuHeader class in ERModernMoviesDemo
> I copied the NavigationMenu.plist from ERModernMoviesDemo into mine, and 
> changed the entities appropriately (as far as I am able to tell).
> 
> Same problem.  While searching for plane ticket prices to tibet, I got this 
> message, and started (again) going through the steps and discovered that I 
> had copied the wrong d2w.d2wmodel file into my skin.  
> 
> Once I copied the one from the default look into my skin, it now 
> WORKS!!!.  again, except for the tabs, which work, but do not look like 
> tabs.  I assume there is some config issue I am missing there too.
> 
> So, in light of that, I notice the rules file has rules which contain plural 
> versions of the entities (apparently in the navigationState) instead of 
> singular (which match the actual entity names).  I assume my tab issue is 
> there somewhere.  I thought I changed it to match it up, but I'm a bit 
> confused by what is simply a label for the tab, and which is supposed to be 
> entity names, and which I need to change.  I'll keep plugging.
> 
> Thanks again (even when this time it was mainly just telling me to step back 
> and look again step by step)
> 
> Andrew
> 
> On Jun 10, 2010, at 10:08 AM, David Holt wrote:
> 
>> 
>> 
>> On 2010-06-10, at 6:51 AM, "Andrew R. Kinnie"  wrote:
>> 
>>> OK, I just redid everything,
>> 
>> Can you tell us what steps this means?
>> 
>> David
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: D2W/ERModernLook in non D2W app

2010-06-10 Thread Ramsey Gurley


On Jun 10, 2010, at 10:36 AM, Ramsey Gurley wrote:

Instead of thinking of it as embedding D2W into your app, I think it  
may help if you look at as embedding your app into D2W.


Let me explain that.  You say you want to take your existing wrapper  
and embed the D2W admin stuff into the ajax update container.  The  
thing is, the wrapper is a subcomponent of your Main page.  You  
probably know this already, but I found it really counter-intuitive  
until I saw this diagram:


http://developer.apple.com/legacy/mac/library/documentation/WebObjects/Developing_With_D2W/Architecture/Architecture.html#/ 
/apple_ref/doc/uid/TP30001015-DontLinkChapterID_2-BAJJHJGE


Once I understood that the wrapper is the child, and not the other  
way around, things started to make more sense to me.


Anyway, to load a D2W page into your page wrapper, you either have  
to embed it in your existing page inside the update container or  
load a D2W page in place of your Main. (I'm assuming the update  
container is in your main, and not in your wrapper) If you are new  
to D2W, just linking off to the D2W admin pages will be easiest.   
Those admin pages can even reuse your current page wrapper to keep  
the look of your main site.  All you really need to do to accomplish  
that is to add a wohyperlink on your page that fires an action that  
returns something like


D2W.factory().defaultPage(session());

That puts you on a D2WPage and then it's turtles all the way down  
(^_^)


If you want to use the modern look specifically, that framework  
loads its css resources a little differently than you may expect, so  
looking at how it happens in an empty modern app constructed with  
the modern template should help a lot.  You may need to consult the  
Davids for the particulars there.


The wrapper is just an ordinary component though.  If you're getting  
a null pointer, it's because that wrapper component assumed it would  
always be embedded in a D2W page and that is not the case for you.   
So, it's just your typical debugging mission.  Find where the error  
is happening, and don't let the lack of a D2W context cause a crash  
for your non-D2W main component.  It could be as simple as


if(context().page() instanceof D2WPage) {
// D2W dependent code here
}



Note: You could just drop the page wrapper and menu header from the  
template into your app and link off using  
D2W.factory().defaultPage(session()); if merging the wrappers into a  
single wrapper is too much headache.


Good luck and keep us posted on your progress (^_^)

Ramsey




You never needed the modern css on your Main page before, so you  
shouldn't need it now.


The other way involves embedding D2W pages into your page using  
D2WList, D2WInspect, D2WQuery and the like.  The bindings on those  
components are fairly straightforward, but it's going to be more  
work and probably require a somewhat better understanding of D2W.


HTH,

Ramsey

On Jun 10, 2010, at 9:51 AM, Andrew R. Kinnie wrote:

OK, I just redid everything, and got back to exactly the same  
error.  I have essentially no idea at all what to even look at at  
this point.


Andrew

On Jun 9, 2010, at 7:07 PM, David Holt wrote:


Hi Andrew,

On 9-Jun-10, at 3:34 PM, akinnie wrote:


OK, that all makes sense.


:-)

I didn't think I needed a home() method as I was putting it in a  
subcomponent, so I commented it out.


homeAction() is just a name. Don't be confused by that. In this  
case, David arbitrarily made the choice that the homeAction was  
the customary QueryAll page for the ERModernMoviesDemo. It might  
just as easily be a list of users, or a search page for bugs, or  
whatever you want. You just need to call the method from your  
"Admin" tab, whatever it is called. For example you might want to  
call it adminHomePage(). That just doesn't matter.


The D2W.factory().defaultPage called in the homeAction is set in  
the Rules. If you open up the rules for JavaDirectToWeb framework  
you'll find


0 *true* startupTask = "queryAll"

This is what is being used by defaultPage to render the QueryAll  
page component.


If you prefer a different task to be your beginning task, set your  
new 'startupTask' at a higher priority in the rules and make sure  
that you specify a 'startupEntityName' as well (any task other  
than queryAll acts on an entity).


The Factory class in BugTracker gives you all sorts of options for  
actions that you could call from your navigation scheme (for  
example you could display a qualified list of entities based on  
your logged in user). This is where ERXThreadStorage comes in  
handy because it is accessible from your EOs.



I think.  I am in school at the moment, so I do have it in front  
of me.  Hopefully, if I'm not a zombie, I'll be able to look at  
it after 10:30 tonight.


Thanks to you and Ramsey for all your help. . . not to suggest I  
won't need more tomorrow.


Not a problem. It is my hope that I can be of some help!

David



Andr

Re: D2W/ERModernLook in non D2W app

2010-06-10 Thread Andrew R. Kinnie
OK . . . I started typing that in, and realized something I missed . . . I 
copied the ERModernMoviesDemo d2w.d2wmodel file, but did not copy the 
ERModernDefaultSkin d2w.d2wmodel file into the skin.

Now it works.  Mostly.  The tab panel's tabs are not tabs, but rather strings 
running together.  MASSIVE progress.  At least enough to prevent me from any 
immediate need to quit my job and become a tibetan monk.

In short (!?!?):
I went back and created a new framework (for my skin)
I copied the WSR from ERModernDefaultSkin into my new skin framework.
I added er.modern.look.skinframework = MySkin to my Properties file in the skin
I added the skin to my project.
I copied the user.d2wmodel file from ERModernMoviesDemo into my app (modifying 
it so it displayed my entities instead of movies)
I copied the Session from ERModernMoviesDemo into my app (making appropriate 
changes to the package etc)
I copied Application and DirectAction as well (even though my login probably 
won't use direct action when I get around to using it.  Though I might.  That's 
a future problem).
I copied the contents of PageWrapper into my own AdminPageWrapper (and changed 
the rule to have pageWrapperName point to it) - including wod and html
I replaced MenuHeader with the ERXNavigationMenu and added the 
navigationContext method from the MenuHeader class in ERModernMoviesDemo
I copied the NavigationMenu.plist from ERModernMoviesDemo into mine, and 
changed the entities appropriately (as far as I am able to tell).

Same problem.  While searching for plane ticket prices to tibet, I got this 
message, and started (again) going through the steps and discovered that I had 
copied the wrong d2w.d2wmodel file into my skin.  

Once I copied the one from the default look into my skin, it now WORKS!!!.  
again, except for the tabs, which work, but do not look like tabs.  I assume 
there is some config issue I am missing there too.

So, in light of that, I notice the rules file has rules which contain plural 
versions of the entities (apparently in the navigationState) instead of 
singular (which match the actual entity names).  I assume my tab issue is there 
somewhere.  I thought I changed it to match it up, but I'm a bit confused by 
what is simply a label for the tab, and which is supposed to be entity names, 
and which I need to change.  I'll keep plugging.

Thanks again (even when this time it was mainly just telling me to step back 
and look again step by step)

Andrew

On Jun 10, 2010, at 10:08 AM, David Holt wrote:

> 
> 
> On 2010-06-10, at 6:51 AM, "Andrew R. Kinnie"  wrote:
> 
>> OK, I just redid everything,
> 
> Can you tell us what steps this means?
> 
> David
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: D2W/ERModernLook in non D2W app

2010-06-10 Thread Ramsey Gurley
Instead of thinking of it as embedding D2W into your app, I think it  
may help if you look at as embedding your app into D2W.


Let me explain that.  You say you want to take your existing wrapper  
and embed the D2W admin stuff into the ajax update container.  The  
thing is, the wrapper is a subcomponent of your Main page.  You  
probably know this already, but I found it really counter-intuitive  
until I saw this diagram:


http://developer.apple.com/legacy/mac/library/documentation/WebObjects/Developing_With_D2W/Architecture/Architecture.html#/ 
/apple_ref/doc/uid/TP30001015-DontLinkChapterID_2-BAJJHJGE


Once I understood that the wrapper is the child, and not the other way  
around, things started to make more sense to me.


Anyway, to load a D2W page into your page wrapper, you either have to  
embed it in your existing page inside the update container or load a  
D2W page in place of your Main. (I'm assuming the update container is  
in your main, and not in your wrapper) If you are new to D2W, just  
linking off to the D2W admin pages will be easiest.  Those admin pages  
can even reuse your current page wrapper to keep the look of your main  
site.  All you really need to do to accomplish that is to add a  
wohyperlink on your page that fires an action that returns something  
like


D2W.factory().defaultPage(session());

That puts you on a D2WPage and then it's turtles all the way down (^_^)

If you want to use the modern look specifically, that framework loads  
its css resources a little differently than you may expect, so looking  
at how it happens in an empty modern app constructed with the modern  
template should help a lot.  You may need to consult the Davids for  
the particulars there.


The wrapper is just an ordinary component though.  If you're getting a  
null pointer, it's because that wrapper component assumed it would  
always be embedded in a D2W page and that is not the case for you.   
So, it's just your typical debugging mission.  Find where the error is  
happening, and don't let the lack of a D2W context cause a crash for  
your non-D2W main component.  It could be as simple as


if(context().page() instanceof D2WPage) {
// D2W dependent code here
}

You never needed the modern css on your Main page before, so you  
shouldn't need it now.


The other way involves embedding D2W pages into your page using  
D2WList, D2WInspect, D2WQuery and the like.  The bindings on those  
components are fairly straightforward, but it's going to be more work  
and probably require a somewhat better understanding of D2W.


HTH,

Ramsey

On Jun 10, 2010, at 9:51 AM, Andrew R. Kinnie wrote:

OK, I just redid everything, and got back to exactly the same  
error.  I have essentially no idea at all what to even look at at  
this point.


Andrew

On Jun 9, 2010, at 7:07 PM, David Holt wrote:


Hi Andrew,

On 9-Jun-10, at 3:34 PM, akinnie wrote:


OK, that all makes sense.


:-)

I didn't think I needed a home() method as I was putting it in a  
subcomponent, so I commented it out.


homeAction() is just a name. Don't be confused by that. In this  
case, David arbitrarily made the choice that the homeAction was the  
customary QueryAll page for the ERModernMoviesDemo. It might just  
as easily be a list of users, or a search page for bugs, or  
whatever you want. You just need to call the method from your  
"Admin" tab, whatever it is called. For example you might want to  
call it adminHomePage(). That just doesn't matter.


The D2W.factory().defaultPage called in the homeAction is set in  
the Rules. If you open up the rules for JavaDirectToWeb framework  
you'll find


0 *true* startupTask = "queryAll"

This is what is being used by defaultPage to render the QueryAll  
page component.


If you prefer a different task to be your beginning task, set your  
new 'startupTask' at a higher priority in the rules and make sure  
that you specify a 'startupEntityName' as well (any task other than  
queryAll acts on an entity).


The Factory class in BugTracker gives you all sorts of options for  
actions that you could call from your navigation scheme (for  
example you could display a qualified list of entities based on  
your logged in user). This is where ERXThreadStorage comes in handy  
because it is accessible from your EOs.



I think.  I am in school at the moment, so I do have it in front  
of me.  Hopefully, if I'm not a zombie, I'll be able to look at it  
after 10:30 tonight.


Thanks to you and Ramsey for all your help. . . not to suggest I  
won't need more tomorrow.


Not a problem. It is my hope that I can be of some help!

David



Andrew

On Jun 09, 2010, at 05:27 PM, David Holt   
wrote:



Hi Andrew,

On 9-Jun-10, at 1:12 PM, Andrew R. Kinnie wrote:

yeah, I just noticed that.  I was still doing it the old (Ajaxy)  
way.  I also noticed that I didn't replicate the MenuHeader (and  
instead just included an ERXNavigationMenu directly in Admin),  
so I changed that, and then

Re: D2W/ERModernLook in non D2W app

2010-06-10 Thread David Holt


On 2010-06-10, at 6:51 AM, "Andrew R. Kinnie"  wrote:

> OK, I just redid everything,

Can you tell us what steps this means?

David

> and got back to exactly the same error.  I have essentially no idea at all 
> what to even look at at this point.  
> 
> Andrew
> 
> On Jun 9, 2010, at 7:07 PM, David Holt wrote:
> 
>> Hi Andrew,
>> 
>> On 9-Jun-10, at 3:34 PM, akinnie wrote:
>> 
>>> OK, that all makes sense.
>> 
>> :-)
>> 
>>> I didn't think I needed a home() method as I was putting it in a 
>>> subcomponent, so I commented it out.
>> 
>> homeAction() is just a name. Don't be confused by that. In this case, David 
>> arbitrarily made the choice that the homeAction was the customary QueryAll 
>> page for the ERModernMoviesDemo. It might just as easily be a list of users, 
>> or a search page for bugs, or whatever you want. You just need to call the 
>> method from your "Admin" tab, whatever it is called. For example you might 
>> want to call it adminHomePage(). That just doesn't matter.
>> 
>> The D2W.factory().defaultPage called in the homeAction is set in the Rules. 
>> If you open up the rules for JavaDirectToWeb framework you'll find
>> 
>> 0 *true* startupTask = "queryAll"
>> 
>> This is what is being used by defaultPage to render the QueryAll page 
>> component.
>> 
>> If you prefer a different task to be your beginning task, set your new 
>> 'startupTask' at a higher priority in the rules and make sure that you 
>> specify a 'startupEntityName' as well (any task other than queryAll acts on 
>> an entity).
>> 
>> The Factory class in BugTracker gives you all sorts of options for actions 
>> that you could call from your navigation scheme (for example you could 
>> display a qualified list of entities based on your logged in user). This is 
>> where ERXThreadStorage comes in handy because it is accessible from your EOs.
>> 
>> 
>>> I think.  I am in school at the moment, so I do have it in front of me.  
>>> Hopefully, if I'm not a zombie, I'll be able to look at it after 10:30 
>>> tonight.
>>> 
>>> Thanks to you and Ramsey for all your help. . . not to suggest I won't need 
>>> more tomorrow.
>> 
>> Not a problem. It is my hope that I can be of some help!
>> 
>> David
>> 
>>> 
>>> Andrew
>>> 
>>> On Jun 09, 2010, at 05:27 PM, David Holt  wrote:
>>> 
 Hi Andrew,
 
 On 9-Jun-10, at 1:12 PM, Andrew R. Kinnie wrote:
 
> yeah, I just noticed that.  I was still doing it the old (Ajaxy) way.  I 
> also noticed that I didn't replicate the MenuHeader (and instead just 
> included an ERXNavigationMenu directly in Admin), so I changed that, and 
> then I got a session timed out error.
 
 I don't think you need the menu header unless you want the extra 
 navigation buttons at the top of your header.
 
> 
> I have an admin() method in my Main component (which I use as a wrapper . 
> . . in the non d2w sense, i.e. it's not bound to that key in the rule, 
> it's for general site visitors).  All it did was check which component 
> was loaded as currentPage, and load that into the wrapper's content area. 
>  Obviously not appropriate in this case.  I changed it to just return a 
> WOActionResults which is an instance of Admin.
> 
> That has the same result as before.  NPE because the context is null.
> 
> ERD2WHead.java32  displayNameForPageConfiguration
>   er.directtoweb.components
> 
> 
> How should I do this?
 
 You need to use the D2W Factory to create your admin page. So you first 
 decide what kind of page it is (list of all entities?) and then use the 
 interface to create it.
 
 So if you take a peek in MoviesNavigationController you'll see a bunch of 
 actions such as:
 
 // MOVIES
 
 
 public WOComponent queryMovieAction() {
 return queryPageForEntityName(MOVIE);
 }
 
 
 public WOComponent createMovieAction() {
 return newObjectForEntityName(MOVIE);
 }
 
 
 Which then call:
 
 // GENERIC ACTIONS
 
 
   public WOComponent queryPageForEntityName(String entityName) {
   QueryPageInterface newQueryPage = 
 D2W.factory().queryPageForEntityNamed(entityName, session());
   return (WOComponent) newQueryPage;
   }
 
   public WOComponent newObjectForEntityName(String entityName) {
   WOComponent nextPage = null;
   try {
   EditPageInterface epi = 
 D2W.factory().editPageForNewObjectWithEntityNamed(entityName, session());
   epi.setNextPage(session().context().page());
   nextPage = (WOComponent) epi;
   } catch (IllegalArgumentException e) {
   ErrorPageInterface epf = D2W.factory().errorPage(session());
   epf.setMessage(e.toString());
   epf.setNextPage(session().context().page());
   nextPage = (WOComponent) epf;
   }
   retu

Re: D2W/ERModernLook in non D2W app

2010-06-10 Thread Andrew R. Kinnie
OK, I just redid everything, and got back to exactly the same error.  I have 
essentially no idea at all what to even look at at this point.  

Andrew

On Jun 9, 2010, at 7:07 PM, David Holt wrote:

> Hi Andrew,
> 
> On 9-Jun-10, at 3:34 PM, akinnie wrote:
> 
>> OK, that all makes sense.
> 
> :-)
> 
>> I didn't think I needed a home() method as I was putting it in a 
>> subcomponent, so I commented it out.
> 
> homeAction() is just a name. Don't be confused by that. In this case, David 
> arbitrarily made the choice that the homeAction was the customary QueryAll 
> page for the ERModernMoviesDemo. It might just as easily be a list of users, 
> or a search page for bugs, or whatever you want. You just need to call the 
> method from your "Admin" tab, whatever it is called. For example you might 
> want to call it adminHomePage(). That just doesn't matter.
> 
> The D2W.factory().defaultPage called in the homeAction is set in the Rules. 
> If you open up the rules for JavaDirectToWeb framework you'll find
> 
> 0 *true* startupTask = "queryAll"
> 
> This is what is being used by defaultPage to render the QueryAll page 
> component.
> 
> If you prefer a different task to be your beginning task, set your new 
> 'startupTask' at a higher priority in the rules and make sure that you 
> specify a 'startupEntityName' as well (any task other than queryAll acts on 
> an entity).
> 
> The Factory class in BugTracker gives you all sorts of options for actions 
> that you could call from your navigation scheme (for example you could 
> display a qualified list of entities based on your logged in user). This is 
> where ERXThreadStorage comes in handy because it is accessible from your EOs.
> 
> 
>> I think.  I am in school at the moment, so I do have it in front of me.  
>> Hopefully, if I'm not a zombie, I'll be able to look at it after 10:30 
>> tonight.
>> 
>> Thanks to you and Ramsey for all your help. . . not to suggest I won't need 
>> more tomorrow.
> 
> Not a problem. It is my hope that I can be of some help!
> 
> David
> 
>> 
>> Andrew
>> 
>> On Jun 09, 2010, at 05:27 PM, David Holt  wrote:
>> 
>>> Hi Andrew,
>>> 
>>> On 9-Jun-10, at 1:12 PM, Andrew R. Kinnie wrote:
>>> 
 yeah, I just noticed that.  I was still doing it the old (Ajaxy) way.  I 
 also noticed that I didn't replicate the MenuHeader (and instead just 
 included an ERXNavigationMenu directly in Admin), so I changed that, and 
 then I got a session timed out error.
>>> 
>>> I don't think you need the menu header unless you want the extra navigation 
>>> buttons at the top of your header.
>>> 
 
 I have an admin() method in my Main component (which I use as a wrapper . 
 . . in the non d2w sense, i.e. it's not bound to that key in the rule, 
 it's for general site visitors).  All it did was check which component was 
 loaded as currentPage, and load that into the wrapper's content area.  
 Obviously not appropriate in this case.  I changed it to just return a 
 WOActionResults which is an instance of Admin.
 
 That has the same result as before.  NPE because the context is null.
 
 ERD2WHead.java 32  displayNameForPageConfiguration
er.directtoweb.components
 
 
 How should I do this?
>>> 
>>> You need to use the D2W Factory to create your admin page. So you first 
>>> decide what kind of page it is (list of all entities?) and then use the 
>>> interface to create it.
>>> 
>>> So if you take a peek in MoviesNavigationController you'll see a bunch of 
>>> actions such as:
>>> 
>>> // MOVIES
>>> 
>>> 
>>> public WOComponent queryMovieAction() {
>>> return queryPageForEntityName(MOVIE);
>>> }
>>> 
>>> 
>>> public WOComponent createMovieAction() {
>>> return newObjectForEntityName(MOVIE);
>>> }
>>> 
>>> 
>>> Which then call:
>>> 
>>> // GENERIC ACTIONS
>>> 
>>> 
>>>public WOComponent queryPageForEntityName(String entityName) {
>>>QueryPageInterface newQueryPage = 
>>> D2W.factory().queryPageForEntityNamed(entityName, session());
>>>return (WOComponent) newQueryPage;
>>>}
>>> 
>>>public WOComponent newObjectForEntityName(String entityName) {
>>>WOComponent nextPage = null;
>>>try {
>>>EditPageInterface epi = 
>>> D2W.factory().editPageForNewObjectWithEntityNamed(entityName, session());
>>>epi.setNextPage(session().context().page());
>>>nextPage = (WOComponent) epi;
>>>} catch (IllegalArgumentException e) {
>>>ErrorPageInterface epf = D2W.factory().errorPage(session());
>>>epf.setMessage(e.toString());
>>>epf.setNextPage(session().context().page());
>>>nextPage = (WOComponent) epf;
>>>}
>>>return nextPage;
>>>}
>>> 
>>> If you just want to try out your Admin page, try the homeAction() from the 
>>> controller. It should work out of the box to create your QueryAll page. If 
>>> it doesn't work, then we'll know you'

Re: D2W/ERModernLook in non D2W app

2010-06-10 Thread Andrew R. Kinnie
Well, evidently, I need to start from scratch, because none of these changes 
made a whit of difference.  I still get no d2wcontext, and get the same NPE.  

I wish I knew what it was that I broke, so this would seem less like black box 
magic and I had any understanding of it to fix my own issues.  C'est la vie, I 
guess.

On Jun 9, 2010, at 7:07 PM, David Holt wrote:

> Hi Andrew,
> 
> On 9-Jun-10, at 3:34 PM, akinnie wrote:
> 
>> OK, that all makes sense.
> 
> :-)
> 
>> I didn't think I needed a home() method as I was putting it in a 
>> subcomponent, so I commented it out.
> 
> homeAction() is just a name. Don't be confused by that. In this case, David 
> arbitrarily made the choice that the homeAction was the customary QueryAll 
> page for the ERModernMoviesDemo. It might just as easily be a list of users, 
> or a search page for bugs, or whatever you want. You just need to call the 
> method from your "Admin" tab, whatever it is called. For example you might 
> want to call it adminHomePage(). That just doesn't matter.
> 
> The D2W.factory().defaultPage called in the homeAction is set in the Rules. 
> If you open up the rules for JavaDirectToWeb framework you'll find
> 
> 0 *true* startupTask = "queryAll"
> 
> This is what is being used by defaultPage to render the QueryAll page 
> component.
> 
> If you prefer a different task to be your beginning task, set your new 
> 'startupTask' at a higher priority in the rules and make sure that you 
> specify a 'startupEntityName' as well (any task other than queryAll acts on 
> an entity).
> 
> The Factory class in BugTracker gives you all sorts of options for actions 
> that you could call from your navigation scheme (for example you could 
> display a qualified list of entities based on your logged in user). This is 
> where ERXThreadStorage comes in handy because it is accessible from your EOs.
> 
> 
>> I think.  I am in school at the moment, so I do have it in front of me.  
>> Hopefully, if I'm not a zombie, I'll be able to look at it after 10:30 
>> tonight.
>> 
>> Thanks to you and Ramsey for all your help. . . not to suggest I won't need 
>> more tomorrow.
> 
> Not a problem. It is my hope that I can be of some help!
> 
> David
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread Jim Murry

This worked perfectly.



Try something like

D2WPage page = (D2WPage)D2W.factory().defaultPage(session());
D2WContext c = page.d2wContext();
EODatabaseDataSource ds = new  
EODatabaseDataSource(session().defaultEditingContext(),  
c.entity().name());

page.setDataSource(ds);
return page;


 Thank you.

On Jun 9, 2010, at 6:42 PM, Ramsey Lee Gurley wrote:



On Jun 9, 2010, at 8:31 PM, Jim Murry wrote:



On Jun 9, 2010, at 4:07 PM, David Holt wrote:


Hi Andrew,

On 9-Jun-10, at 3:34 PM, akinnie wrote:


OK, that all makes sense.


:-)

I didn't think I needed a home() method as I was putting it in a  
subcomponent, so I commented it out.


homeAction() is just a name. Don't be confused by that. In this  
case, David arbitrarily made the choice that the homeAction was  
the customary QueryAll page for the ERModernMoviesDemo. It might  
just as easily be a list of users, or a search page for bugs, or  
whatever you want. You just need to call the method from your  
"Admin" tab, whatever it is called. For example you might want to  
call it adminHomePage(). That just doesn't matter.


The D2W.factory().defaultPage called in the homeAction is set in  
the Rules. If you open up the rules for JavaDirectToWeb framework  
you'll find


0 *true* startupTask = "queryAll"

This is what is being used by defaultPage to render the QueryAll  
page component.


If you prefer a different task to be your beginning task, set your  
new 'startupTask' at a higher priority in the rules and make sure  
that you specify a 'startupEntityName' as well (any task other  
than queryAll acts on an entity).


I have tried this just briefly:

100 *true* startupTask = "list"
100 *true* startupEntityName = "Customer"

I get an error "No matching ? records found.", I am sure it is  
because there is not a query defined for the list.  Where is the  
most appropriate spot in which to add a qualifier for the list?  Is  
the Factory class the most appropriate spot?  I have not mucked in  
the Factory class and would not quite know where to start.


Thank you.



Try something like

D2WPage page = (D2WPage)D2W.factory().defaultPage(session());
D2WContext c = page.d2wContext();
EODatabaseDataSource ds = new  
EODatabaseDataSource(session().defaultEditingContext(),  
c.entity().name());

page.setDataSource(ds);
return page;






The Factory class in BugTracker gives you all sorts of options for  
actions that you could call from your navigation scheme (for  
example you could display a qualified list of entities based on  
your logged in user). This is where ERXThreadStorage comes in  
handy because it is accessible from your EOs.



I think.  I am in school at the moment, so I do have it in front  
of me.  Hopefully, if I'm not a zombie, I'll be able to look at  
it after 10:30 tonight.


Thanks to you and Ramsey for all your help. . . not to suggest I  
won't need more tomorrow.


Not a problem. It is my hope that I can be of some help!

David



Andrew

On Jun 09, 2010, at 05:27 PM, David Holt   
wrote:



Hi Andrew,

On 9-Jun-10, at 1:12 PM, Andrew R. Kinnie wrote:

yeah, I just noticed that.  I was still doing it the old  
(Ajaxy) way.  I also noticed that I didn't replicate the  
MenuHeader (and instead just included an ERXNavigationMenu  
directly in Admin), so I changed that, and then I got a session  
timed out error.


I don't think you need the menu header unless you want the extra  
navigation buttons at the top of your header.




I have an admin() method in my Main component (which I use as a  
wrapper . . . in the non d2w sense, i.e. it's not bound to that  
key in the rule, it's for general site visitors).  All it did  
was check which component was loaded as currentPage, and load  
that into the wrapper's content area.  Obviously not  
appropriate in this case.  I changed it to just return a  
WOActionResults which is an instance of Admin.


That has the same result as before.  NPE because the context is  
null.


ERD2WHead.java  32  displayNameForPageConfiguration
er.directtoweb.components


How should I do this?


You need to use the D2W Factory to create your admin page. So  
you first decide what kind of page it is (list of all entities?)  
and then use the interface to create it.


So if you take a peek in MoviesNavigationController you'll see a  
bunch of actions such as:


// MOVIES


public WOComponent queryMovieAction() {
return queryPageForEntityName(MOVIE);
}


public WOComponent createMovieAction() {
return newObjectForEntityName(MOVIE);
}


Which then call:

// GENERIC ACTIONS


  public WOComponent queryPageForEntityName(String entityName) {
  QueryPageInterface newQueryPage =  
D2W.factory().queryPageForEntityNamed(entityName, session());

  return (WOComponent) newQueryPage;
  }

  public WOComponent newObjectForEntityName(String  
entityName) {

  WOComponent nextPage = null;
  try {
  EditPageInterface epi =  
D2W.factory().editPageForNewObjectWithEntit

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread Ramsey Lee Gurley

On Jun 9, 2010, at 8:31 PM, Jim Murry wrote:

> 
> On Jun 9, 2010, at 4:07 PM, David Holt wrote:
> 
>> Hi Andrew,
>> 
>> On 9-Jun-10, at 3:34 PM, akinnie wrote:
>> 
>>> OK, that all makes sense.
>> 
>> :-)
>> 
>>> I didn't think I needed a home() method as I was putting it in a 
>>> subcomponent, so I commented it out.
>> 
>> homeAction() is just a name. Don't be confused by that. In this case, David 
>> arbitrarily made the choice that the homeAction was the customary QueryAll 
>> page for the ERModernMoviesDemo. It might just as easily be a list of users, 
>> or a search page for bugs, or whatever you want. You just need to call the 
>> method from your "Admin" tab, whatever it is called. For example you might 
>> want to call it adminHomePage(). That just doesn't matter.
>> 
>> The D2W.factory().defaultPage called in the homeAction is set in the Rules. 
>> If you open up the rules for JavaDirectToWeb framework you'll find
>> 
>> 0 *true* startupTask = "queryAll"
>> 
>> This is what is being used by defaultPage to render the QueryAll page 
>> component.
>> 
>> If you prefer a different task to be your beginning task, set your new 
>> 'startupTask' at a higher priority in the rules and make sure that you 
>> specify a 'startupEntityName' as well (any task other than queryAll acts on 
>> an entity).
> 
> I have tried this just briefly:
> 
>   100 *true* startupTask = "list"
>   100 *true* startupEntityName = "Customer"
> 
> I get an error "No matching ? records found.", I am sure it is because there 
> is not a query defined for the list.  Where is the most appropriate spot in 
> which to add a qualifier for the list?  Is the Factory class the most 
> appropriate spot?  I have not mucked in the Factory class and would not quite 
> know where to start.
> 
> Thank you.


Try something like

D2WPage page = (D2WPage)D2W.factory().defaultPage(session());
D2WContext c = page.d2wContext();
EODatabaseDataSource ds = new 
EODatabaseDataSource(session().defaultEditingContext(), c.entity().name());
page.setDataSource(ds);
return page;


> 
>> 
>> The Factory class in BugTracker gives you all sorts of options for actions 
>> that you could call from your navigation scheme (for example you could 
>> display a qualified list of entities based on your logged in user). This is 
>> where ERXThreadStorage comes in handy because it is accessible from your EOs.
>> 
>> 
>>> I think.  I am in school at the moment, so I do have it in front of me.  
>>> Hopefully, if I'm not a zombie, I'll be able to look at it after 10:30 
>>> tonight.
>>> 
>>> Thanks to you and Ramsey for all your help. . . not to suggest I won't need 
>>> more tomorrow.
>> 
>> Not a problem. It is my hope that I can be of some help!
>> 
>> David
>> 
>>> 
>>> Andrew
>>> 
>>> On Jun 09, 2010, at 05:27 PM, David Holt  wrote:
>>> 
 Hi Andrew,
 
 On 9-Jun-10, at 1:12 PM, Andrew R. Kinnie wrote:
 
> yeah, I just noticed that.  I was still doing it the old (Ajaxy) way.  I 
> also noticed that I didn't replicate the MenuHeader (and instead just 
> included an ERXNavigationMenu directly in Admin), so I changed that, and 
> then I got a session timed out error.
 
 I don't think you need the menu header unless you want the extra 
 navigation buttons at the top of your header.
 
> 
> I have an admin() method in my Main component (which I use as a wrapper . 
> . . in the non d2w sense, i.e. it's not bound to that key in the rule, 
> it's for general site visitors).  All it did was check which component 
> was loaded as currentPage, and load that into the wrapper's content area. 
>  Obviously not appropriate in this case.  I changed it to just return a 
> WOActionResults which is an instance of Admin.
> 
> That has the same result as before.  NPE because the context is null.
> 
> ERD2WHead.java32  displayNameForPageConfiguration
>   er.directtoweb.components
> 
> 
> How should I do this?
 
 You need to use the D2W Factory to create your admin page. So you first 
 decide what kind of page it is (list of all entities?) and then use the 
 interface to create it.
 
 So if you take a peek in MoviesNavigationController you'll see a bunch of 
 actions such as:
 
 // MOVIES
 
 
 public WOComponent queryMovieAction() {
 return queryPageForEntityName(MOVIE);
 }
 
 
 public WOComponent createMovieAction() {
 return newObjectForEntityName(MOVIE);
 }
 
 
 Which then call:
 
 // GENERIC ACTIONS
 
 
public WOComponent queryPageForEntityName(String entityName) {
QueryPageInterface newQueryPage = 
 D2W.factory().queryPageForEntityNamed(entityName, session());
return (WOComponent) newQueryPage;
}
 
public WOComponent newObjectForEntityName(String entityName) {
WOComponent nextPage = null;
  

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread David Holt
Hi Jim,

On 2010-06-09, at 5:31 PM, Jim Murry wrote:

>> If you prefer a different task to be your beginning task, set your new 
>> 'startupTask' at a higher priority in the rules and make sure that you 
>> specify a 'startupEntityName' as well (any task other than queryAll acts on 
>> an entity).
> 
> I have tried this just briefly:
> 
>   100 *true* startupTask = "list"
>   100 *true* startupEntityName = "Customer"

Interesting. If you use "Query" as your startupTask it will work. I'll see if I 
can find an answer if someone doesn't beat me to it. You are probably right, 
you likely need to set a data source for a list and probably a specific entity 
if you plan to edit one. I don't know off-hand if that can be done with rules 
or not.

I don't think I'd recommend using this strategy for a navigation tab anyway, 
you have more control if you explicitly set what you want your action to do in 
your navigationController (or equivalent) anyway.

David

> 
> I get an error "No matching ? records found.", I am sure it is because there 
> is not a query defined for the list.  Where is the most appropriate spot in 
> which to add a qualifier for the list?  Is the Factory class the most 
> appropriate spot?  I have not mucked in the Factory class and would not quite 
> know where to start.
> 
> Thank you.

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread David Holt

Hi Andrew,

On 9-Jun-10, at 3:34 PM, akinnie wrote:


OK, that all makes sense.


:-)

I didn't think I needed a home() method as I was putting it in a  
subcomponent, so I commented it out.


homeAction() is just a name. Don't be confused by that. In this case,  
David arbitrarily made the choice that the homeAction was the  
customary QueryAll page for the ERModernMoviesDemo. It might just as  
easily be a list of users, or a search page for bugs, or whatever you  
want. You just need to call the method from your "Admin" tab,  
whatever it is called. For example you might want to call it  
adminHomePage(). That just doesn't matter.


The D2W.factory().defaultPage called in the homeAction is set in the  
Rules. If you open up the rules for JavaDirectToWeb framework you'll  
find


0 *true* startupTask = "queryAll"

This is what is being used by defaultPage to render the QueryAll page  
component.


If you prefer a different task to be your beginning task, set your  
new 'startupTask' at a higher priority in the rules and make sure  
that you specify a 'startupEntityName' as well (any task other than  
queryAll acts on an entity).


The Factory class in BugTracker gives you all sorts of options for  
actions that you could call from your navigation scheme (for example  
you could display a qualified list of entities based on your logged  
in user). This is where ERXThreadStorage comes in handy because it is  
accessible from your EOs.



I think.  I am in school at the moment, so I do have it in front of  
me.  Hopefully, if I'm not a zombie, I'll be able to look at it  
after 10:30 tonight.


Thanks to you and Ramsey for all your help. . . not to suggest I  
won't need more tomorrow.


Not a problem. It is my hope that I can be of some help!

David



Andrew

On Jun 09, 2010, at 05:27 PM, David Holt   
wrote:



Hi Andrew,

On 9-Jun-10, at 1:12 PM, Andrew R. Kinnie wrote:

yeah, I just noticed that.  I was still doing it the old (Ajaxy)  
way.  I also noticed that I didn't replicate the MenuHeader (and  
instead just included an ERXNavigationMenu directly in Admin), so  
I changed that, and then I got a session timed out error.


I don't think you need the menu header unless you want the extra  
navigation buttons at the top of your header.




I have an admin() method in my Main component (which I use as a  
wrapper . . . in the non d2w sense, i.e. it's not bound to that  
key in the rule, it's for general site visitors).  All it did was  
check which component was loaded as currentPage, and load that  
into the wrapper's content area.  Obviously not appropriate in  
this case.  I changed it to just return a WOActionResults which  
is an instance of Admin.


That has the same result as before.  NPE because the context is  
null.


ERD2WHead.java  32  displayNameForPageConfiguration
er.directtoweb.components


How should I do this?


You need to use the D2W Factory to create your admin page. So you  
first decide what kind of page it is (list of all entities?) and  
then use the interface to create it.


So if you take a peek in MoviesNavigationController you'll see a  
bunch of actions such as:


// MOVIES


public WOComponent queryMovieAction() {
return queryPageForEntityName(MOVIE);
}


public WOComponent createMovieAction() {
return newObjectForEntityName(MOVIE);
}


Which then call:

// GENERIC ACTIONS


public WOComponent queryPageForEntityName(String entityName) {
QueryPageInterface newQueryPage = D2W.factory 
().queryPageForEntityNamed(entityName, session());

return (WOComponent) newQueryPage;
}

public WOComponent newObjectForEntityName(String  
entityName) {

WOComponent nextPage = null;
try {
EditPageInterface epi = D2W.factory 
().editPageForNewObjectWithEntityNamed(entityName, session());

epi.setNextPage(session().context().page());
nextPage = (WOComponent) epi;
} catch (IllegalArgumentException e) {
ErrorPageInterface epf = D2W.factory().errorPage 
(session());

epf.setMessage(e.toString());
epf.setNextPage(session().context().page());
nextPage = (WOComponent) epf;
}
return nextPage;
}

If you just want to try out your Admin page, try the homeAction()  
from the controller. It should work out of the box to create your  
QueryAll page. If it doesn't work, then we'll know you've done  
something wrong with your setup. All the navigation actions called  
in the ERModernMoviesDemo NavigationMenu.plist are routed through  
this controller. If you want a much more detailed look at things  
that are possible, check out the Factory class in the BugTracker  
application.

// NAV ACTIONS


public WOComponent homeAction() {
return D2W.factory().defaultPage(session());
}

David




On Jun 9, 2010, at 4:00 PM, David Holt wrote:


How are you calling the Admin page?

David

On 9-Jun-10, at 12:49 PM, Andrew R. Kinnie wrot

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread akinnie

OK, that all makes sense.  I didn't think I needed a home() method as I was 
putting it in a subcomponent, so I commented it out.  I think.  I am in school 
at the moment, so I do have it in front of me.  Hopefully, if I'm not a zombie, 
I'll be able to look at it after 10:30 tonight.

Thanks to you and Ramsey for all your help. . . not to suggest I won't need 
more tomorrow.

Andrew

On Jun 09, 2010, at 05:27 PM, David Holt  wrote:


Hi Andrew,

On 9-Jun-10, at 1:12 PM, Andrew R. Kinnie wrote:


yeah, I just noticed that.  I was still doing it the old (Ajaxy) way.  I also 
noticed that I didn't replicate the MenuHeader (and instead just included an 
ERXNavigationMenu directly in Admin), so I changed that, and then I got a 
session timed out error.


I don't think you need the menu header unless you want the extra navigation 
buttons at the top of your header.



I have an admin() method in my Main component (which I use as a wrapper . . . 
in the non d2w sense, i.e. it's not bound to that key in the rule, it's for 
general site visitors).  All it did was check which component was loaded as 
currentPage, and load that into the wrapper's content area.  Obviously not 
appropriate in this case.  I changed it to just return a WOActionResults which 
is an instance of Admin.

That has the same result as before.  NPE because the context is null.

ERD2WHead.java  32  displayNameForPageConfiguration
er.directtoweb.components


How should I do this?  


You need to use the D2W Factory to create your admin page. So you first decide 
what kind of page it is (list of all entities?) and then use the interface to 
create it.

So if you take a peek in MoviesNavigationController you'll see a bunch of 
actions such as:

// MOVIES


public WOComponent queryMovieAction() {
return queryPageForEntityName(MOVIE);
}


public WOComponent createMovieAction() {
return newObjectForEntityName(MOVIE);
}


Which then call:

// GENERIC ACTIONS


public WOComponent queryPageForEntityName(String entityName) {
QueryPageInterface newQueryPage = 
D2W.factory().queryPageForEntityNamed(entityName, session());
return (WOComponent) newQueryPage;
}


public WOComponent newObjectForEntityName(String entityName) {

WOComponent nextPage = null;
try {
EditPageInterface epi = 
D2W.factory().editPageForNewObjectWithEntityNamed(entityName, session());
epi.setNextPage(session().context().page());
nextPage = (WOComponent) epi;
} catch (IllegalArgumentException e) {
ErrorPageInterface epf = D2W.factory().errorPage(session());
epf.setMessage(e.toString());
epf.setNextPage(session().context().page());
nextPage = (WOComponent) epf;
}
return nextPage;
}

If you just want to try out your Admin page, try the homeAction() from the controller. It should work out of the box to create your QueryAll page. If it doesn't work, then we'll know you've done something wrong with your setup. All the navigation actions called in the ERModernMoviesDemo NavigationMenu.plist are routed through this controller. If you want a much more detailed look at things that are possible, check out the Factory class in the BugTracker application. 


// NAV ACTIONS


public WOComponent homeAction() {
return D2W.factory().defaultPage(session());
}

David




On Jun 9, 2010, at 4:00 PM, David Holt wrote:


How are you calling the Admin page?

David

On 9-Jun-10, at 12:49 PM, Andrew R. Kinnie wrote:


Sorry, didn't reply all with my last reply.

Begin forwarded message:


Thanks David and Ramsey.  I seem to be having issues, unfortunately.

To clarify, originally, I was planning to have the admin component be a subcomponent within the normal wrapper (by "normal I mean pre-d2w -- not "non"-d2w as I previously suggested.  I meant the site works without d2w, I just thought adding the admin as d2w would be a good way to learn d2w).  Anyway, I attempted to accomplish this by making my Admin component essentially a copy of the PageWrapper from ERModernMoviesDemo . . . but got confused by the head and body stuff.  Now I see that was likely the source of many of my issues.  

So now I am trying to  do exactly what you suggest and open a new window with a page level admin component via D2W.  (restoring the html, head and body tags).  Now, however, when ERD2WHead asks for this: 


   D2WContext context = (D2WContext) 
context().page().valueForKey("d2wContext");

I am getting null.  I have the d2wContext method inside my Admin component (copied from the modern movies demo), and also have the body class method.  


   public D2WContext d2wContext() {
if (context().page() instanceof D2WPage) {
D2WPage d2wPage = (D2WPage) context().page();
return d2wPage.d2wContext();
}
return null;
   }

public String bodyClass() {
String result = null;
String pageConfig = (String)d2wContext().valueForKey("pageConfigur

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread Ramsey Gurley


On Jun 9, 2010, at 3:49 PM, Andrew R. Kinnie wrote:


Sorry, didn't reply all with my last reply.

Begin forwarded message:


Thanks David and Ramsey.  I seem to be having issues, unfortunately.

To clarify, originally, I was planning to have the admin component  
be a subcomponent within the normal wrapper (by "normal I mean pre- 
d2w -- not "non"-d2w as I previously suggested.  I meant the site  
works without d2w, I just thought adding the admin as d2w would be  
a good way to learn d2w).  Anyway, I attempted to accomplish this  
by making my Admin component essentially a copy of the PageWrapper  
from ERModernMoviesDemo . . . but got confused by the head and body  
stuff.  Now I see that was likely the source of many of my issues.


So now I am trying to  do exactly what you suggest and open a new  
window with a page level admin component via D2W.  (restoring the  
html, head and body tags).  Now, however, when ERD2WHead asks for  
this:


   D2WContext context = (D2WContext)  
context().page().valueForKey("d2wContext");


I am getting null.  I have the d2wContext method inside my Admin  
component (copied from the modern movies demo), and also have the  
body class method.


   public D2WContext d2wContext() {
if (context().page() instanceof D2WPage) {
D2WPage d2wPage = (D2WPage) context().page();
return d2wPage.d2wContext();
}
return null;
   }



If you need a context, you can return new D2WContext(session()) here  
instead of null for the stylesheet stuff.  I don't think they rely on  
anything like task or entity, but I could be wrong.





public String bodyClass() {
String result = null;
		String pageConfig =  
(String)d2wContext().valueForKey("pageConfiguration");

if (pageConfig != null && pageConfig.length() > 0) {
result = pageConfig + "Body";
}
return result;
}




This one _may_ flip its wig with that d2wContext. Not totally sure  
(^_^)  If it does, you can simply assign the body class something  
different in the absence of a D2WPage parent.  Your page wrapper is  
just an ordinary component after all.




HTML:

http://www.w3.org/TR/html4/loose.dtd 
">







		"ERD2WDebugFlags" />



  

  
  

  






wod:

ERXNavigationMenu : ERXNavigationMenu {
 navigationContext = navigationContext;
}

MainContent : WOComponentContent {
   _unroll = YES;
}

BodyTag : WOBody {
   class = bodyClass;
}

HeadTag : ERD2WHead {
}

EntitiesMenu : MenuHeader {
}

ERD2WDebugFlags : ERD2WDebugFlags {
   context = d2wContext;
}

IsDebug : WOConditional {
   condition = application.isDevelopmentMode;
}

StyleSheets : ERMD2WCSSReference {
   localContext = d2wContext;
}

WOLToolBar : WOLToolBar {
 expanded = true;
}

ERMD2WStyleSheetInjector : ERMD2WStyleSheetInjector {
 localContext = d2wContext;
}


I still have the rule in my rule file telling the pageWrapperName  
to be "Admin"


Still isn't loading.  I assume there is something else I am  
missing.  (Note I am for now, abandoning doing the subcomponent  
method.)



Add these to your properties file. They may shed some light on that  
subject.


log4j.category.er.directtoweb.rules.ERD2WTraceRuleFiringEnabled=DEBUG
log4j.category.er.directtoweb.rules.pageWrapperName.cache=DEBUG
log4j.category.er.directtoweb.rules.pageWrapperName.candidates=DEBUG
log4j.category.er.directtoweb.rules.pageWrapperName.fire=DEBUG







On Jun 9, 2010, at 3:32 PM, David Holt wrote:


Hi Andrew,

In order to minimize the work that you need to do, I would  
consider rethinking your approach to the admin side. Instead of it  
opening inside your AUC, why don't you have the admin link open up  
a nice full page completely outside your current pagewrapper with  
the unchanged ERModernLook all ready to go?


Your admin link will call something like  
session.navController.adminAction() (see the ModernMoviesDemo for  
examples), and you will include the PageWrapper and MenuHeader  
from the example in your application. Then the D2W rule system  
will find the pagewrapper, menuheader and skin framework required  
to make the complete page. Part of your navigation strategy on the  
Admin/D2W side will need to include a link back to reload the  
"normal" page wrapper.


Once you figure out how D2W ties all this together, it will be  
easier to figure out how to frame it within your original strategy.


If you want to go ahead with your current strategy see further  
notes below...


Also see David LeBer's responses in the thread from a few weeks  
ago which will give you some idea of the complexity involved in  
the opposite problem: "embedding standard 

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread David Holt

How are you calling the Admin page?

David

On 9-Jun-10, at 12:49 PM, Andrew R. Kinnie wrote:


Sorry, didn't reply all with my last reply.

Begin forwarded message:


Thanks David and Ramsey.  I seem to be having issues, unfortunately.

To clarify, originally, I was planning to have the admin component  
be a subcomponent within the normal wrapper (by "normal I mean pre- 
d2w -- not "non"-d2w as I previously suggested.  I meant the site  
works without d2w, I just thought adding the admin as d2w would be  
a good way to learn d2w).  Anyway, I attempted to accomplish this  
by making my Admin component essentially a copy of the PageWrapper  
from ERModernMoviesDemo . . . but got confused by the head and  
body stuff.  Now I see that was likely the source of many of my  
issues.


So now I am trying to  do exactly what you suggest and open a new  
window with a page level admin component via D2W.  (restoring the  
html, head and body tags).  Now, however, when ERD2WHead asks for  
this:


   D2WContext context = (D2WContext) context().page 
().valueForKey("d2wContext");


I am getting null.  I have the d2wContext method inside my Admin  
component (copied from the modern movies demo), and also have the  
body class method.


   public D2WContext d2wContext() {
if (context().page() instanceof D2WPage) {
D2WPage d2wPage = (D2WPage) context().page();
return d2wPage.d2wContext();
}
return null;
   }

public String bodyClass() {
String result = null;
		String pageConfig = (String)d2wContext().valueForKey 
("pageConfiguration");

if (pageConfig != null && pageConfig.length() > 0) {
result = pageConfig + "Body";
}
return result;
}

HTML:

"http://www.w3.org/TR/html4/loose.dtd";>







		"ERD2WDebugFlags" />



  

  
  

  






wod:

ERXNavigationMenu : ERXNavigationMenu {
 navigationContext = navigationContext;
}

MainContent : WOComponentContent {
   _unroll = YES;
}

BodyTag : WOBody {
   class = bodyClass;
}

HeadTag : ERD2WHead {
}

EntitiesMenu : MenuHeader {
}

ERD2WDebugFlags : ERD2WDebugFlags {
   context = d2wContext;
}

IsDebug : WOConditional {
   condition = application.isDevelopmentMode;
}

StyleSheets : ERMD2WCSSReference {
   localContext = d2wContext;
}

WOLToolBar : WOLToolBar {
 expanded = true;
}

ERMD2WStyleSheetInjector : ERMD2WStyleSheetInjector {
 localContext = d2wContext;
}


I still have the rule in my rule file telling the pageWrapperName  
to be "Admin"


Still isn't loading.  I assume there is something else I am  
missing.  (Note I am for now, abandoning doing the subcomponent  
method.)



On Jun 9, 2010, at 3:32 PM, David Holt wrote:


Hi Andrew,

In order to minimize the work that you need to do, I would  
consider rethinking your approach to the admin side. Instead of  
it opening inside your AUC, why don't you have the admin link  
open up a nice full page completely outside your current  
pagewrapper with the unchanged ERModernLook all ready to go?


Your admin link will call something like  
session.navController.adminAction() (see the ModernMoviesDemo for  
examples), and you will include the PageWrapper and MenuHeader  
from the example in your application. Then the D2W rule system  
will find the pagewrapper, menuheader and skin framework required  
to make the complete page. Part of your navigation strategy on  
the Admin/D2W side will need to include a link back to reload the  
"normal" page wrapper.


Once you figure out how D2W ties all this together, it will be  
easier to figure out how to frame it within your original strategy.


If you want to go ahead with your current strategy see further  
notes below...


Also see David LeBer's responses in the thread from a few weeks  
ago which will give you some idea of the complexity involved in  
the opposite problem: "embedding standard components into  
ERModernDirectToWeb"


On 9-Jun-10, at 11:10 AM, Andrew R. Kinnie wrote:

Thanks.  I added a rule in the d2wmodel file for  
pageWrapperName.  However, I managed to discover several other  
problems.


The pagewrapper will need to include a call to the D2W context.  
Every ERModernLook page needs access to this.




My page wrapper was for a non-d2w page and site,


This is a common misconception. There's really no such  
thing as a non-D2W site. You can use as much or as little D2W as  
you wish. Your pages are either created by the D2W factory or  
they're not. Your web application either includes the D2W  
frameworks or it doesn't. Those are the distinctions, rather than  
"D2W App" or "non-D2W app".


and I want the d2w stuff to be a

Fwd: D2W/ERModernLook in non D2W app

2010-06-09 Thread Andrew R. Kinnie
Sorry, didn't reply all with my last reply.

Begin forwarded message:

> Thanks David and Ramsey.  I seem to be having issues, unfortunately.
> 
> To clarify, originally, I was planning to have the admin component be a 
> subcomponent within the normal wrapper (by "normal I mean pre-d2w -- not 
> "non"-d2w as I previously suggested.  I meant the site works without d2w, I 
> just thought adding the admin as d2w would be a good way to learn d2w).  
> Anyway, I attempted to accomplish this by making my Admin component 
> essentially a copy of the PageWrapper from ERModernMoviesDemo . . . but got 
> confused by the head and body stuff.  Now I see that was likely the source of 
> many of my issues.  
> 
> So now I am trying to  do exactly what you suggest and open a new window with 
> a page level admin component via D2W.  (restoring the html, head and body 
> tags).  Now, however, when ERD2WHead asks for this: 
> 
>D2WContext context = (D2WContext) 
> context().page().valueForKey("d2wContext");
> 
> I am getting null.  I have the d2wContext method inside my Admin component 
> (copied from the modern movies demo), and also have the body class method.  
> 
>public D2WContext d2wContext() {
>   if (context().page() instanceof D2WPage) {
>   D2WPage d2wPage = (D2WPage) context().page();
>   return d2wPage.d2wContext();
>   }
>   return null;
>}
> 
>   public String bodyClass() {
>   String result = null;
>   String pageConfig = 
> (String)d2wContext().valueForKey("pageConfiguration");
>   if (pageConfig != null && pageConfig.length() > 0) {
>   result = pageConfig + "Body";
>   }
>   return result;
>   }
> 
> HTML: 
> 
>  "http://www.w3.org/TR/html4/loose.dtd";>
> 
>   
>   
>   
>   
>   
>"ERD2WDebugFlags" />
>   
>   
> 
>   
> 
>  
>   
> 
>   
>   
>   
>   
> 
> 
> wod:
> 
> ERXNavigationMenu : ERXNavigationMenu {
>  navigationContext = navigationContext;
> }
> 
> MainContent : WOComponentContent {
>_unroll = YES;
> }
> 
> BodyTag : WOBody {
>class = bodyClass;
> }
> 
> HeadTag : ERD2WHead {
> }
> 
> EntitiesMenu : MenuHeader {
> }
> 
> ERD2WDebugFlags : ERD2WDebugFlags {
>context = d2wContext;
> }
> 
> IsDebug : WOConditional {
>condition = application.isDevelopmentMode;
> }
> 
> StyleSheets : ERMD2WCSSReference {
>localContext = d2wContext;
> }
> 
> WOLToolBar : WOLToolBar {
>  expanded = true;
> }
> 
> ERMD2WStyleSheetInjector : ERMD2WStyleSheetInjector {
>  localContext = d2wContext;
> }
> 
> 
> I still have the rule in my rule file telling the pageWrapperName to be 
> "Admin"
> 
> Still isn't loading.  I assume there is something else I am missing.  (Note I 
> am for now, abandoning doing the subcomponent method.)
> 
> 
> On Jun 9, 2010, at 3:32 PM, David Holt wrote:
> 
>> Hi Andrew,
>> 
>> In order to minimize the work that you need to do, I would consider 
>> rethinking your approach to the admin side. Instead of it opening inside 
>> your AUC, why don't you have the admin link open up a nice full page 
>> completely outside your current pagewrapper with the unchanged ERModernLook 
>> all ready to go? 
>> 
>> Your admin link will call something like session.navController.adminAction() 
>> (see the ModernMoviesDemo for examples), and you will include the 
>> PageWrapper and MenuHeader from the example in your application. Then the 
>> D2W rule system will find the pagewrapper, menuheader and skin framework 
>> required to make the complete page. Part of your navigation strategy on the 
>> Admin/D2W side will need to include a link back to reload the "normal" page 
>> wrapper.
>> 
>> Once you figure out how D2W ties all this together, it will be easier to 
>> figure out how to frame it within your original strategy.
>> 
>> If you want to go ahead with your current strategy see further notes below...
>> 
>> Also see David LeBer's responses in the thread from a few weeks ago which 
>> will give you some idea of the complexity involved in the opposite problem: 
>> "embedding standard components into ERModernDirectToWeb"
>> 
>> On 9-Jun-10, at 11:10 AM, Andrew R. Kinnie wrote:
>> 
>>> Thanks.  I added a rule in the d2wmodel file for pageWrapperName.  However, 
>>> I managed to discover several other problems.
>> 
>> The pagewrapper will need to include a call to the D2W context. Every 
>> ERModernLook page needs access to this.
>> 
>>> 
>>> My page wrapper was for a non-d2w page and site,
>> 
>> This is a common misconception. There's really no such thing as a 
>> non-D2W site. You can use as much or as little D2W as you wish. Your pages 
>> are either created by the D2W factory or they're not. Your web application

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread David Holt

Hi Andrew,

In order to minimize the work that you need to do, I would consider  
rethinking your approach to the admin side. Instead of it opening  
inside your AUC, why don't you have the admin link open up a nice  
full page completely outside your current pagewrapper with the  
unchanged ERModernLook all ready to go?


Your admin link will call something like  
session.navController.adminAction() (see the ModernMoviesDemo for  
examples), and you will include the PageWrapper and MenuHeader from  
the example in your application. Then the D2W rule system will find  
the pagewrapper, menuheader and skin framework required to make the  
complete page. Part of your navigation strategy on the Admin/D2W side  
will need to include a link back to reload the "normal" page wrapper.


Once you figure out how D2W ties all this together, it will be easier  
to figure out how to frame it within your original strategy.


If you want to go ahead with your current strategy see further notes  
below...


Also see David LeBer's responses in the thread from a few weeks ago  
which will give you some idea of the complexity involved in the  
opposite problem: "embedding standard components into  
ERModernDirectToWeb"


On 9-Jun-10, at 11:10 AM, Andrew R. Kinnie wrote:

Thanks.  I added a rule in the d2wmodel file for pageWrapperName.   
However, I managed to discover several other problems.


The pagewrapper will need to include a call to the D2W context. Every  
ERModernLook page needs access to this.




My page wrapper was for a non-d2w page and site,


This is a common misconception. There's really no such thing  
as a non-D2W site. You can use as much or as little D2W as you wish.  
Your pages are either created by the D2W factory or they're not. Your  
web application either includes the D2W frameworks or it doesn't.  
Those are the distinctions, rather than "D2W App" or "non-D2W app".aside>


and I want the d2w stuff to be a subcomponent of this.  It is very  
simple, I have a header, sidebar navigation, and an  
AjaxUpdateContainer which changes based on what link the user  
clicks on the navigation sidebar.  One of these links is the Admin  
link, which will (I hope) cause the D2W stuff to be loaded into the  
AjaxUpdateContainer, without disturbing anything else.


Your PageWrapper component will need to provide the D2WContext. If  
you plan to go with ERModernLook you're going to have to look  
carefully at the CSS. I am pretty sure that it also depends on the  
body class being in your PageWrapper.




I therefore made my Admin component into the "pageWrapperName" for  
the purposes of the D2W rule, and created it based on the  
pageWrapper from ERModernMoviesDemo.


Not sure what you mean here. Is the Admin component included inside  
the AUC or is it going to be a page level component?




1. I changed it to remove the header because this is a  
subcomponent.  However, this removed the stylesheets tag.  I also  
eliminated the bodyTag webobject, again, as this is a  
subcomponent.  Neither of these seem to affect this problem though.


I think that D2W expects whatever component you use for the  
PageWrapper to contain the page level HTML. All the D2W page level  
components would depend on that. Otherwise what you might be looking  
for are the embeddable components (remember that there was a palette  
of these things in WOBuilder?).




This works, sort of, but the WOLToolbar appears as a ul above the  
ul of the entities.  (I had an error here until I added the WOLips  
framework and password) I assume this is related to the navigation  
panel not being styled properly.


Yeah you're messing with the assumptions that were made in creating  
the CSS for ModernLook, I expect. The WOLToolbar is styled to be at  
the bottom of the page.


 The real problem is that when I click an entity, now I get an NPE  
error:


ERMD2WStyleSheetInjector.java	39	resourceFrameworkName	 
er.modern.directtoweb.components
Which apparently means it's not getting the skin framework (and  
also isn't supplying the default of "app")  I added the property to  
the skin framework's properties file (then added it to the app's  
properties too to see if that changed anything.  It didn't.  I  
assume this is related to the missing stylesheets from the head.


This is established by the rules. You've messed with the framework's  
assumptions for the styling.




2. I then added the head and body back (along with the bodyClass  
method lifted from the ERModernMoviesDemo's pageWrapper).  I  
changed it from an Ajax link to a regular WOHyperlink and set  
target = "new" but now I get an NPE like this (before I get to the  
uls from the WOLToolbar or the entitities) :


ERD2WHead.java	32	displayNameForPageConfiguration	 
er.directtoweb.components


(Note this also happens inside the AjaxUpdateContainer if I keep it  
as an AjaxUpdateLink with the appropriate containerid)


You can't use the head and body tag nested inside a component that  

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread Ramsey Gurley


On Jun 9, 2010, at 2:10 PM, Andrew R. Kinnie wrote:

Thanks.  I added a rule in the d2wmodel file for pageWrapperName.   
However, I managed to discover several other problems.


My page wrapper was for a non-d2w page and site, and I want the d2w  
stuff to be a subcomponent of this.  It is very simple, I have a  
header, sidebar navigation, and an AjaxUpdateContainer which changes  
based on what link the user clicks on the navigation sidebar.  One  
of these links is the Admin link, which will (I hope) cause the D2W  
stuff to be loaded into the AjaxUpdateContainer, without disturbing  
anything else.


I therefore made my Admin component into the "pageWrapperName" for  
the purposes of the D2W rule, and created it based on the  
pageWrapper from ERModernMoviesDemo.


1. I changed it to remove the header because this is a subcomponent.



If you want to embed the D2W stuff as a subcomponent in an existing  
page, that requires a different approach.  You'll need to use an  
embedded page configuration and one of the embedded components  
instead.  Have a look at D2WList, D2WInspect, D2WQuery, and their  
wonder counterparts.


I think I misunderstood what you were trying to do.  I was under the  
impression your admin user would log in and then would be forwarded  
into the D2W admin side of the app if they were to click certain  
navigation elements in your MenuHeader component.  Or they could  
continue using the app as it exists.  Basically, you would simply be  
using the same page wrapper for both D2W and hand coded pages.


What you're wanting to do is mix your pages. Embedding is a little  
more involved, but you'll still need to somehow merge that wrapper  
stuff into your existing wrapper to load the CSS resources, so  
hopefully the work you've done so far was not all in vain.


Keep us posted (^_^)

Ramsey


However, this removed the stylesheets tag.  I also eliminated the  
bodyTag webobject, again, as this is a subcomponent.  Neither of  
these seem to affect this problem though.


This works, sort of, but the WOLToolbar appears as a ul above the ul  
of the entities.  (I had an error here until I added the WOLips  
framework and password) I assume this is related to the navigation  
panel not being styled properly.  The real problem is that when I  
click an entity, now I get an NPE error:


ERMD2WStyleSheetInjector.java	39	resourceFrameworkName	 
er.modern.directtoweb.components
Which apparently means it's not getting the skin framework (and also  
isn't supplying the default of "app")  I added the property to the  
skin framework's properties file (then added it to the app's  
properties too to see if that changed anything.  It didn't.  I  
assume this is related to the missing stylesheets from the head.


2. I then added the head and body back (along with the bodyClass  
method lifted from the ERModernMoviesDemo's pageWrapper).  I changed  
it from an Ajax link to a regular WOHyperlink and set target = "new"  
but now I get an NPE like this (before I get to the uls from the  
WOLToolbar or the entitities) :


ERD2WHead.java	32	displayNameForPageConfiguration	 
er.directtoweb.components


(Note this also happens inside the AjaxUpdateContainer if I keep it  
as an AjaxUpdateLink with the appropriate containerid)


So, while I am doing better than I was, I guess I am just  
fundamentally missing what I am supposed to be doing in relation to  
dropping an ERModernLook component with navigation into an  
AjaxUpdateContainer of an existing site.


Is there some configuration I am supposed to be doing to set the  
resources other than in the properties file of the look framework  
(and adding that framework to the app)?


Thanks.  This technology looks very cool, and I would like to think  
it's fairly easy to do this, rather than re-creating entirely new  
D2W projects, even for a D2W novice.


Andrew

On Jun 9, 2010, at 9:36 AM, Ramsey Gurley wrote:



On Jun 9, 2010, at 9:22 AM, Andrew R. Kinnie wrote:

I am again attempting to use D2W for the admin portion of an  
existing app.


Basically, I have an existing site, and wanted to add an admin  
link to the home page navigation bar, based on whether the user  
has logged in and has admin privileges.  When the user clicks on  
the link, I want to load a D2W generated admin component into the  
AjaxUpdate area for the content.  Seems all fairly simple and  
straight forward.


I created a new framework, copied the ERModernSkin WSR into its  
WSR, added er.modern.look.skinframework =  
MySitesERModernSkinFramework to its (i.e. the skin framework's)  
properties then added the framework to my app.  I also added  
ERD2W's framework, etc. to the app.


I also created a NavigationMenu.plist, based on the one in  
ERModernMoviesDemo, and modified it to present my entities,  
modified the session to present my navController and created  
actions appropriate to it within it.


Now however, first, none of the ERModernLook css is loading, but I  
figure

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread Andrew R. Kinnie
Thanks.  I added a rule in the d2wmodel file for pageWrapperName.  However, I 
managed to discover several other problems.

My page wrapper was for a non-d2w page and site, and I want the d2w stuff to be 
a subcomponent of this.  It is very simple, I have a header, sidebar 
navigation, and an AjaxUpdateContainer which changes based on what link the 
user clicks on the navigation sidebar.  One of these links is the Admin link, 
which will (I hope) cause the D2W stuff to be loaded into the 
AjaxUpdateContainer, without disturbing anything else.

I therefore made my Admin component into the "pageWrapperName" for the purposes 
of the D2W rule, and created it based on the pageWrapper from 
ERModernMoviesDemo.  

1. I changed it to remove the header because this is a subcomponent.  However, 
this removed the stylesheets tag.  I also eliminated the bodyTag webobject, 
again, as this is a subcomponent.  Neither of these seem to affect this problem 
though.

This works, sort of, but the WOLToolbar appears as a ul above the ul of the 
entities.  (I had an error here until I added the WOLips framework and 
password) I assume this is related to the navigation panel not being styled 
properly.  The real problem is that when I click an entity, now I get an NPE 
error:

ERMD2WStyleSheetInjector.java   39  resourceFrameworkName   
er.modern.directtoweb.components
Which apparently means it's not getting the skin framework (and also isn't 
supplying the default of "app")  I added the property to the skin framework's 
properties file (then added it to the app's properties too to see if that 
changed anything.  It didn't.  I assume this is related to the missing 
stylesheets from the head.

2. I then added the head and body back (along with the bodyClass method lifted 
from the ERModernMoviesDemo's pageWrapper).  I changed it from an Ajax link to 
a regular WOHyperlink and set target = "new" but now I get an NPE like this 
(before I get to the uls from the WOLToolbar or the entitities) :

ERD2WHead.java  32  displayNameForPageConfiguration 
er.directtoweb.components

(Note this also happens inside the AjaxUpdateContainer if I keep it as an 
AjaxUpdateLink with the appropriate containerid)

So, while I am doing better than I was, I guess I am just fundamentally missing 
what I am supposed to be doing in relation to dropping an ERModernLook 
component with navigation into an AjaxUpdateContainer of an existing site.  

Is there some configuration I am supposed to be doing to set the resources 
other than in the properties file of the look framework (and adding that 
framework to the app)?

Thanks.  This technology looks very cool, and I would like to think it's fairly 
easy to do this, rather than re-creating entirely new D2W projects, even for a 
D2W novice.

Andrew

On Jun 9, 2010, at 9:36 AM, Ramsey Gurley wrote:

> 
> On Jun 9, 2010, at 9:22 AM, Andrew R. Kinnie wrote:
> 
>> I am again attempting to use D2W for the admin portion of an existing app.  
>> 
>> Basically, I have an existing site, and wanted to add an admin link to the 
>> home page navigation bar, based on whether the user has logged in and has 
>> admin privileges.  When the user clicks on the link, I want to load a D2W 
>> generated admin component into the AjaxUpdate area for the content.  Seems 
>> all fairly simple and straight forward.
>> 
>> I created a new framework, copied the ERModernSkin WSR into its WSR, added 
>> er.modern.look.skinframework = MySitesERModernSkinFramework to its (i.e. the 
>> skin framework's) properties then added the framework to my app.  I also 
>> added ERD2W's framework, etc. to the app.
>> 
>> I also created a NavigationMenu.plist, based on the one in 
>> ERModernMoviesDemo, and modified it to present my entities, modified the 
>> session to present my navController and created actions appropriate to it 
>> within it.
>> 
>> Now however, first, none of the ERModernLook css is loading, but I figure I 
>> can fix that later.  The big problem is I can click the link and get a ul of 
>> the entities, but when I click an entity link, I get this error:
>> 
>> com.webobjects.appserver._private.WODynamicElementCreationException: : 
>> cannot find component or dynamic element named PageWrapper
>> 
>> I don't have a component named PageWrapper (ERModernMoviesDemo does), I 
>> perform that function in my "Main" component.  I searched the 
>> ERModernMoviesDemo and found no references to PageWrapper in it, other than 
>> in the class itself.
>> 
>> Is there someplace I can globally change a setting to point to my Main 
>> component?  Is this going to work like this at all?  The ERModernMoviesDemo 
>> is obviously a self-contained app, and not a subcomponent within another app 
>> that has its own custom html and css.
>> 
>> Any assistance would be appreciated.
>> 
>> Andrew
> 
> The page wrapper is typically part of the app rather than the framework, so 
> if you don't have one, you'll need to designate one.  I believe the D2W key

Re: D2W/ERModernLook in non D2W app

2010-06-09 Thread Ramsey Gurley


On Jun 9, 2010, at 9:22 AM, Andrew R. Kinnie wrote:

I am again attempting to use D2W for the admin portion of an  
existing app.


Basically, I have an existing site, and wanted to add an admin link  
to the home page navigation bar, based on whether the user has  
logged in and has admin privileges.  When the user clicks on the  
link, I want to load a D2W generated admin component into the  
AjaxUpdate area for the content.  Seems all fairly simple and  
straight forward.


I created a new framework, copied the ERModernSkin WSR into its WSR,  
added er.modern.look.skinframework = MySitesERModernSkinFramework to  
its (i.e. the skin framework's) properties then added the framework  
to my app.  I also added ERD2W's framework, etc. to the app.


I also created a NavigationMenu.plist, based on the one in  
ERModernMoviesDemo, and modified it to present my entities, modified  
the session to present my navController and created actions  
appropriate to it within it.


Now however, first, none of the ERModernLook css is loading, but I  
figure I can fix that later.  The big problem is I can click the  
link and get a ul of the entities, but when I click an entity link,  
I get this error:


com 
.webobjects.appserver._private.WODynamicElementCreationException: :  
cannot find component or dynamic element named PageWrapper


I don't have a component named PageWrapper (ERModernMoviesDemo  
does), I perform that function in my "Main" component.  I searched  
the ERModernMoviesDemo and found no references to PageWrapper in it,  
other than in the class itself.


Is there someplace I can globally change a setting to point to my  
Main component?  Is this going to work like this at all?  The  
ERModernMoviesDemo is obviously a self-contained app, and not a  
subcomponent within another app that has its own custom html and css.


Any assistance would be appreciated.

Andrew


The page wrapper is typically part of the app rather than the  
framework, so if you don't have one, you'll need to designate one.  I  
believe the D2W key you need is pageWrapperName and you can set it in  
the rule with a single assignment.  If your Main component is a  
wrapper, then it should be simple.  You might want to download the  
modern look template to have a look at the PageWrapper component in  
there, as loading the CSS was a bit more involved.


http://avendasora.svn.beanstalkapp.com/repository/

Ramsey

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

D2W/ERModernLook in non D2W app

2010-06-09 Thread Andrew R. Kinnie
I am again attempting to use D2W for the admin portion of an existing app.  

Basically, I have an existing site, and wanted to add an admin link to the home 
page navigation bar, based on whether the user has logged in and has admin 
privileges.  When the user clicks on the link, I want to load a D2W generated 
admin component into the AjaxUpdate area for the content.  Seems all fairly 
simple and straight forward.

I created a new framework, copied the ERModernSkin WSR into its WSR, added 
er.modern.look.skinframework = MySitesERModernSkinFramework to its (i.e. the 
skin framework's) properties then added the framework to my app.  I also added 
ERD2W's framework, etc. to the app.

I also created a NavigationMenu.plist, based on the one in ERModernMoviesDemo, 
and modified it to present my entities, modified the session to present my 
navController and created actions appropriate to it within it.

Now however, first, none of the ERModernLook css is loading, but I figure I can 
fix that later.  The big problem is I can click the link and get a ul of the 
entities, but when I click an entity link, I get this error:

com.webobjects.appserver._private.WODynamicElementCreationException: : cannot 
find component or dynamic element named PageWrapper

I don't have a component named PageWrapper (ERModernMoviesDemo does), I perform 
that function in my "Main" component.  I searched the ERModernMoviesDemo and 
found no references to PageWrapper in it, other than in the class itself.

Is there someplace I can globally change a setting to point to my Main 
component?  Is this going to work like this at all?  The ERModernMoviesDemo is 
obviously a self-contained app, and not a subcomponent within another app that 
has its own custom html and css.

Any assistance would be appreciated.

Andrew

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com