Column link

I am trying to get a hyperlink in my tableview, tried all possible ways to get a link. As suggested in forums i tried in setting the column data as link in Bean noting happens, when i try it in jsp page it gives error. am I missing any jar files. 
Bean :
public void TestTableViewModel(IPortalComponentRequest componentRequest){
          Vector column = new Vector();
          column.addElement("Link");
          Vector data = this.getData(componentRequest);
          model = new DefaultTableViewModel(data, column);
             model.getColumn("Link").setType(TableColumnType.LINK);
     private Vector getData(IPortalComponentRequest componentRequest)
          Vector retVector = new Vector();
          Vector data = new Vector();
          data.addElement("click here");
          retVector.add(data);
          return retVector;
JSP :
<%@ taglib uri="tagLib" prefix="hbj" %>
<jsp:useBean id="myBean" scope="application" class="com.tst.img.ISBean" />
<hbj:content id="myContext" >
  <hbj:page title="PageTitle">
   <hbj:form id="myFormId" >
     <hbj:tableView
     id="myTableView1"
     model="myBean.model"
     design="ALTERNATING"
     headerVisible="true"
     footerVisible="false"
     fillUpEmptyRows="true"
     navigationMode="BYLINE"
     selectionMode="NONE"
     headerText="test"
     onNavigate="myOnNavigate"
     visibleFirstRow="1"
     visibleRowCount="2"
     width="700px">
     <%
          myTableView1.setColumnType(TableColumnType.LINK,1);
%>
</hbj:tableView>
   </hbj:form>
  </hbj:page>
</hbj:content>
with Jsp i get compilation error
Error in executing a process for compilation, C:/usr/sap/EP6D/j2ee/j2ee_00/cluster/server/services/servlet_jsp/work/jspTemp/irj/root/WEB-INF/portal/portalapps/IMAGESHOW/work/pagelet/_sapportalsjsp_TabImgShow.java:141: cannot resolve symbol symbol : variable TableColumnType location: class pagelet._sapportalsjsp_TabImgShow myTableView1.setColumnType(TableColumnType.LINK,1); ^ 1 error .
Exception id: 12:01_20/08/05_0065
See the details for the exception ID in the log file

You could do what i suggested in my earlier post.
https://forums.sdn.sap.com/thread.jspa?threadID=58649&messageID=621982#621982
All you have to do is when you build your data vector, put the complete html text.
private Vector getData(IPortalComponentRequest componentRequest)
            Vector retVector = new Vector();
            Vector data = new Vector();
            data.addElement("<a href=http://www.cnn.com>CNN</a>");
            retVector.add(data);
            return retVector;
The way you are doing will also work but the table columns which has link actually links to another column which contains the link. Your code should look like following.
public void TestTableViewModel(IPortalComponentRequest componentRequest){
Vector column = new Vector();
column.addElement("Link");
column.addElement("ActualLink");
Vector data = this.getData(componentRequest);
model = new DefaultTableViewModel(data, column);
model.getColumn("Link").setType(TableColumnType.LINK);
model.getColumn("Link").setLinkColumnKey("ActualLink");
private Vector getData(IPortalComponentRequest componentRequest)
Vector retVector = new Vector();
Vector data = new Vector();
data.addElement("click here");
data.addElement("http://www.cnn.com");
retVector.add(data);
return retVector;
I don't think you need to do 
<%
myTableView1.setColumnType(TableColumnType.LINK,1);
%>
in your JSP but if you
Make sure your add following import statement in your JSP.
<%@ page import="com.sapportals.htmlb.enum.TableColumnType" %>
Message was edited by: Prakash  Singh

Similar Messages

  • How to open a popup win within a PDF file (c:\test.pdf) as Column Link

    I have a interactive report based on a Table (EMP). I need to create a column link that opens a pdf file within the employee curricula
    All the curriculum are stored in a windows folder, and in the EMP table there is a field named PATH containing the full path name.
    Thxs,
    Giuseppe.

    Hello, Sebastian
    I've tested your suggestion and in effect it works.
    I think is good solution if the files are readonly (pdf, images, etc).
    In my case the files are updatable by the end user.
    Consider that I'm using the following configuration:
    APEX 4.0, DB 11.2.0.1 and EPG
    This means that:
    a. All the files need to be loaded in the XML_DB via PL/SQL or via WebDAV (let's say in... /i/mydocs)
    b. When the end user opens the file via the "Column link" this is read-only in the browser, to modify it, the end user need to save updated version in (/i/mydocs), replacing the existing ones, .. and this is a bit complicated .
    Any other suggestion will be appreciate.
    Regards,
    Giuseppe.

  • Submit Action and Redirect page in Tabular form Column Link

    Hi All,
    I have a scenario to submit the current page and redirect to another page with the arguments, when i clink on the link which is created using column link in Report Attributes.
    I can able to perform the submit action, but redirection is not happening.
    Created a column link on non database column by providing
    Link Attribute :     <a href="#" onclick="doSubmit('SAVE')">#FAM_DET#</a>
    Target : Page in this application
    Page : 7
    Item name : P7_TRAVEL_REQ_ID
    item Value: #TRAVEL_REQ_ID#
    Item name : P7_TRAVEL_REQ_LINE_ID
    item Value: #TRAVEL_REQ_LINE_ID#
    Can anyone help me out to resolve this.

    811598 wrote:
    Please update your forum profile with a real handle instead of "811598".
    When posting a question here, always include the following information:
    Full APEX version
    Full DB/version/edition/host OS
    Web server architecture (EPG, OHS or APEX listener/host OS)
    Browser(s) and version(s) used
    I have a scenario to submit the current page and redirect to another page with the arguments, when i clink on the link which is created using column link in Report Attributes.
    I can able to perform the submit action, but redirection is not happening.
    Created a column link on non database column by providing
    Link Attribute :     <a href="#" onclick="doSubmit('SAVE')">#FAM_DET#</a>
    Target : Page in this application
    Page : 7
    Item name : P7_TRAVEL_REQ_ID
    item Value: #TRAVEL_REQ_ID#
    Item name : P7_TRAVEL_REQ_LINE_ID
    item Value: #TRAVEL_REQ_LINE_ID#
    Remove the link attribute (what you have used there is not the correct way to use this property anyway).
    Change the target page to the same page as the report.
    Set the Column Link Request property to BRANCH_TO_PAGE_ACCEPT|SAVE.
    Create an On Submit: After Processing (After Computation, Validation, and Processing) branch to page 7, conditional on the SAVE request.
    If the SAVE request can be triggered by something other than the report link (e.g. a Save button) then use another request value that will trigger the required page process in the link request and branch condition, e.g. BRANCH_TO_PAGE_ACCEPT|APPLY and APPLY respectively.
    Note that there is a bug in BRANCH_TO_PAGE_ACCEPT processing in APEX 4.2.3 and a patchset exception must be installed for this approach to work on this APEX release.

  • Trying to do a pop up from a column link

    I have one interactive report (page 1) which I have defined a column link.
    The column link is targeted to another interactive (page 2) within the same application.
    Everything works except when I click on the column link in page 1 it does not pop up page 2, but instead replaces page 1 in the current window.
    I have tried all kinds of java code popup window functions, but to no avail.
    This is another simple syntax mistake I am making I am sure.
    Any Ideas ?
    Thanks in advance for your time.
    Anon

    Hello Anon,
    Ok, here is how this works:
    If Target = "Page in This Application" Then
    in the Link Attributes box just above the Target put target="_blank" - this will open a new window and display your target page in that window.
    HOWEVER, if your target = URL, you still need to put target="_blank" in the Link Attribute box, but put the URL in the place provided.
    When I responded before, I got ahead of myself. This: javascript:popUp2('f?p=&APP_ID.:2:&SESSION.::&DEBUG.::P2_ID:#ID#',500,400)
    is used in the HTML source for a Region (for example) to define a link.
    Sorry for the confusion,
    Don.
    You can reward this reply by marking it as either Helpful or Correct :)

  • How to set up a column link to the column attribute in a report

    Hi All
    I have 6 column in a sql report in a page, column names are (Devicename devicerole,from etc).
    Now i need to set a link to this column and this need to link to the another page
    Thanks & Regards
    Srikkanth.M
    Edited by: Srikkanth.M on Apr 6, 2011 6:17 PM

    Hi
    Read this and follow it...
    >
    Go to the report attributes, then click on the edit link button by the side of the column you want to be a link to get to the column attributes.
    >
    So...
    1. Go to edit the page that contains your report.
    2. Click on the report region as if you were going to edit the report query.
    3. Click the Report Attributes tab.
    4. Click the button at the side of the column in question.
    5. Scroll down to the Column Link section and fill in the details.
    I really can't put it much more simply than that...
    Cheers
    Ben

  • Passing parameter from interactive report column link to new page

    I'm very simply trying to pass the value of the column link to the where clause on the next page.
    Interactive Report on P2 has column link fid alias in sql query.
    I read somewhere to refer prefix the interactive report column with IR ??
    So I have item name P2_FID, value #FID#. Anyway, I've tried a kazillion things.
    Created a hidden item with same source value... sigh.
    Is there a syntax to refer to a report column link, rather than an item_id in a region where clause?
    Is there a simple direct way to do this?
    Thanks,
    Pamela
    -----pls/apex/f?p=163:1:2746459963336955::NO::P2_FID:119

    Thank you Varad...
    Unfortunately, I am still getting no data found. (and there IS data).
    a) Do you mean in the link column section of the report attributes? that is done: item 1 name= IR_P2_FID, value = #FID#
    b) Do you mean my changing my hidden page item to ir_p2_fid with its source value as #FID# ? also done.
    Do I need this hidden item?, and if not how do I refer to link in the where clause of the called page's sql region?
    3) Where Fishery_id = :IR_P2_FID
    Where Fishery_id = &IR_P2_FID
    Thanks again!
    Pamela

  • No data found when adding column link to classic report

    Hi,
    Oracle 11g r2, APEX 4.1.1.00.23.
    I have some classic reports.
    I go to Report Attributes, then I click Add Column Link in the "Tasks" right menu, it adds me a column link, I just add some text for the link and a page to go to.
    Then I run the report and I get :
    report error:
    ORA-01403: no data foundTested with several classic reports on multiple pages.
    Debug mode shows me :
    0.43816     0.00240     ...Execute Statement: select distinct [...] order by 3,11 ,4
    0.44056     0.00162     print column headings
    0.44218     0.04816     rows loop: 25 row(s)
    0.49037     0.00141     report error: ORA-01403: aucune donnée trouvée
    0.49175     0.00078     Computation point: After Box BodyWhen I run the query in my favorite tool, I get expected results.
    Did I missed something ?
    Thank you.
    Yann.

    Yann39 wrote:
    <font size="4">Is it an APEX bug ?</font>
    - Create a new Region of type Classic Report, then set Region source as :
    begin
    return test_return_query;
    end;- Run the page, the report works as expected
    - Go to Report Attributes and click Add Column Link (and just specify a text for the link and a page to go to).
    - Run the page, you should get the error !This might be unorthodox but try wrapping your returned query within an SQL statement, like so:
       begin
          return 'SELECT t.* FROM ('||test_return_query||') t';
       end;
    I can reproduce it on oracle.apex.com if needed...If my suggestion doesn't work, I think this might be the only option. You could create a new forum posting with the word "BUG" in the title, along with a link to this thread and the relevant workspace details (with guest developer credentials).

  • Report region with column link that opens a pdf doc based on report query

    Hello
    I'm building a report table that displays info about a customer - simple select - and, for each record, has associated column links based on report queries that receive ID as parameter. When clicked, it opens the report in pdf extension. My problem here is how to pass the ID as a parameter to that report query considering i'm using a report table and that there are no items in page 71...
    This is the report query i'm using:
    select initcap(a.customer) customer
    , initcap(a.address) address
    , initcap(a.rep) rep
    , (select initcap(b.city)
    from portal_records b
    where b.contrib=a.contrib
    and b.year=to_char(sysdate,'yyyy')) city
    , (to_char(a.datereg,'dd')||' de '||to_char(a.datereg,'Month')||' de '||to_char(a.datereg,'yyyy')) datereg
    from portal_authorizations_cve a
    where a.id=:P71_ID ???????????????
    I thank in advance all your replies!!

    Hello
    First of all, let me compliment your for your demo application... It's awesome!
    I've looked into your sample (page 15) and, as far as i see, it opens a document saved in a table's column. I don't want the file to be saved there but generated when the user clicks on that particular link... So i still have the problem of how to pass the right ID as a parameter considering there is no page item on that page...
    My javascript knowledge is little so i ask you: when clicking the link, is there any way of opening a window with the url f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=Authorization_CVE and the ID as a parameter?
    I thank in advance!

  • Interactive report, conditional display of column link

    Hello,
    We have requirement to disable editing in case that status of field is 1 (1=Closed).
    Is there any way to disable it on interactive report.
    case when status=1 column link should be disabled (not visible) in order to prevent future edits on payroll.
    SELECT payroll_no, status
    FROM hr_payroll
    ORDER BY payroll_no DESC;
    I tried link below, but it's not working in my case.
    http://nerd.net.au/24-apex-application-express/report-layout/92-conditionally-show-report-link-column-based-on-value-of-…
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    Application Express 4.2.2.00.11
    Thank you in advance,
    Regards, FM

    CASE WHEN status = 'ACTIVE' then
    <a href="f?p=&APP_ID.:60:&SESSION.::&DEBUG.::P60_EMPLOYEE_ID:'||employee_id||'"> </span><br /><span class="Moobi_Code"><img src="#WORKSPACE_IMAGES#deactivate_button.png"></a>'</span><br /><span class="Moobi_Code">ELSE NULL END deactivate_employee,
    from
    EMPLOYEES
    What exactly is the error you get? What HTML is showing in the HTML source?
    Just by looking at this I would say you need to remove the "/" in front of the f?p
    Keep in mind this way could cause problems if you start to use checksum, then you might want to look into using APEX_UTIL.PREPARE_URL to create your URL.

  • How do you pass more than 3 items to another page via a Column Link?

    I know this is a simple question, but I don't see it covered in the manual.
    I have a report on page 1, when the user clicks on a column link, I'd like to pass 4 items to the page that is called.
    The Column Link area allows you to specify 3 items. How do people normally accomplish this?
    Do you somehow use page zero? Do you use Application Items for this purpose?
    Also, can someone recommend a good APEX book to supplement the manuals?
    Thanks

    hI
    Oh Varad I didnt know this, Thanks for a new tip ;)
    Just change the target to URL and enter a simple statement
    in the URL section
    f?p=&APP_ID.:50:&SESSION.:10:&DEBUG.::P50_item1,P50_item2,P50_item3,P50_item4:value1,#column_name2#,#column_name3#,#column_name4#
    Use value when u know a fixed value to be passed
    and column names on the same report can be passes by using #column_name#
    Hope this helps
    Thanks
    Ashri
    Edited by: Ashri on Nov 14, 2008 8:34 AM

  • Calendar weekly view: unwanted nonbreaking spaces before the column link

    Hello,
    I have a column link in a calendar. In the weekly view, before the link text appears (specifically before the anchor element) multiple nonbreaking spaces are output. The more links I add to the calendar, the more spaces appear, so the links are all over the place in the cells. The HTML looks like
    td class="DefDay" valign="top" ... multiple-nbsp-tags-here ... anchor-element ... link-text
    Any ideas?
    regards,
    Malcolm.

    Hi Denes,
    Thanks for your quick reply. I have mailed you a screenshot of the corruption I am talking about. The whole page template is "application default". In the "Calendar Attributes" tab in that region, I have three options in the template combo-box: calendar, calendar alternative 1, and small calendar. None of those options have any effect on the column link display corruption. In the "Region Definition" tab. the user interface template is "reports region". I have tried a number of different templates there and none affect the corruption in the column-link display either. I'm using Theme "Modern Blue 20" and the template utilization screen off Shared Components says my calendar page is using a calendar template.
    regards,
    Malcolm.

  • Can't get column link in report to work

    I'm trying to get a column link in a report to work and I keep on getting the error "Query cannot be parsed, please check the syntax of your query. (ORA-00972: identifier is too long)" The code looks like this:
    SELECT IDDR_NAME AS EDIT, IDDR_NAME AS VIEW_DETAILS, IDDR_NAME,
           IDDR_VINTAGE_YEAR, DATE_DUE, DATE_SUBMITTED,
           SUMMARY_DESCRIPTION, RSTATUS, SSTATUS,
           '<a href='"'||:APP_ID||':287'||:APP_SESSION||'">'||link||'</a>'
    FROM IDDRI've tried the above and other variations of link syntax that I found in other posts on the forum but everything seems to give me an error. I need to put think link into the code because it will eventually be a conditional link.
    Thanks
    - Brian

    Thanks for the replies.
    After I posted, I tried something a little different that is sort of working. I tried making my link like so:
    '<a href=''f?p=&APP_ID.:287:&SESSION.::&DEBUG.">LINK</a>'(The '#' is really a double quote but I had to make it like that for the forum...)
    When I use the above link syntax with a SQL query it works. The problem is, I need to use a PL/SQL function returning n SQL query. When I try the same link syntax with that, it seems to think :287 is a bind variable.
    I get the error message:
    (ORA-20001: Unable to bind :287 verify length of item is 30 bytes or less. Use v() syntax to reference items longer than 30 bytes. ORA-01006: bind variable does not exist)
    Thanks again
    - Brian

  • URGENT Printing a BI publisher report from a column link in APEX

    I am developing an APEX report with a column link that will call a BI publisher report, the case is the link column in the APEX report will pass the item number to the BI publisher query.
    At the moment this is what I am doing:
    1- Create a hidden item on top of page zero. (e.g. PARAM1_VALUE)
    2- Create a report query and a report layout (For BI Publisher) in the Shared Components. (e.g ITEM_REPORT)
    3- Include the state session in the report query and reference that item in the query. (e.g. SELECT * FROM items where item_number = :PARAM1_VALUE)
    4- Create an APEX report displaying orders with the item number as a link column.
    5- In the Link column I set the report URL request to be "PRINT_SERVER=ITEM_REPORT".
    6- In addition I set the PARAM1_VALUE to be #ITEM_NUMBER# on the link.
    When I press on the link the BI publisher report prints but it doesn't display anything except the Headers, my understanding is that PARAM1_VALUE is not set with the item_number value when I press on the link and thus the query returns no results as when I remove the condition from the query i can see the report printing.
    Please help as this is urgent

    I opened the session and it is there with a proper value, it appears that whenever I enable the inclusion of session state in my shared components query the query returns no rows even if I am not using the item in the query.
    So if my query is "SELECT * FROM items" it will display nothing, the only way to get the report data back is to untick the inclusion of the session state and remove any reference to the item from my query, then I will get the report with all my data (which is NOT what I am trying to do).
    Thanks alot
    Khaled Jamoos

  • Adding more Values to the Column Link in Apex

    Hi,
    Is there any possibility of adding extra or more values to the column link in Apex. I already have 3 Column Name and Values linked to a different report.
    Eg:-
    Column Link:
    Link Text : #COUNT#
    Name       Value
    DATE #DATE#
    PRICE #PRICE#
    COST #COST#
    I want to add one more Name like 'ID' and corresponding and Value #ID#.
    Please Help...
    Thanks in Advance..
    Edited by: user13561710 on Jan 10, 2011 9:20 AM
    Edited by: user13561710 on Jan 10, 2011 12:34 PM

    Thanks Varad,
    But it didn't worked, The page has option to link only 3 values.
    My Target is 'Page in this Application" not a URL.
    I used your format and if you apply changes and come back the whole thing is dissappeared and even the link to page in application is inactive.
    Is there any other way???
    Thanks
    Edited by: user13561710 on Jan 10, 2011 10:49 AM
    Edited by: user13561710 on Jan 10, 2011 12:35 PM

  • Column Link page as a pop up window instead of full page.

    I have set up a column link to pass some variables and see a nice result as a page.
    I would rather see that page show up as a pop up window rather than as a full screen page. Where can I tell my column link to show the page as a smaller version than full screen page please?
    Thanks in advance !
    JMM.
    Edited by: metropoj on Nov 16, 2010 10:43 AM

    Hi Tarun,
    Is this code set at the URL TARGET of the button?
    Have you already tried with another browser?
    Try once this way: javascript:popUp2('f?p=&APP_ID.:3:&SESSION.::&DEBUG.:::',400,300)PS*: When you're going to post any code use as delimiter.
    Regards,
    Alan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Column link - call java script & assign current report column value to item

    Hi,
    How to call java script and assing current report column value to item?
    I have a button column in the report to 'delete' the selected row.
    I want to first show dialog box with message 'Are you sure?'. If yes, process to delete
    will be executed, else no action.
    In order to fire JS, I used Column Link ->Target=URL.
    Problem: The alert is showing but I don't know how to pass selected row's primary
    key value to process (to delete selected row).
    I have a item which can be used to store selected primary key value but don't know how to assign the value
    when button pressed.
    Thanks in advance
    Dip

    Ok. The issue has been resolved by following way.
    PAGE PROCESS: delete_request
    begin
    delete xyz
    where id = :P8_id;
    commit;
    end;BUTTON URL:
    javascript: DelRec(null,'CREATE', 'f?p=&APP_ID.:8:&SESSION.:delete_request:NO::P8_id:#id#');Java Script:
    <script language="JavaScript1.1" type="text/javascript">
    function DelRec(msg, req, url){
    var confDel = msg;
    if(confDel ==null){
    confDel= confirm("Are you sure?");
    }else{
    confDel= confirm(msg);}
    if (confDel== true){
    redirect(url);           }
    </script>

Maybe you are looking for