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 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 ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]