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

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AjaxTabbedPanel ??? V2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AjaxTabbedPanel ??? V2


  • Subject: Re: AjaxTabbedPanel ??? V2
  • From: Theodore Petrosky <email@hidden>
  • Date: Mon, 17 Jan 2011 13:17:56 -0800 (PST)

the AMD's component has that method as I set theUser with a setTheUser method.

public void setTheUser(User theUser) {
   this.theUser = theUser;
}

public User theUser() {
  NSLog.out.appendln("theUser = " + this.theUser.valueForKey("fullNameString"));
  return theUser;
}


Interesting, when I comment out:

/*
public boolean Tab2Selected() {
	return tab2Selected;
}

public void setTab2Selected(boolean tab2Selected) {
	//NSLog.out.appendln("setTab2Selected = " +	tab2Selected);
	this.tab2Selected = tab2Selected;
}
*/

and comment out the binding in the WOD I see theUser() is accessed however, the bindings on Tab2 are null.

Ted



--- On Mon, 1/17/11, Chuck Hill <email@hidden> wrote:

> From: Chuck Hill <email@hidden>
> Subject: Re: AjaxTabbedPanel ??? V2
> To: "Theodore Petrosky" <email@hidden>
> Cc: "email@hidden List" <email@hidden>
> Date: Monday, January 17, 2011, 3:59 PM
>
> On Jan 17, 2011, at 12:52 PM, Theodore Petrosky wrote:
>
> > Chuck,
> >
> > Now that it is working, I want to know a little more.
> You suggested:
> >
> >>>>
> >>>> theUser() should get called again when you
> select
> >> another tab.  Try logging this.theUser from
> that
> >
> > I don't understand what gets called when I select
> another tab.
>
> The bindings for that tab will be evaluated.  I was
> suggesting that you have
>
> public User theUser() {
>     System.out.println("Returning user " +
> theUser);
>     return theUser;
> }
>
> To see if it was returning a null user.
>
>
> Chuck
>
> > I choose to try the isSelected binding as I was
> reading:
> >
> > isSelected     optional,
> boolean true if this tab is initially selected when the page
> is first rendered, defaults to false. If present and can be
> set, is set to true when this tab is selected and to false
> when it is no longer the selected tab
> >
> > For me this falls under the heading of learning more
> about webobjects. If I can understand what you are
> suggesting here perhaps I can actually learn something.
> >
> > Ted
> >
> >
> >
> >> I confess to having no idea why that
> >> made it work.  This is not what I was
> suggesting, but
> >> if it works...
> >>
> >> Chuck
> >>
> >>
> >> On Jan 16, 2011, at 3:47 PM, Theodore Petrosky
> wrote:
> >>
> >>> ok here is what I did to get it to work.
> >>>
> >>> in the WOD I added a isSelected binding:
> >>>
> >>> Tab2: AjaxTabbedPanelTab {
> >>>     id="Tab2";
> >>>     name = "Menus";
> >>>     isSelected =
> Tab2Selected;
> >>> }
> >>>
> >>>
> >>> and in the Java:
> >>>
> >>>
> >>> public boolean Tab2Selected() {
> >>>     return tab2Selected;
> >>> }
> >>>
> >>> /**
> >>> * @param tab2Selected the tab2Selected to set
> >>> */
> >>> public void setTab2Selected(boolean
> tab2Selected) {
> >>> 
>    NSLog.out.appendln("setTab2Selected
> >> = " + tab2Selected);
> >>>     
> >>>     this.tab2Selected =
> tab2Selected;
> >>> }
> >>>
> >>> That's all I did and it is working as
> expected.
> >>>
> >>> I don't know if that is what you were
> suggesting. But
> >> it works.
> >>>
> >>> Ted
> >>>
> >>>
> >>>
> >>> --- On Sun, 1/16/11, Chuck Hill <email@hidden>
> >> wrote:
> >>>
> >>>> From: Chuck Hill <email@hidden>
> >>>> Subject: Re: AjaxTabbedPanel ??? V2
> >>>> To: "Theodore Petrosky" <email@hidden>
> >>>> Cc: "email@hidden
> >> List List" <email@hidden>
> >>>> Date: Sunday, January 16, 2011, 4:39 PM
> >>>>
> >>>> On Jan 16, 2011, at 12:58 PM, Theodore
> Petrosky
> >> wrote:
> >>>>
> >>>>> yes if I make Tab2 the default tab
> then the
> >> problem
> >>>> reverses.
> >>>>
> >>>> Then the problem is in your code and use
> of
> >> bindings, not
> >>>> the tabbed panel.
> >>>>
> >>>>
> >>>>> here is the code that is called to
> pass the
> >> User into
> >>>> the AMD
> >>>>>
> >>>>>
> >>>>> public WOActionResults editUserMeta()
> {
> >>>>>
> >>>>>      EditUserMeta
> nextPage
> >> =
> >>>>
> >>
> (EditUserMeta)pageWithName(EditUserMeta.class.getName());
> >>>>> 
> >>    nextPage.setTheUser(aUserToEdit);
> >>>>>         
> >>>>>      return nextPage;
> >>>>> }
> >>>>>
> >>>>> in EditUserMeta.java I have:
> >>>>>
> >>>>> public void setTheUser(User theUser)
> {
> >>>>>      this.theUser =
> >> theUser;
> >>>>>     
>    
> >>>>         
> >>>>> 
> >>    NSLog.out.appendln("theUser = "
> >>>> +   
> >> theUser.valueForKey("fullNameString"));
> >>>>> 
> >>    NSLog.out.appendln("theUser
> >>>> seesUserManagement = "
> +   
> >>>>
> >>
> theUser.securitySettings().seesClientManagement());
> >>>>>
> >>>>> }
> >>>>>
> >>>>> When I access the AMD here is my log
> info:
> >>>>>
> >>>>> Jan 16 13:12:40 TheWorkTracker[50828]
> INFO
> >>>> NSLog  - theUser = Admin 
> >>>>> Jan 16 13:12:40 TheWorkTracker[50828]
> INFO
> >>>> NSLog  - theUser seesUserManagement =
> true
> >>>>>
> >>>>> Interesting that
> >>>>
> theUser.securitySettings().seesClientManagement()
> >> is true
> >>>> however the checkbox never is set.
> >>>>
> >>>> theUser() should get called again when you
> select
> >> another
> >>>> tab.  Try logging this.theUser from
> that
> >
> >
> >
> >
>
> --
> Chuck Hill         
>    Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase
> their overall knowledge of WebObjects or who are trying to
> solve specific problems.   
> http://www.global-village.net/products/practical_webobjects
>
>
>
>
>
>
>
>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: AjaxTabbedPanel ??? V2 (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: AjaxTabbedPanel ??? V2
  • Next by Date: Re: AjaxTabbedPanel ??? V2
  • Previous by thread: Re: AjaxTabbedPanel ??? V2
  • Next by thread: Re: AjaxTabbedPanel ??? V2
  • Index(es):
    • Date
    • Thread