You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Michael Jenik (JIRA)" <de...@myfaces.apache.org> on 2006/04/10 17:59:00 UTC

[jira] Closed: (MYFACES-1275) commandLink's actionListener dont work

     [ http://issues.apache.org/jira/browse/MYFACES-1275?page=all ]
     
Michael Jenik closed MYFACES-1275:
----------------------------------

    Fix Version:     (was: 1.1.3-SNAPSHOT)
     Resolution: Invalid

I created TOMAHAWK-240 for this problem...
It seams to be more an aliasbean problem related.

> commandLink's actionListener dont work
> --------------------------------------
>
>          Key: MYFACES-1275
>          URL: http://issues.apache.org/jira/browse/MYFACES-1275
>      Project: MyFaces Core
>         Type: Bug

>     Versions: 1.1.2-SNAPSHOT
>  Environment: Debian unstable tomcat5 I have experienced the bug with 1.1.1 too.
> I have te most resent snapshots of tomahack and myfaces.
>     Reporter: Michael Jenik

>
> This commandLinks dont work. (laBean is an alias for ubicacion)
>  
>  
> <h:dataTable id="didyoumean" value="#{laBean.didyoumeanList}" var="unlink">
> 	<h:column>	
> 		<h:commandLink value="#{unlink}" actionListener="#{ubicacion.didyoumeano}"></h:commandLink>
> 	</h:column>
> </h:dataTable>
>  
>  
>  
> But this command links do work:
>  
> <h:panelGrid columns="1" id="didyoumeanlla" binding="#{ubicacion.didyoumeanPanel}" rendered="true"/>
>  
>  
>  
> where the code is ...
>  
>  
> 			didyoumeanPanel = new HtmlPanelGrid();
> 			List<UIComponent> children = didyoumeanPanel.getChildren();
> 			Iterator<String> val = didyoumean.iterator();
> 			while (val.hasNext()){
> 				HtmlCommandLink unlink = new HtmlCommandLink();
> 				unlink.setValue(val.next());
> 				unlink.setActionListener(app.createMethodBinding("#{ubicacion.didyoumeano}", new Class[] {ActionEvent.class }));
> 				children.add(unlink);
> 				didyoumeanLinks.add(unlink);
> 				didyoumeanList.add((String) unlink.getValue());
> 			}
> 		}
> Note that the components are inside a form and a subview....
> Here I show two samples of the render of the commandLink wich works and the render of the commandLink :
> works:
> ...
> <table id="mainForm:sub:didyoumeanlla"><tbody><tr><td><a href="#" onclick="clear_mainForm();document.forms['mainForm'].elements['autoScroll'].value=getScrolling();document.forms['mainForm'].elements['mainForm:_link_hidden_'].value='mainForm:sub:didyoumeanlla_1';if(document.forms['mainForm'].onsubmit){document.forms['mainForm'].onsubmit();}document.forms['mainForm'].submit();return false;" id="mainForm:sub:didyoumeanlla_1">puente 2</a>
> ...
> ..
> does not work:
> <table id="mainForm:sub:didyoumean">
> <tbody>
> <tr><td><a href="#" onclick="clear_mainForm();document.forms['mainForm'].elements['autoScroll'].value=getScrolling();document.forms['mainForm'].elements['mainForm:_link_hidden_'].value='mainForm:sub:didyoumean_0:_id11';if(document.forms['mainForm'].onsubmit){document.forms['mainForm'].onsubmit();}document.forms['mainForm'].submit();return false;" id="mainForm:sub:didyoumean_0:_id11">puente 2</a>
> ...
> look at the auto generated id _id11!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira