Re: update a WOComponentContent from my code?

2011-06-06 Thread Theodore Petrosky
Here is what I am trying to accomplish.

In the AjaxExamples there is a toolbar with Hyperlinks. these bring in 
different components using the page= binding

UserManagement : WOHyperlink {
pageName = "TWTUserManagement";
class="subfirst";
title="Employees";
}

you can also bind the action binding:

TaskGroupManagement: WOHyperlink {
action = taskGroupManagement;
}

public WOActionResults taskGroupManagement() {
TaskGroupManagementComponent nextPage = 
pageWithName(TaskGroupManagementComponent.class);
nextPage.setSomeThingsHere(true);
return nextPage;
}

I want to accomplish the same thing using a WOPopup. to that end I have an AOF 
watching the popup:

IODueDatePUOF : AjaxObserveField {
observeFieldID = "IODueDatePUID";
fullSubmit = false;
action = showPreferences;
updateContainerID = "MainTableUC";
}

public void showPreferences() {

Preferences nextPage = pageWithName(Preferences.class);
nextPage.setSomeThingsHere("aString");
nextPage.setABoolean(true);
etc..   
AjaxUtils.redirectTo(nextPage);
}


This quite nicely adds my page into the WOComponentContent (that is wrapped in 
an AjaxUpdateContainer) in the middle of the page.

If there is a better way to do this, I am all ears.

Ted

--- On Mon, 6/6/11, Chuck Hill  wrote:

> From: Chuck Hill 
> Subject: Re: update a WOComponentContent from my code?
> To: "Theodore Petrosky" 
> Cc: webobjects-dev@lists.apple.com
> Date: Monday, June 6, 2011, 1:48 PM
> Using an AUC and a redirect together
> seems wrong.
> 
> I think the solution to your problem is in the MaiTable
> class and needing to call the set... methods with a default
> value if they are not set.
> 
> 
> Chuck
> 
> On Jun 5, 2011, at 7:28 PM, Theodore Petrosky wrote:
> 
> > I have an update Container:
> > 
> > 
> >   "MainTableComponentContent" /> 
> > 
> > 
> > WOD
> > 
> > MainTableComponentContent : WOComponentContent {}
> > 
> > I have a popup and depending on its selection, I
> fire:
> > 
> > MainTable nextPage =
> pageWithName(MainTable.class);        
> >
> nextPage.setShowAllIOs(((Session)session()).showAllIOs());
> >
> nextPage.setSearchQualifier(((Session)session()).searchQualifier());
> >         
> > AjaxUtils.redirectTo(nextPage);
> > 
> > 
> > and beautifully AjaxUtils inserts the
> WOComponentContent.
> > 
> > How can I fire this from my code? My Main page opens
> with nothing present. I must select something from the
> popup. I can not figure out how to present a default
> selection.
> > 
> > I am sure it is simple, but my pea brain just doesn't
> understand.
> > 
> > Ted
> > 
> > 
> > 
> > 
> > ___
> > Do not post admin requests to the list. They will be
> ignored.
> > Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> > Help/Unsubscribe/Update your Subscription:
> > http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> > 
> > This email sent to ch...@global-village.net
> 
> -- 
> Chuck Hill         
>    Senior Consultant / VP Development
> 
> Come to WOWODC this July for unparalleled WO learning
> opportunities and real peer to peer problem solving! 
> Network, socialize, and enjoy a great cosmopolitan
> city.  See you there!  http://www.wocommunity.org/wowodc11/
> 
>
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: update a WOComponentContent from my code?

2011-06-06 Thread Chuck Hill
Using an AUC and a redirect together seems wrong.

I think the solution to your problem is in the MaiTable class and needing to 
call the set... methods with a default value if they are not set.


Chuck

On Jun 5, 2011, at 7:28 PM, Theodore Petrosky wrote:

> I have an update Container:
> 
> 
>   
> 
> 
> 
> WOD
> 
> MainTableComponentContent : WOComponentContent {}
> 
> I have a popup and depending on its selection, I fire:
> 
> MainTable nextPage = pageWithName(MainTable.class);
> nextPage.setShowAllIOs(((Session)session()).showAllIOs());
> nextPage.setSearchQualifier(((Session)session()).searchQualifier());
> 
> AjaxUtils.redirectTo(nextPage);
> 
> 
> and beautifully AjaxUtils inserts the WOComponentContent.
> 
> How can I fire this from my code? My Main page opens with nothing present. I 
> must select something from the popup. I can not figure out how to present a 
> default selection.
> 
> I am sure it is simple, but my pea brain just doesn't understand.
> 
> Ted
> 
> 
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

Come to WOWODC this July for unparalleled WO learning opportunities and real 
peer to peer problem solving!  Network, socialize, and enjoy a great 
cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: update a WOComponentContent from my code?

2011-06-05 Thread Michael Sharp
Hi Ted,

I'm not sure that what you're describing as happening is actually the case.

AjaxUtils.redirectTo isn't updating an area of your page surrounded by an 
AjaxUpdateContainer, it's redirecting your browser to a full page component.

It sounds like you're interested in updating parts of your already rendered 
page using Ajax, yes?

You can call AjaxUpdateContainer.updateContainerWithID in code, or use the 
updateContainerID binding on AjaxObserveField to nominate the AUC to be updated 
after the observed field(s) submit their contents.

Sharpy..


On 06/06/2011, at 12:28 PM, Theodore Petrosky wrote:

> I have an update Container:
> 
> 
>   
> 
> 
> 
> WOD
> 
> MainTableComponentContent : WOComponentContent {}
> 
> I have a popup and depending on its selection, I fire:
> 
> MainTable nextPage = pageWithName(MainTable.class);
> nextPage.setShowAllIOs(((Session)session()).showAllIOs());
> nextPage.setSearchQualifier(((Session)session()).searchQualifier());
> 
> AjaxUtils.redirectTo(nextPage);
> 
> 
> and beautifully AjaxUtils inserts the WOComponentContent.
> 
> How can I fire this from my code? My Main page opens with nothing present. I 
> must select something from the popup. I can not figure out how to present a 
> default selection.
> 
> I am sure it is simple, but my pea brain just doesn't understand.
> 
> Ted
> 
> 
> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
> 
> This email sent to getsh...@gmail.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


update a WOComponentContent from my code?

2011-06-05 Thread Theodore Petrosky
I have an update Container:


  


WOD

MainTableComponentContent : WOComponentContent {}

I have a popup and depending on its selection, I fire:

MainTable nextPage = pageWithName(MainTable.class);        
nextPage.setShowAllIOs(((Session)session()).showAllIOs());
nextPage.setSearchQualifier(((Session)session()).searchQualifier());
        
AjaxUtils.redirectTo(nextPage);


and beautifully AjaxUtils inserts the WOComponentContent.

How can I fire this from my code? My Main page opens with nothing present. I 
must select something from the popup. I can not figure out how to present a 
default selection.

I am sure it is simple, but my pea brain just doesn't understand.

Ted




 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com