List Info

Thread: OWFormElementName




OWFormElementName
user name
2006-10-11 16:58:30
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
macosxopengroupware.org
http://mail.opengroupware.org/mailman/listinfo/macosx
OWFormElementName
user name
2006-11-02 14:54:07
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
> macosxopengroupware.org
> http://mail.opengroupware.org/mailman/listinfo/macosx

-- 
Helge Hess
http://d
ocs.opengroupware.org/Members/helge/


-- 
OpenGroupware.org MacOS X
macosxopengroupware.org
http://mail.opengroupware.org/mailman/listinfo/macosx
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )