Under certain conditions changing IMG link Standard report column

Apex 4.0.2

I have an application that includes photos of employees. I want to display a link to the column in a report of the employee who opens a page to manage the photos of a given employee. Worked well when using an image of compatible icon for all employees.

But I want to do is have two images of icons. If a photo already exists. Another case a photo has not yet been added.

I have included a select with the following CASE statement in the Source of my region.

(CASE WHEN p.person_id IS NULLTHENIMG alt = "nophoto" src ="#WORKSPACE_IMAGES #nophoto.png" > "
ON THE OTHERIMG alt = "photo" src ="#WORKSPACE_IMAGES #photo.png" > "
END) "PHOTO".

I believe it works. I ran in SQL Developer, and it produces the following-

< img alt = "photo" src = "#WORKSPACE_IMAGES #photo.png" >

< img alt = "nophoto" src = "#WORKSPACE_IMAGES #nophoto.png" >

I created a link to the column as a COLUMN of REPORT STANDARD. I put the TEXT of the LINK to #PHOTO #. I put the binding TARGET, PAGE and EMPTY the CACHE settings. The column displays as empty. Firebug shows an empty TD.

I remove the binding TARGET settings, PAGE and CLEAR the cache. The img is displayed correctly. Firebug shows the < img > properly. But of course, it is therefore more a link.

I'm doing something wrong here. But do not know what it is.

Walt K wrote:

Apex 4.0.2

I have an application that includes photos of employees. I want to display a link to the column in a report of the employee who opens a page to manage the photos of a given employee. Worked well when using an image of compatible icon for all employees.

But I want to do is have two images of icons. If a photo already exists. Another case a photo has not yet been added.

I have included a select with the following CASE statement in the Source of my region.

(CASE WHEN p.person_id IS NULL THEN 'nophoto'
     ON THE OTHER 'photo'
END) "PHOTO".

I believe it works. I ran in SQL Developer, and it produces the following-

photo

nophoto

I created a link to the column as a COLUMN of REPORT STANDARD. I put the TEXT of the LINK to #PHOTO #. I put the binding TARGET, PAGE and EMPTY the CACHE settings. The column displays as empty. Firebug shows an empty TD.

I remove the binding TARGET settings, PAGE and CLEAR the cache. The img is displayed correctly. Firebug shows the correctly. But of course, it is therefore more a link.

I'm doing something wrong here. But do not know what it is.

That's because the behavior of standard report is to strip the HTML code of column values used in the expressions of HTML, links in the column and the report when the data is exported as CSV files. This is controlled by the attribute of HTML report of band, which by default is set to Yes. Change this setting to No. , and link images to be displayed.

A solution with a better separation of concerns that are compatible with the Strip HTML and display text default settings is:

  1. Select only the image name in the query [ nvl2(p.person_id, 'photo', 'nophoto') photo is simpler than the previous CASE expression] and make this hidden column
  2. Add a link in the column to the State ('add column link' in the bar of tasks )
  3. Set the property of the new column binding Expression in HTML to#PHOTO#
  4. Specify the column link attributes as required

Last suggestion would be to display thumbnails of the photos used here where they exist rather than an arbitrary generic image...

Tags: Database

