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 <[email protected]> wrote:

> From: Chuck Hill <[email protected]>
> Subject: Re: update a WOComponentContent from my code?
> To: "Theodore Petrosky" <[email protected]>
> Cc: [email protected]
> 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:
> > 
> > <wo:AjaxUpdateContainer id = "MainTableUC">
> > <div id = "contentArea"> <webobject name =
> "MainTableComponentContent" /> </div>
> > </wo:AjaxUpdateContainer>
> > 
> > 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      ([email protected])
> > Help/Unsubscribe/Update your Subscription:
> > http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> > 
> > This email sent to [email protected]
> 
> -- 
> 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      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to