Dynamic link does not work

Hello

I created this script:
*create table t (id number, type varchar2(30), name varchar2(30));*
*insert into t values ( 11, 'FOLDER', 'NAME_11' );*
*insert into t values ( 12, 'FOLDER', 'NAME_11' );*
*insert into t values ( 13, 'FOLDER', 'NAME_12' );*
*insert into t values ( 21, 'BOOKMARK', 'NAME_21' );*
*insert into t values ( 22, 'BOOKMARK', 'NAME_21' );*
*insert into t values ( 23, 'BOOKMARK', 'NAME_22' );*
*commit;*
Then, I created a page with an area of interactive report with the following query:
select
      '<img src="#IMAGE_PREFIX#ed-item.gif" border="0" alt="EditMap" usemap="#editmap"></img>
<map name="editmap">
     <area shape="rect" coords="0,0,16,16" href="http://mywebsite:8080/apex/f?p=&APP_ID.:'
     || decode ( type, 'FOLDER',     '33', '22' )
     || ':&APP_SESSION.::&DEBUG.::P'
     || decode ( type, 'FOLDER',     '33', '22' )
     || '_ID,P'
     || decode ( type, 'FOLDER',     '33', '22' )
     || '_CALLING_PAGE:' || id || ',&APP_PAGE_ID." ></area></map>' Edit,
            id,
            type,
            name,
            decode ( type, 'FOLDER', 33, 22 ) target
from        t
This will display the report as planned: with an icon of change in each line (http://grevesz.smugmug.com/photos/1075191377_fYrQX-X3.png).

But when I click the icon change in the report, it accesses a different page than he should. For example, if I click on change icon in the row with ID = 12, it goes to page 22, instead of 33 (http://grevesz.smugmug.com/photos/1075171276_u2tQd-X3.png).

The link behind the icon points to page 33, as expected. I checked this by defining the attribute of text to display as of the column to change to display as text (special escape characters) (http://grevesz.smugmug.com/photos/1075185441_fgefZ-X3.png).

Can someone help me please understand why is it happening? This could be a caching problem? +*

Thank you

Gabor

I changed my query:

select
Replace(
'EditMap

' ,
'***id***', id
) Edit,
id,
type,
name,
decode ( type, 'FOLDER', 33, 22 ) target
from t

The idea is: each img uses his own card.
It works now.

Date of arrival:
http://Apex.Oracle.com/pls/OTN/f?p=20980:13

Lev

Published by: the November 3, 2010 11:11

Tags: Database

Similar Questions

Maybe you are looking for