Re: Problem with Ajax Framework

Ramsey Gurley <[email protected]>
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <[email protected]>
Hi Andrea,

Welcome to WO.

Try

Link1 : AjaxUpdateLink {
	action = getSiteListComponent;
	//updateContainerID = "rootContainer";
	replaceID = "rootContainer";
}

In your link container. If you want an updatable container, then using updateContainerID is correct. You need to put the content to be updated in the container in that case. Using updateContainerID is more common as it came first. replaceID was added later.

Ramsey

On Jan 7, 2013, at 9:17 AM, Andrea Pulese wrote:

> 
> 
> ---------- Forwarded message ----------
> From: Andrea Pulese <[email protected]>
> Date: 2013/1/7
> Subject: Problem with Ajax Framework
> To: [email protected]
> 
> 
> Hi all , I'm a new WebObject developer.
> I'm trying to write some piece of code by using Ajax technology.
> The components has been written in this way :
> 
> The main container contains one AjaxUpdateContainer and a component
> called LinksContainer which contains a link.
> <html>
>         <head>
>                 <title>Untitled</title>
>         </head>
>         <body>
>                 <webobject name = "LinksContainer"/>
>                 <webobject name = "Container">
>                 </webobject>
>         </body>
> </html>
> 
> LinkContainer code :
> <div id = "linksContainer">
>         <webobject name = "Link1"> link </webobject>
> </div>
> 
> //bind
> Link1 : AjaxUpdateLink {
>         action = getSiteListComponent;
>         updateContainerID = "rootContainer";
> }
> 
> The LinkContainer component return a new component called
> SiteListComponent containing a mask of search criteria. and also
> another ajax update container.
> SiteListComponent
> <div id = "siteListComponent">
>         <webobject name = "CriteriaComponent"/>
>         <webobject name = "AjaxContainer"/>
> </div>
> 
> //bind
> CriteriaComponent : CriteriaComponent {
> }
> 
> AjaxContainer : AjaxUpdateContainer {
> }
> 
> 
> CriteriaComponent code:
> 
> <div id = "criteriaComponent">
>         <webobject name = "CriteriaForm">
>                 <table>
>                         <tr>
>                                 <td><webobject name = "FieldName"/></td>
>                                 <td><webobject name = "FieldSurname"/></td>
>                         </tr>
>                         <tr>
>                                 <td><webobject name = "Search"/></td>
>                         </tr>
>                 </table>
>         </webobject>
> </div>
> 
> //bind
> CriteriaForm : WOForm {
> }
> 
> FieldName : WOTextField {
>         value = fieldName;
> }
> 
> FieldSurname : WOTextField {
>         value = fieldSurname;
> }
> 
> After clicking the search button I aspected that the second
> AjaxUpdateContainer would be refreshed with the new component but a
> javascript error occurs.
> wonder.js:420 TypeError: 'undefined' is not a function (evaluating
> 'formSerializer(form)')
> I have attached the eclipse workspace containing the entire example.
> 
> Best Regards
> Andrea Pulese
> 
> <TestComponent 2.zip>------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412_______________________________________________
> Wonder-disc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wonder-disc

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412

_______________________________________________
Wonder-disc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.