Be sure to reply all so your message goes to the mailing list too. That way the
answer can benefit everyone :-)
On Mar 21, 2012, at 4:17 AM, Andries Brink wrote:
> Thanks Ramsey - Also, thank you for all your docs on WOCommunity - they are
> well written . If only you could do a whole book on WOnder...
>
> I have been looking at it in Detail - still I am missing something. Would you
> mind looking at my process below:
>
> For now - all I am trying to do is get the Navigation bar to recognise One
> tab other than Home (User Tab) and showing me that it does by putting User in
> White (And not defaulting to Home - even though it is Happy to edit the
> entity as instructed by the Navigation menu P-list file.:
>
>
>
> From My NavigationP-List:
> (
> {
> name = Root;
> children = ("Home","Users");
> },
> {
> name = "Home";
> action = "session.navController.homeAction";
> },
> {
> name = Users;
> DisplayName = "Test";
> action = "session.navController.queryUserAction"; //This
> action seems to fire, as the page is opened with the User entity loaded,
> editable and queryable
> },
> )
>
> From NavigationMenu.Java:
>
> public class MainNavigationController {
>
> public static final String USER = "TblUser";
> public static final String PRODUCT = "TblProduct";
> public static final String CLIENT = "TblClient";
>
> private Session _session;
>
> public MainNavigationController(Session s) {
> super();
> _session = s;
> }
>
> // NAV ACTIONS
>
> public WOComponent homeAction() {
> return D2W.factory().defaultPage(session());
> }
> // // Users
> //
> public WOComponent queryUserAction() {
> return queryPageForEntityName(USER);
> }
>
> public WOComponent createUserAction() {
> return newObjectForEntityName(USER);
> }
> ...
>
> And then from the Rule File (UserD2wmodel.txt dumped
>
> (
> 40 : *true* => navigationState = "Home"
> [com.webobjects.directtoweb.Assignment],
> 50 : pageConfiguration like '*Tab2*' => navigationState = "Tab2"
> [com.webobjects.directtoweb.Assignment],
> 60 : (task = 'edit' and smartAttribute.className = 'java.lang.String' and
> smartAttribute.width >= 110) => componentName = "ERD2WEditString"
> [com.webobjects.directtoweb.Assignment],
> 100 : *true* => look = "ERModernLook"
> [com.webobjects.directtoweb.Assignment],
> 100 : *true* => datePickerRangeHigh = "20091205"
> [com.webobjects.directtoweb.Assignment],
> 100 : *true* => datePickerRangeHigh = "20091215"
> [com.webobjects.directtoweb.Assignment],
> 100 : *true* => isEntityEditable = "true"
> [com.webobjects.directtoweb.BooleanAssignment],
> 100 : *true* => isEntityDeletable = "true"
> [com.webobjects.directtoweb.BooleanAssignment],
> 100 : pageConfiguration like 'EditRelationship*' => useAjaxControls =
> "false" [com.webobjects.directtoweb.BooleanAssignment],
> 100 : (task = 'inspect' and smartRelationship.isToMany = 1) =>
> componentName = "ERDList" [com.webobjects.directtoweb.Assignment],
> 100 : (smartRelationship != null and smartRelationship.isToMany = 0 and
> task = 'inspect') => componentName = "ERD2WDisplayToOne"
> [com.webobjects.directtoweb.Assignment],
> 500 : PageConfiguration = 'QueryTblUser' => navigationState = "Users"
> [com.webobjects.directtoweb.Assignment],
> 600 : (Task = 'query' and EntityName = 'TblUser') => navigationState =
> "Users" [com.webobjects.directtoweb.Assignment]
> )
Keys are case sensitive. Try pageConfiguration, task, and entity.name instead
>
> I am trying rule 500 - 600 to force the issue, as I get the following from
> the page log when I switch on the D2W logging on the running app:
> Page Configuration: QueryTblUser ?
>
> SHOW property-level component names
> <DownTriangle.gif>Click To Close
> Task query
> SubTask No Sub Task
> Tab Section No Current Page Name
> Entity Name TblUser
> Template Name ERMODQueryPage
> Parent Page Configuration No Parent Configuration
> Default Editing Context er.extensions.eof.ERXEC@17cb0a16: Show
> Rule tracing Turn off
> D2W Key has value No value set or empty
>
> From the d2w logger
>
>
> :
> Not sure if my Rules are having ANY effect whatsoever: Clearly the
> NavigationMenu is, though it is unable to display the children due to the
> fact that the NavigationMenu page NavigationState is not set?
>
> I think I am now properly confused!
>
> Thanks for help so far :-) - I have also asked David LeBur the same Q as both
> of you responded to my original WO Mailing list Q.
>
> Andries
> Andries Brink
> Managing Director
>
> <image001.gif>
>
> iPhone
> +27 (0) 82 882 5750
>
>
>
> web
> www.andile.net
>
>
> email
> [email protected]
>
>
>
> On 20 Mar 2012, at 5:30 PM, Ramsey Gurley wrote:
>
>> Hi Andries,
>>
>> Also have a look in ERExtensions/Documentation/Navigation.html for info on
>> how to set up your Navigation.plist file. You might also want to have a
>> look at the HelloD2W podcast available at WOCommunity. The source from the
>> demo used in the podcast is available on github:
>>
>> https://github.com/wocommunity/WOWODC-2010/tree/master/HelloD2W
>>
>> Ramsey
>>
>>
>> On Mar 20, 2012, at 8:07 AM, David LeBer wrote:
>>
>>> Andries,
>>>
>>> Look at the ERModernMoviesDemo app in Wonder it demonstrates using the
>>> navigation stuff.
>>>
>>> Specifically search for 'navigationState' in the rules.
>>>
>>> D
>>>
>>> --
>>> David LeBer
>>> Codeferous Software
>>>
>>> On 2012-03-20, at 10:28 AM, Andries Brink wrote:
>>>
>>>> Hi all
>>>>
>>>> OK - Progress, I am getting things right with the rules and have defined a
>>>> number of WOComponents & associated actions. All is working fine - i.e. I
>>>> can call my Create and Edit Components as pages. HOWEVER - the menu in the
>>>> app is not playing along:
>>>> 1. I click on any Tab, though the tabs are not Grey as in the ERMovies
>>>> example. Also - even though my components load, the menu stays on the
>>>> "Home" tab.
>>>> 2. No display of any Children as defined in the plist. I have actions for
>>>> all the children.
>>>>
>>>> Any ideas - anyone seen this before?
>>>>
>>>> Thanks
>>>> Andries
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
>>>>
>>>> This email sent to [email protected]
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
>>>
>>> This email sent to [email protected]
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]