• 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: Sun, 16 Jan 2011 15:47:50 -0800 (PST)

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 method.
>
>
> Chuck
>
>
>
>
> > --- 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, 3:52 PM
> >> The only other thing that I can
> >> think  of is that something in your
> code/bindings is
> >> setting theUser to null before you click on the
> second
> >> tab.  Remember that the tabs are not rendered
> nor the
> >> binding values transferred until the tab is
> selected.
> >> Try making the second tab the default selected
> tab.
> >> Does that reverse the problem?
> >>
> >>
> >> Chuck
> >>
> >>
> >> On Jan 16, 2011, at 12:45 PM, Farrukh Ijaz wrote:
> >>
> >>> Apparently nothing is wrong with your code.
> Try using
> >> ERXOptionalForm instead of WOForm. Also try moving
> the form
> >> inside the tabbed panel.
> >>>
> >>> I think you may need AjaxObserveField too
> around your
> >> fields inside the form.
> >>>
> >>> <wo:ERXOptionalForm multipleSubmit =
> "$true">
> >>> 
>    <wo:AjaxObserveField
> >> fullSubmit="$true" action="$dummy">
> >>>     <!-- Your stuff
> here including
> >> tabs -->
> >>> 
>    </wo:AjaxObserveField>
> >>> </wo:ERXOptionalForm>
> >>>
> >>> Farrukh
> >>>
> >>> On 2011-01-16, at 9:13 PM, Theodore Petrosky
> wrote:
> >>>
> >>>> I have one form:
> >>>>
> >>>> <wo:WOForm multipleSubmit = true>
> >>>> <div class = "tabBox">
> >>>>    <webObject name =
> >> "TabbedPanel">
> >>>>      <webObject name =
> >> "Tab1">
> >>>>        <table class
> =
> >> "tableDefs" width = "550">
> >>>>
> >>>>       
>    <tr class =
> >> "meta1">
> >>>>       
> >>    <td width = "110">First
> >> Name</td>
> >>>>       
> >>    <td><wo:WOTextField value =
> >> "$theUser.firstName" size = "65" /></td>
> >>>>         
> </tr>
> >>>>
> >>>>       
>    <tr class =
> >> "meta1">
> >>>>       
> >>    <td width="35%">Last
> >> Name</td>
> >>>>       
> >>    <td><wo:WOTextField value =
> >> "$theUser.lastName" size = "65" /></td>
> >>>>         
> </tr>
> >>>>
> >>>>       
>    <tr class =
> >> "meta1">
> >>>>       
> >>    <td>Title</td>
> >>>>       
> >>    <td><webobject name =
> >> "EmployeeTitlePopUp" /></td>
> >>>>         
> </tr>
> >>>>
> >>>>   
> >>    </table> 
>    
> >>>>   
>    </webObject name =
> >> "Tab1">
> >>>>
> >>>>      <webObject name =
> >> "Tab2">
> >>>>
> >>>> <table width = "250">
> >>>>         
> <tr>
> >>>>       
> >>    <td>
> >>>>         
> >>    <div class = "twoLine">Sees
> Employee
> >> Management:
> >>>>           
> >>    <wo:WOCheckBox checked =
> >> "$theSecuritySettings.seesUserManagement" />
> >>>>           
> >>    <br />
> >>>>           
> >>    <br />
> >>>>           
> >>    Sees Client Management:
> >>>>           
> >>    <wo:WOCheckBox checked =
> >> "$theSecuritySettings.seesClientManagement" />
> >>>>           
> >>    <br />
> >>>>           
> >>    <br />
> >>>>           
> >>    Sees Settings Management:
> >>>>           
> >>    <wo:WOCheckBox checked =
> >> "$theUser.securitySettings.seesSettingsManagement"
> />
> >>>>         
> >>    </div>
> >>>>         
> >>    <br />
> >>>>       
> >>    </td>
> >>>>         
> </tr>
> >>>>        </table>
> >>>>
> >>>> </webObject>
> >>>>
> >>>> </webObject>
> >>>>
> >>>> </div>
> >>>> <br />
> >>>> <wo:AjaxSubmitButton action = "$save"
> value =
> >> "Save" /><wo:AjaxSubmitButton action =
> "$cancelEdits"
> >> value = "Cancel" />
> >>>> </wo:WOForm>
> >>>>
> >>>>
> >>>>
> >>>> --- On Sun, 1/16/11, Farrukh Ijaz <email@hidden>
> >> wrote:
> >>>>
> >>>>> From: Farrukh Ijaz <email@hidden>
> >>>>> Subject: Re: AjaxTabbedPanel ??? V2
> >>>>> To: "Theodore Petrosky" <email@hidden>
> >>>>> Cc: email@hidden
> >>>>> Date: Sunday, January 16, 2011, 12:24
> PM
> >>>>> Are you using a separate WOForm for
> >>>>> each tab? If yes, then you should
> revise your
> >> code and use 1
> >>>>> form for all your fields no matter
> they span
> >> across multiple
> >>>>> tabs.
> >>>>>
> >>>>> Farrukh
> >>>>>
> >>>>> On 2011-01-16, at 5:32 PM, Theodore
> Petrosky
> >> wrote:
> >>>>>
> >>>>>> I am copying from the ajaxexample.
>
> >>>>>>
> >>>>>> in a nutshell I have:
> >>>>>>
> >>>>>> Tab1 displays and edits
> >> "$theUser.firstName" and
> >>>>> various other fields.
> >>>>>> Tab2 displays checkboxes for
> various
> >> fields like:
> >>>>>>
> >>>>>> <wo:WOCheckBox checked =
> >>>>>
> "$theUser.securitySettings.seesUserManagement"
> >> />
> >>>>>>
> >>>>>> Tab1 is set as isSelected = true;
> >>>>>>
> >>>>>> when i display the AMD, Tab1
> looks
> >> beautiful however,
> >>>>> when I display Tab2 all the
> securitySettings
> >> are unchecked
> >>>>> (this user should have them all
> checked
> >> (true)).
> >>>>>>
> >>>>>> If I make a change on Tab1, and
> save the
> >> EC, all the
> >>>>> securitySettings are set to false and
> >> overwritten. If I go
> >>>>> to Tab2 and check the settings to make
> them
> >> true, saving
> >>>>> saves these settings.
> >>>>>>
> >>>>>> So although I can set the values
> from
> >> Tab2, it doesn't
> >>>>> display the current settings.
> >>>>>>
> >>>>>> If you understand better the
> workings of
> >> the
> >>>>> AjaxTabbedPanel, maybe you could look
> at my
> >> code from last
> >>>>> week and see if my error is obvious.
> >>>>>>
> >>>>>>
> >>>>>> You did say,
> >>>>>>
> >>>>>> "> I think you need to specify
> the name
> >> property
> >>>>> for you
> >>>>>>> tabbed panel."
> >>>>>>
> >>>>>> What does this mean?
> >>>>>>
> >>>>>>
> >>>>>> Thanks,
> >>>>>>
> >>>>>> Ted
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --- On Sun, 1/16/11, Farrukh Ijaz
> <email@hidden>
> >>>>> wrote:
> >>>>>>
> >>>>>>> From: Farrukh Ijaz <email@hidden>
> >>>>>>> Subject: Re: AjaxTabbedPanel
> ??? V2
> >>>>>>> To: "Theodore Petrosky" <email@hidden>
> >>>>>>> Cc: email@hidden
> >>>>>>> Date: Sunday, January 16,
> 2011, 8:24
> >> AM
> >>>>>>> Hi Ted,
> >>>>>>>
> >>>>>>> I think you need to specify
> the name
> >> property for
> >>>>> you
> >>>>>>> tabbed panel. Anyhow, working
> with
> >> AjaxTabbedPanel
> >>>>> is a bit
> >>>>>>> tricking. The easiest way is
> to copy
> >> the code from
> >>>>> the Ajax
> >>>>>>> examples and tweak it for your
> need.
> >>>>>>>
> >>>>>>> Farrukh
> >>>>>>>
> >>>>>>> On 2011-01-16, at 4:20 PM,
> Theodore
> >> Petrosky
> >>>>> wrote:
> >>>>>>>
> >>>>>>>> Is there some secret that
> I am
> >> missing about
> >>>>> using the
> >>>>>>> AjaxTabbedPanel?
> >>>>>>>>
> >>>>>>>> Nothing I do seems to
> allow it to
> >> display the
> >>>>> data I
> >>>>>>> need. I posted earlier in the
> week my
> >> problem, if
> >>>>> anyone has
> >>>>>>> an idea what I can do to learn
> this
> >> feature.
> >>>>>>>>
> >>>>>>>> I posted what I thought
> was an
> >> appropriate
> >>>>> amount of
> >>>>>>> detail (including my code)
> last week.
> >> I could
> >>>>> repost it.
> >>>>>>>>
> >>>>>>>> Help, I really like what
> this
> >> looks like if
> >>>>> only I
> >>>>>>> could get it to work.
> >>>>>>>>
> >>>>>>>> Ted
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>>
> _______________________________________________
> >>>> 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
> >>>
> >>>
> _______________________________________________
> >>> 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
> >>
> >> --
> >> 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
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
>
> --
> 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

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

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