Re: AjaxTabbedPanel ??? V2
Re: AjaxTabbedPanel ??? V2
- Subject: Re: AjaxTabbedPanel ??? V2
- From: Chuck Hill <email@hidden>
- Date: Mon, 17 Jan 2011 12:59:31 -0800
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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