RE: Error: doSubmitAndLock is not defined
"Jancsi A. Farkas(fx)" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <1062680771.1288.40.camel@delphi> |
Acutally i don't think is related to your changes, as we did not update
the barracuda version, we are working with barracuda 1.2.0.
The code used is something like this (returned from model):
BAction b = new BAction();
b.setAction(new GetBaseModelComponents());
Integer p1 = null;
Integer p2 = null;
if(gForm!=null)
{
p1 = gForm.getIntegerVal(GForm.P1);
p2 = gForm.getIntegerVal(GForm.P2);
}
// set params
b.setParam(GForm.P1, p1==null ? "" : p1.toString());
b.setParam(GForm.P1, p2==null ? "" : p2.toString());
b.setAttr("value","A value);
return b;
Just checked the code, seems like the script is added because weare
returning a BAction. (in all other cases we set return only the string
value, wich is replaced with the value).
For the moment I took the scripts and pasted them in the html file, and
it seems to work, however this is an uggly fix for the problem.
Anyway, I'm just wondering if:
- this script behaviour can be disabled (as I don't need to disable the
buttons after clicking, because it does not matter if they are disbled
or not)
- for using the scripts, should I add the refference to the
FormControl.js file, or this should be added by the framework?
Jancsi
On Thu, 2003-09-04 at 15:37, 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
>