voyent
Error in OutputChart image map  XML
Forum Index -> Contributor's Corner
Author Message
achimNick

Joined: 08/May/2007 00:00:00
Messages: 6
Offline


Hello,

I'm playing around with the outputChart component and discovered, that there is a problem, when you want to use an actionListener. In this case an image map is rendered. Unfortunately the http attribute gets the value Code:
return false;
. I think what had been intended was to invalidate this link. This could be done by using Code:
javascript;
.
To make a proof of concept I patched the code of com.icesoft.faces.component.outputchart.OutputChart in the method generateClientSideImageMap.

The new method.

Code:
    
 void generateClientSideImageMap(DOMContext domContext, Element map) {
         if (isClientSideImageMap()) {
             Iterator area = getGeneratedImageMapArea().values().iterator();
             while (area.hasNext()) {
                 ImageMapArea areaMap = (ImageMapArea) area.next();
                 Text areaNode = domContext.createTextNode(areaMap.toHTML(
                         "title ='" + areaMap.getLengendLabel() +
                         getParentFormId() + "']['" + ICE_CHART_COMPONENT +
                         "'].value='" + getClientId(getFacesContext()) +
                         "id-key" + areaMap.hashCode() +
                         "';iceSubmitPartial(document.forms['" +
                         getParentFormId() + "'],this,event); return false;\""));
                 map.appendChild(areaNode);
             }
         } else {
             //logging client side image Map was not enabled
         }
     }
 
 


I hope this helps and the code can be used in the next release.

Greetings,

Achim.
adnan.durrani


Joined: 19/Jan/2006 00:00:00
Messages: 437
Offline


Hi Achim,

You didn't mentioned what kind of problem you were facing. There are many applications including the component-showcase are using the actionListener on the outputChart component and no problem ever been reported.

Thanks,

-- Adnan Durrani --
[Email]
abhijit.jere

Joined: 23/Jun/2008 00:00:00
Messages: 3
Offline


adnan.durrani wrote:
Hi Achim,

You didn't mentioned what kind of problem you were facing. There are many applications including the component-showcase are using the actionListener on the outputChart component and no problem ever been reported.

Thanks,
 


Hi,

I'm facing a problem with pie2D chart that on pie image click actionListener is never called! I'm using release 1.7.2 SP1 1.7.2_11 (2008-11-26 14:15 MST)

I do see that actionListener does get called for a *bar* chart in component showcase demo. Is is also supported for *pie2D* chart? What may I be missing here? (the code is exactly same as that in component showcase.)

Thanks.
-Abhijit
wcaicedo

Joined: 03/Jan/2009 00:00:00
Messages: 13
Offline


I'm having the same issue with ICEfaces 1.8.1, for some weird reason, it is navigating away from the page to a non existent page (myCurrentUrl + return false).

What should i do?

Regards,

William
adnan.durrani


Joined: 19/Jan/2006 00:00:00
Messages: 437
Offline


Hi Abhijit,

The pie2D supports clicks, you just need to add actionListener to it and the component should fire the ActionEvent on clicks.

Thanks,

-- Adnan Durrani --
[Email]
adnan.durrani


Joined: 19/Jan/2006 00:00:00
Messages: 437
Offline


Achim's suggested fix applied.

http://jira.icefaces.org/browse/ICE-4920

-- Adnan Durrani --
[Email]
 
Forum Index -> Contributor's Corner
Go to:   
Powered by JForum 2.1.7ice © JForum Team