Similar Questions

  • Under certain conditions changing cell color in a dynamic array.

    I'm developing an application where I'd like to set the background color of a cell in a PivotTable based on the value of the cell content. I have two questions:

    the first is that when I use the following EL in the property of inlinestyle, I get the cell colored but not completely just the bottom of the text.

    < af:forEach elements = "#{bindings." Var MyView1.attributeDefs}' = 'def' >
    < af:column headerText = "#{bindings." MyView1.labels [def.name]}"id ="c1 ".
    attributeChangeListener = "#{backingBeanScope.backing_my.c1_attributeChangeListener} '"
    rowHeader = "true" >
    < af:outputText value = "#{row [def.name]}" id = 'ot1' "
    GT = inlineStyle "#{row [def.name] 10000?' background-color: Red;':"} "/ >
    < / af:column >
    < / af:forEach >

    the second issue is that I want to only apply it to all the columns after the first column have a valid numeric value. I get a NumberFormatException when a nonnumeric value is encountered. Thank you for your help... :)

    As always, you should mention your jdev version...
    You did not mention what you want in a different color. However you can test yourself with a normal component. Play with styles until you get the result you want. Then copy the inlineStyle into your dynamic table. The string can be very long, you be better off using a skin in the first place.

    You second problem cannot be handled only in a managed bean method. Call a method in a managed bean to check if the value of the cell is a number valid and then apply the style for the element.

    Assemble the two solutions, you end up with a method to a bean that checks the value and returns the inlinestyle or the styleclass string.

    Timo

  • imaqReadAVIFrame retrieves the empty image under certain conditions?

    Hello

    I'm having a problem where imaqReadAVIFrame (.) is the white recovery (all black images) under certain conditions.  The conditions seem to be when the height of the AVI file is equal to or greater than the width and the height is an odd number.  AVI files created by using the various AVI NI Vision (IMAQ 4.6.1, IMAQdx 4.6.1) functions in an application created in CVI 2012 on a computer running Windows 7 64 bit.  AVI files use MJPEG compressor, and they play back fine in an external program like VLC or Windows Media Player.  Any ideas on what this could be?  My solution for now is to not to allow the creation of AVI files where the height is odd and equal to or greater than the width that is not a boring restriction, but it seems like there's something weird happens with imaqReadAVIFrame().  I can provide some AVI files if necessary, but they are 16 + MB each.

    TStanley,

    I managed to reproduce what you see with your .avi files in a program I wrote.  I built a LabVIEW program that creates an AVI file which can be saved to memory and then uses code from the example finder to read who created the file.  I build the file to your specifications at the height is greater than the width, and the height being an odd number of pixels.  Something interesting about this, however, is that it seems to be a point where an odd height is acceptable.  Once you go below the height of 291 pixels, any odd height then works.  The files that I used are written as read in LabVIEW, but that the configuration should be irrelevant because we are seeing the same issue.  In addition, LabVIEW and LabWindows CVI calling the same dll to actually set up the code.

    In this, I think this question arises from the nature of the way you compress the. AVI file.  If you are interested to read a bit more about it, a useful link can be found here:

    http://www.manifest-tech.com/media_pc/avi_formats.htm

    However, what I think is happening, is it that MJPEG file compression format translates into creating files that cannot be read by our software unless the height in pixels is a multiple of 2 or the size of the file is below a certain limit.  To fix that, there is a simple solution. Compress the file with any of the other compression methods available (DV video, Cinepak Codec, codec Intel IYUV, Microsoft RLE, Microsoft Video) and you will be able to open the file without the black screen.  This worked for me and should solve all your problems.  I hope this gives you a bit of insight.

    Kind regards

    Keith M

    Technical sales engineer

  • Under certain conditions allow a Feedback

    We use integrated installation of APEX flow back. We love this feature but, we will only use it in development. Is that anyway, apart from the use of JavaScript to hide or remove the link, we can have this under certain conditions depending on the environment in which the application is running?

    I know we can go turn off in the properties of the Application, but we have a ton of environments and having to manually press this switch whenever get us a new version of the application becomes tedious. I expect something more by program / data driven. For example, is it possible to return this switch integrated with PL/SQL?

    Thank you

    -Joe

    Create a compilation Option. In the development environment has defined the status on Includeand by default on export to exclude.

    Apply the Option to build on the entry page and the navigation bar of your comments. When the application is imported into a different environment the comments link and the page will not be returned.

  • Under certain conditions create script

    Hi, I want to put a redirect code in my stsytem to help, it is possible to build under certain conditions one < script type = "text/javascript" > tag?

    Any help would be great appricieated

    oooo and meta tags as well!

    You are wanting to add a Javascript within a topic and then conditionalise it so it appears only in some outings? If so, check out this part of the aid for the addition of scripts. Once it is in, you should be able to add a tag of conditional compilation to exclude required results.

    I'm not sure you can conditionalise however meta tags. Maybe if you elaborate a bit on what you're trying to reach.

  • How can I add a page under certain conditions?

    Hello

    I'm trying to find a way to add a page to my form under certain conditions. I tried to create this sequel to 'action', but failed to locate the correct action.

    To sum up, I am trying to add a separate page to my existing form with instructions when a specific check box is selected. The separate page is text only and does not form any entries/field. Is there a relatively simple way to accomplish this task?

    You can enter the code in the script editor. If you do not show you can get it by pressing on (on PC) Ctrl + Shift + F5.

  • How to change a field that is the "Standard report column" when adding new line

    Hello

    With apex 5.0 and database 12 c, I have created the query as follows:


    APEX_ITEM. HIDDEN (2, TRANS_M_CODE).

    APEX_ITEM. HIDDEN (3, TRANS_D_CODE).

    APEX_ITEM. HIDDEN (4, TRANS_TYPE).

    APEX_ITEM. HIDDEN (5, CO_CODE).

    APEX_ITEM. HIDDEN (16, DR_LOCAL).

    APEX_ITEM. HIDDEN (17, CR_LOCAL).

    APEX_ITEM. POPUP_FROM_LOV (6, ACC_CODE, 'GL_ACCOUNT') ACC_CODE,


    This field is a Standard report column, when there are data without problems, but when you add news is disabled showing null.



    Any Suggestions please

    use the query

    Select

    "ROWID",.

    apex_item. Hidden(1,empno) | EmpNo as empno,

    ENAME ename,

    "JOB."

    "BISHOP."

    "HIREDATE",.

    "SAL."

    "COMM"

    "DEPTNO".

    of ' #OWNER # '. " EMP.

    Empno as hidden item and ename like textbox to display as a tabular presentation

    apex_item. Hidden concat with hidden empno point for your use

  • Need help with Javascript to get the value of standard report column

    Hi all

    Apex 3.1 version

    I have a query SQL (editable report) region where I need to do validations using a process of OnDemand and javascript. For this posting, I need to use the serial number and id of this same report line item. The function is called when the serial number is changed. I can get the serial number easily because it is a text field, however, the item id is a standard report column (which actually a text field or hidden gives me a checksum error, long story). How can I get the value of the standard report column to set the value of an element of the Application to use in my process of application as well as the serial number? Here is my code below.
    <script>
    
    function f_ValidateSerial(pThis)
    {
        
      // The row in the table
    
      var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    
        //alert('Row is '+vRow);
    
    
      // Display the serial number
        //alert('The Serial Number is '+html_GetElement('f21_'+vRow).value);
    
      
     var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateSerial',0);
     get.add('F101_SERIAL_NUMBER',html_GetElement('f21_'+vRow).value);
     get.add('F101_INVENTORY_ITEM_ID',+html_GetElement(?????+vRow).value);   // Here's where I need to get the item id to set application item!!
     
     gReturn = get.get();
     
    if (gReturn)
        { 
          alert(gReturn);
        }
     
      if(gReturn)
        { 
          html_GetElement('f21_'+vRow).value = '';
        }
               
    }
    </script>

    Hello

    Ok

    Item ID is standard report column.
    If you enter this Expression HTML column

    #ITEM_ID#
    

    I guess that the substitution of column item Id is #ITEM_ID #.

    Now, you have hidden input form that is not submitted.
    Then in JavaScript

    get.add('F101_INVENTORY_ITEM_ID',+html_GetElement('item_id_'+Number(vRow)).value);
    

    Kind regards
    Jari

  • What is the differece between a Standard report column and that is set to display text (escape special characters)?

    Hello friends,

    My requirement is

    I want to create a table. Presents some columns to display text.

    so my question is,

    What is the difference between a Standard report column and display text (escape special characters) in the attribute column property?

    Kind regards

    Arianne.

    Hi ujwala1234,

    ujwala1234 wrote:

    Hello friends,

    My requirement is

    I want to create a table. Presents some columns to display text.

    so my question is,

    What is the difference between a Standard report column and display text (escape special characters) in the attribute column property?

    Kind regards

    Arianne.

    Here is the difference:

    • Standard report column: this is used when your column in the SQL query returns the HTML markup. For example the query SQL with APEX_ITEM API columns or columns where you have mixed data in the column with the markup. In short, APEX rendering engine treats the column as HTML markup and analysis accordingly to display the required HTML element.
    • Display text (escape special characters): this type analysis the column data in the form of data stored in the database (no HTML). During analysis if the data contains special characters then it escapes and displays the data.

    Yes, you can mix the manual in the form of built on APEX_ITEM with normal standard report (display text) columns.

    I hope this helps!

    Kind regards

    Kiran

  • hide the text label in the section report IR under certain conditions

    Hello
    We have a textlabel and a calculated field in a section of report to the IR 11.1.2.1. Is it possible (in a script) to hide the textlabel and field based on certain conditions, like for example, if the field computes to 'zero '?
    Thank you.

    Use a field instead of the text label. In the Expression Editor you can use the function if() {} else {}

    HTH

    Wayne

  • Under certain conditions see the popup on page (fragment) charge

    Hi Experts,

    We have an obligation to show a popup on the page load, if a certain condition is true.

    I have two fragments (home.jsff and profile.jsff). Initially when the user login, home.jsff is indicated and that there should be no popup.

    When the user goes to profile.jsff and save the changes, it must first redirect to home.jsff and show a popup with the confirmation message.

    I can't create a fragment separated for the popup where we need to redirect to profile.jsff and then redirect to home.jsff as said the requirement that the popup should display the content of home.jsff in the background.

    Also I can't use showPopup behavior during the loading of the page because it's a jsff.

    Please suggest how to implement this.

    Thanks in advance.

    Best regards

    Saurabh

    ... There's an even simpler option

    1. Add a hidden from the fragment output text element

    2 bind the output components text 'value' property to a bean property of manage (pair of getter/setter)

    3. when the getter of the value method is called, check the indicator that you defined for if you want to display the context menu or not

    4. If the indicator is such that the popup needs to be displayed, run the Java Popup

    4.a search the component RichPopup

    4.b set flags of the popup

    4.c unset flag to display the pop-up window (for the next time you need to put it)

    4.d see the popup

    Frank

  • Under certain conditions the filling of a column (country code) according to the context

    This is the task given to me

    I have conditionally to the filling of a column (country code) based on the context selected in ODI


    What is this mean and how to get a solution for this

    No, the context is not that.
    Context is an environment. For different implementations, it may be different. Let me share how we use them.
    We use 4 contexts - DEV (development), INT (integration), TCT and the PRD.
    Each interface can be run in any context. The ODI will provide information from schema/information of physical server during execution to the enforcement process depending on what context has been chosen.
    The executions in the following contexts can be controlled using the ODI Security Module.

    Other implementations I've seen are that each context represents a different location (server) of the company. Thus, interfaces can be run on different machines depending on the configuration. ODI translates this information during execution.
    Context1 (Server1) may be used to run an interface1 during the day and Context2 (Server2) may be used to run the interface1 overnight.

    In your case, it seems that each frame is another country. So, depending on the context, the field must be filled in by the country_code.

    PS don't forget to award the useful points or correct answers that helped you.
    Thank you

  • Under certain conditions of popuId showPopupBehavior change

    Is it possible in JDev11gR2 to change the showPopupBehavior based on condition, popupId as if Master.FieldA is a popupId then: EditA popupId else: EditABC

    According to the literature, popupId attribute supports the expression language, it should be possible. Use something like #{Master.FieldA == 'A'? {"EditA": "EditABC"}
    http://download.Oracle.com/docs/CD/E15523_01/apirefs.1111/e12419/tagdoc/af_showPopupBehavior.html

    Pedja

  • Color of the text label changing under certain conditions

    Hello

    I have these labels and I would like to change the color of the text IF the text has some specific value (from an XML created by a program); for example, the default text color is red, but if the text value is 'Yes', the text color should be green.

    Any help much appreciatted, as usual...

    Thank you.

    not sure, but you might be able to get away with something like this:


    http://www.Adobe.com/2006/mxml"layout ="absolute">
       
       
           

    public void changeColor(value:String):uint
    {
    If (value is 'Yes')
    {
    Return 0x007F00;
    }
    on the other
    {
    Return 0x7F0000;
    }
           
    }
               
    ]]>
       
       
       
           
           
           
       

       

    using a single label in a point renderer, passing through the "data.text" value

  • Can hide us a view particular criteria under certain conditions

    Hello

    In our application, we want to have multiple criteria of view that will be displayed in the query Panel and table of the JSF page. But the display criteria are controlled based on user roles.

    So we want to hide certain criteria of view for any particular user who should not use this criterion of the view. On the object view if we change a criterion for the view and go to UI tips tab there is a 'Show on list' option which when checked/unchecked will show/hide criteria in the saved search drop down. I want to do the same thing programmatically based on condition.

    I'm not find examples of it.

    If anyone has done this before or would help pointers examples or documentation.

    I use JDev - 11.1.2.4

    Thank you

    Finally found the solution to my requirement-

    How to hide the viewcriteria from the Panel of af: query | They show me the finger... again!

    Exactly what I was looking for.

Maybe you are looking for