You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Michael Bauschert <Mi...@de.ibm.com> on 2007/03/29 10:32:08 UTC

ids of form fields

Hi,

while running our jsf app into tomcat without jetspeed a form field is 
having the id "connectFields:namespace". While running under jetspeed the 
id is "viewjs_P_1117fdb43b4_10007_:connectFields:namespace".

The problem is: If myfaces tries to use javascript calls to access fields 
with document.getElementById("connectFields:namespace") this is not 
working.

The Question: How to change the app  or how to setup MyFaces / Jetspeed to 
enable MyFaces to get the Javascript elements ?

Regards
        Michael

Re: ids of form fields

Posted by yangwawa <wa...@sjtu.edu.cn>.
hi,Michael
Now I am facing the same trouble, please tell me how u had solved that.Thank
u very much!
Juan Yang

Michael Bauschert wrote:
> 
> Hi,
> 
> while running our jsf app into tomcat without jetspeed a form field is 
> having the id "connectFields:namespace". While running under jetspeed the 
> id is "viewjs_P_1117fdb43b4_10007_:connectFields:namespace".
> 
> The problem is: If myfaces tries to use javascript calls to access fields 
> with document.getElementById("connectFields:namespace") this is not 
> working.
> 
> The Question: How to change the app  or how to setup MyFaces / Jetspeed to 
> enable MyFaces to get the Javascript elements ?
> 
> Regards
>         Michael
> 

-- 
View this message in context: http://www.nabble.com/ids-of-form-fields-tf3485063.html#a13949908
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: ids of form fields

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Mar 29, 2007, at 1:32 AM, Michael Bauschert wrote:

> Hi,
>
> while running our jsf app into tomcat without jetspeed a form field is
> having the id "connectFields:namespace". While running under  
> jetspeed the
> id is "viewjs_P_1117fdb43b4_10007_:connectFields:namespace".
>
> The problem is: If myfaces tries to use javascript calls to access  
> fields
> with document.getElementById("connectFields:namespace") this is not
> working.
>
> The Question: How to change the app  or how to setup MyFaces /  
> Jetspeed to
> enable MyFaces to get the Javascript elements ?
>

There is a way to encode resources with the Portlet API tag library  
"namespace" tag

<A HREF=”javascript:<portlet:namespace/>doFoo()”>Foo</A>

so you could try something like:

document.getElementById(<portlet:namespace/>)

although I don't think that will give you the full "viewjs_" prefix
I need to have a closer look at this




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org