From macosx@opengroupware.org Thu Nov 2 14:54:07 2006 From: macosx@opengroupware.org (Helge Hess) Date: Thu, 2 Nov 2006 15:54:07 +0100 Subject: [OGo-MacOSX] OWFormElementName In-Reply-To: References: Message-ID: <2EF1DBC2-6E55-4B18-8739-766526AB4E0C@opengroupware.org> Hi, this has been moved to the developer list. Issue got lost over holidays ;-) Greets, Helge On Oct 11, 2006, at 18:58, Marco Scheurer wrote: > Hi all, > > While trying to update an old (> 2 years) SOPE application to SOPE > 4.5 I encountered a problem where form elements would be confused > with one another. This happens for instance if we reuse a component > in several place on a page, a common occurence. > > In our opinion the cause of the problem is that the default name > returned for element names is not a unique ID anymore, but uses the > element's wod given name (see code below, from WOInput.m in > NGObjWeb). This should not be the case, even if it helps > Javascripting. > > Am I missing something? Is there a way to force a unique ID without > changing the code below? > > Thanks in advance, > > marco > > > > NSString *OWFormElementName(WOInput *self, WOContext *_ctx) { > NSString *name; > > if (self->name == nil) > return [_ctx elementID]; > > if ((name = [self->name stringValueInComponent:[_ctx > component]]) != nil) > return name; > > [[_ctx component] > logWithFormat: > @"WARNING: in element %@, 'name' attribute > configured (%@)," > @"but no name assigned (using elementID as name) !", > self, self->name]; > return [_ctx elementID]; > } > > -- > OpenGroupware.org MacOS X > macosx@opengroupware.org > http://mail.opengroupware.org/mailman/listinfo/macosx -- Helge Hess http://docs.opengroupware.org/Members/helge/