Re: Error: doSubmitAndLock is not defined
"Jancsi A. Farkas(fx)" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <1062747888.1286.4.camel@delphi> |
I have enabled the resource gateway in the web.xml file, however still
does not found the function. Any toughts?
Jancsi
On Fri, 2003-09-05 at 02:17, Jacob Kjome wrote:
> At 01:45 AM 9/5/2003 +0300, you wrote:
> >The error message I sent was the one appeared in mozilla.
> >
> >My resource gateway was disabled in web.xml.
> >So in order to use the BAction, I have to enable it. However I still
> >don't know, should I add a refference to FormControl.js or is added by
> >framework, when is necessary?
>
> If you enable ResourceGateway as I specified below, then you are good as
> gold. No need to worry about FormControl.js. The HTMLActionRenderer will
> add that without any intervention from you. Just return the BAction
> component and you are done.
>
> >Anyway, thank you for the help
>
> No problem.
>
> Jake
>
> > Jancsi
> >
> >On Thu, 2003-09-04 at 20:11, Jacob Kjome wrote:
> > > Ahhh... That is probably the whole issue. The ResourceGateway must be
> > > enabled if you are using BAction components. The HTMLActionRenderer counts
> > > on it being enabled unless you use a RenderStrategy of NEVER_SCRIPT or
> > > CUSTOM_SCRIPT. Note that anything in your page prefixed with "xlib/" needs
> > > to be mapped to the resource gateway servlet. This is true of all
> > > dynamically added script libraries and if you look at the BConfig app, all
> > > resources including images are served by the resource gateway. It is not
> > > only "safer" to have it activated, it is absolutely necessary.
> > >
> > > It does not matter whether you use javascript on your own or not. If you
> > > return a BAction component from your model to be attached to a form
> > > component, Javascript is used, by default, to submit the form. This allows
> > > for different form elements to submit to different action url's and makes
> > > the gui more like a native Java gui with different listeners attached to
> > > different form
> > > elements.
> > >
> > > Add the following to your web.xml...
> > >
> > > <servlet>
> > > <servlet-name>ResourceGateway</servlet-name>
> > >
> > <servlet-class>org.enhydra.barracuda.core.helper.servlet.ResourceGateway</servlet-class>
> > > </servlet>
> > >
> > > <servlet-mapping>
> > > <servlet-name>ResourceGateway</servlet-name>
> > > <url-pattern>/xlib/*</url-pattern>
> > > </servlet-mapping>
> > >
> > >
> > > You can add other servlet mappings to the ResourceGateway servlet, but this
> > > is needed at a minimum to support basic Barracuda functionality.
> > >
> > > Jake
> > >
> > > At 09:56 AM 9/4/2003 -0700, you wrote:
> > > >I had a related problem that people might want to watch out for. When
> > > >I upgraded one of our apps to the latest from CVS (pulled on Aug 30),
> > > >pages started throwing a javascript error that they were unable to
> > > >locate FormControl.js. In newer browsers I didn't even notice but I
> > > >had a user tell me they were unable to load a page with older
> > > >versions of Netscape. I uploaded the FormControl.js file but I'm
> > > >wondering why the error suddenly appeared. As far as I know I'm not
> > > >using any of the JS features of Barracuda. I do have the
> > > >ResourceGateway disabled though. Is it safer to have that activated?
> > > >
> > > >Ron
> > > >
> > > >
> > > >
> > > >On Thursday 04 September 2003 5:37 am, Christian Cryder wrote:
> > > > > Hi Jansci!
> > > > >
> > > > > Hmmm...this is probably not a coincidence; I tweaked the behavior
> > > > > of BScript yesterday, which could be related to this. Can you give
> > > > > me some more background info: What version of Barracuda are you
> > > > > using? (how recently have you pulled from cvs?) Where exactly are
> > > > > you seeing the error? Are you guys using the default approach with
> > > > > components (allowing scripting)? Or are you explicitly trying to
> > > > > turn it off? What does the code that creates the component look
> > > > > like? And what does the final markup look like?
> > > > >
> > > > > doSubmitAndLock is a Javascript call that Barracuda uses when
> > > > > submitting from a button; the call gets embedded in the markup, but
> > > > > when it's used, its supposed to actually include a FormControl.js
> > > > > reference in the page (so that the function can be resolved)...
> > > > >
> > > > > Christian
> > > > > ----------------------------------------------
> > > > > Christian Cryder
> > > > > Internet Architect, ATMReports.com
> > > > > Project Chair, BarracudaMVC - http://barracudamvc.org
> > > > > ----------------------------------------------
> > > > > "Coffee? I could quit anytime, just not today"
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: [email protected]
> > > > > > [mailto:[email protected]]On Behalf Of Jancsi A.
> > > > > > Farkas(fx)
> > > > > > Sent: Thursday, September 04, 2003 4:07 AM
> > > > > > To: barracuda
> > > > > > Subject: [Barracuda] Error: doSubmitAndLock is not defined
> > > > > >
> > > > > >
> > > > > > I have a strange javascriopt error: Error: doSubmitAndLock is not
> > > > > > defined
> > > > > >
> > > > > > Until yesterday everything seemed to work ok, but maybe some of
> > > > > > our developers added some code to a button, and for now this
> > > > > > error pops up. How can I get rid of this error?
> > > > > >
> > > > > > Thank you
> > > > > >
> > > > > > Jancsi
> > > > > >
> > > > > > On Wed, 2003-09-03 at 22:50, Christian Cryder wrote:
> > > > > > > Hi Robert,
> > > > > > >
> > > > > > > Someone asked a similar question on the Struts mailing list a
> > > > > >
> > > > > > while back,
> > > > > >
> > > > > > > and so I'm attaching my response to them there. Perhaps this
> > > > > >
> > > > > > will at least
> > > > > >
> > > > > > > start to point you in the direction of some answers...
> > > > > > >
> > > > > > > Christian
> > > > > > > ------------------------
> > > > > > > Well, I was on the JSR 127 group for a while, and I certainly
> > > > > > > know Barracuda, so I'll take a stab at answering your question.
> > > > > > >
> > > > > > > My initial reaction when I first read the JSR (almost 2 years
> > > > > > > ago?) was "wow...this sounds just like Barracuda". Then as I
> > > > > > > got more involved it seemed to me that they were taking things
> > > > > > > a significantly different direction (much to my
> > > > > > > disappointment).
> > > > > > >
> > > > > > > Now, if anyone is interested there's a copy of a Barracuda vs.
> > > > > >
> > > > > > Struts vs.
> > > > > >
> > > > > > > JSR-127 review (available here:
> > > > > >
> > > > > > http://atmreports.com/downloads/barracuda_vs_struts_vs_jsr127.zip
> > > > > >) that I
> > > > > >
> > > > > > > completed shortly after attending the first JSR meeting. As you
> > > > > >
> > > > > > read, please
> > > > > >
> > > > > > > keep in mind that:
> > > > > > >
> > > > > > > a) these comments are based on what JSR-127 looked like nearly
> > > > > > > 2 years ago...there's undoubtedly been a huge amount of
> > > > > > > changes,
> > > > > >
> > > > > > refinements, etc,
> > > > > >
> > > > > > > and my recollection is probably fuzzy in many areas.
> > > > > > >
> > > > > > > b) these comments are solely my opinions, and are probably
> > > > > > > wrong in many respects; the purpose of this review was NOT to
> > > > > > > dis either Struts or JSR-127, but rather to try and understand
> > > > > > > how it relates to
> > > > > >
> > > > > > Barracuda. So if
> > > > > >
> > > > > > > anything, its probably more insight into my view of the domain
> > > > > >
> > > > > > than anyone
> > > > > >
> > > > > > > elses.
> > > > > > >
> > > > > > > Nevertheless, perhaps it will still be helpful...
> > > > > > >
> > > > > > > My general "gut reactions" to JSR-127 are that its too tied to
> > > > > >
> > > > > > JSP for my
> > > > > >
> > > > > > > taste (I understand why Sun made this decision, but I think it
> > > > > >
> > > > > > will make it
> > > > > >
> > > > > > > very difficult for them to succeed in the long run). In theory
> > > > > >
> > > > > > JSF is not
> > > > > >
> > > > > > > bound to any specific rendering approach, but last time I
> > > > > >
> > > > > > checked the only
> > > > > >
> > > > > > > implementation being supported was via JSPs, so I think I'd
> > > > > > > agree with Dudley's comments...to me, JSF looks like a souped
> > > > > > > up version
> > > > > >
> > > > > > of Struts. It
> > > > > >
> > > > > > > seems like its taking an awful long time to deliver anything.
> > > > > >
> > > > > > Its not going
> > > > > >
> > > > > > > to be open source when its finally released either (has this
> > > > > >
> > > > > > changed?). In
> > > > > >
> > > > > > > short, I think most of the "problems" I see with Struts still
> > > > > >
> > > > > > apply to JSF,
> > > > > >
> > > > > > > and I'm not at all sure why someone who is already using Struts
> > > > > >
> > > > > > would go to
> > > > > >
> > > > > > > the effort of migrating to JSF (but I'm sure there are folks
> > > > > >
> > > > > > here who could
> > > > > >
> > > > > > > comment on that). Consequently, I don't really see it as
> > > > > > > competing with Barracuda because I think that even though they
> > > > > > > are using
> > > > > >
> > > > > > similar verbiage,
> > > > > >
> > > > > > > the architectures really are fundamentally different.
> > > > > > >
> > > > > > > At any rate...those are my haphazard thoughts (worth precisely
> > > > > >
> > > > > > what you paid
> > > > > >
> > > > > > > for them). Comments and feedback welcome...
> > > > > > >
> > > > > > > Christian
> > > > > > > ----------------------------------------------
> > > > > > > Christian Cryder
> > > > > > > Internet Architect, ATMReports.com
> > > > > > > Project Chair, BarracudaMVC - http://barracudamvc.org
> > > > > > > ----------------------------------------------
> > > > > > > "Coffee? I could quit anytime, just not today"
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: [email protected]
> > > > > > > > [mailto:[email protected]]On Behalf Of Robert
> > > > > > > > J.P. Yang Sent: Monday, September 01, 2003 11:48 PM
> > > > > > > > To: [email protected]
> > > > > > > > Subject: [Barracuda] JavaServiceFace vs BarracudaMVC
> > > > > > > >
> > > > > > > >
> > > > > > > > Sun's JFS final release will be done!
> > > > > > > > How about JFS vs BarracudaMVC?
> > > > > > > > And,especially,what's barracudamvc longterm planning?
> > > > > > > > _______________________________________________
> > > > > > > > Barracuda mailing list
> > > > > > > > [email protected]
> > > > > > > > http://barracudamvc.org/lists/listinfo/barracuda
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Barracuda mailing list
> > > > > > > [email protected]
> > > > > > > http://barracudamvc.org/lists/listinfo/barracuda
> > > > > >
> > > > > > _______________________________________________
> > > > > > Barracuda mailing list
> > > > > > [email protected]
> > > > > > http://barracudamvc.org/lists/listinfo/barracuda
> > > > >
> > > > > _______________________________________________
> > > > > Barracuda mailing list
> > > > > [email protected]
> > > > > http://barracudamvc.org/lists/listinfo/barracuda
> > > >
> > > >_______________________________________________
> > > >Barracuda mailing list
> > > >[email protected]
> > > >http://barracudamvc.org/lists/listinfo/barracuda
> > >
> > > _______________________________________________
> > > Barracuda mailing list
> > > [email protected]
> > > http://barracudamvc.org/lists/listinfo/barracuda
> > >
> >
> >_______________________________________________
> >Barracuda mailing list
> >[email protected]
> >http://barracudamvc.org/lists/listinfo/barracuda
>
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda