This discussion is archived
3 Replies Latest reply: Sep 5, 2013 4:41 AM by DilipG RSS

Need to display employee image in the OAF custom page

user13424229 Explorer
Currently Being Moderated

Hi All,

 

I have a custom OAF search page in that i am doing search operation based on emp number, so when i do search with emp number respective rows should display in below results section.

my requirement is when user selects a row then one more window should open in that i need to display employee image along with other details, please help me out how to display employee image in the page.

 

 

Thanks

  • 1. Re: Need to display employee image in the OAF custom page
    Shddn Explorer
    Currently Being Moderated

    Hi

     

    Can be achieved in two ways

     

    a) You store each employee image in /OA_MEDIA/ with employee ID as name of image . On the new page you can pass employee ID as url paramter. in PR of new page set image uri as /OA_MEDIA/employeeID.jpg

     

    b) You store image as blob object in some table. using  Image API show image on page.

     

    Regards

     

    Shobhit S

  • 2. Re: Need to display employee image in the OAF custom page
    User437258 Explorer
    Currently Being Moderated

    If you are on 12.1 look at the chapter on pop-ups in the developer's guide.  That may be what you want.  If you like what you see/read in the developer's guide let me know if you need help understanding pop-ups.

  • 3. Re: Need to display employee image in the OAF custom page
    DilipG Journeyer
    Currently Being Moderated

    Hi ,

     

    Below code should work for you.

      Add Your Images in OA_Media Directory and write below code.

     

       OAImageBean imageBean = (OAImageBean)createWebBean(pageContext, "IMAGE", null, null);

     

        imageBean.setSource("/OA_MEDIA/{$EMP_NUMBER}.png");

     

        imageBean.setDestination("OA.jsp?page=/xyz/oracle/apps/emp/item/abc/webui/EmpSearchPG&retainAM=Y}");

        imageBean.setAttributeValue(UIConstants.TARGET_FRAME_ATTR, "_blank");

        imageBean.setAttributeValue(UIConstants.PROMPT_ATTR, "Image");

        imageBean.setAttributeValue(UIConstants.HEIGHT_ATTR, "100");

        imageBean.setAttributeValue(UIConstants.WIDTH_ATTR, "100");

        OATableBean tableBean = getSearchResultTable(webBean);

        tableBean.addIndexedChild(imageBean);

     

    Thanks,

      Dilip

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points