Customize the Standard FND_ATTACH_UPLOAD_PAGE accessories page to restrict attachments by file type

Hi all

I have a requirement in iExpenses, where I need to restrict the types of files that can be attached to an expense report.

For example, the types of allowed files are .txt, .jpg and .pdf - other formats like .doc and .xls and any other type of file should not be granted.

In iExpenses, the user navigates to the page of standard bindings to add attachments

/ Oracle/Apps/FND/Framework/Attachments/WebUI/FND_ATTACH_UPLOAD_PAGE - version 120,9

Since the various forums, I came to know that's not possible/advisable to customize this page.

I would like to know if I can extend the controller in this page, manage apply / add another button events, check for file type and throw eror if its not supported.

Pointers/code snippets are greatly appreciated!

Thank you

Arun...

Solution below:

Customize the page to extende the controller to the header: level of commitment to set.

Instead of the standard gamepad - oracle.apps.ak.attach.webui.AkAttachUploadCO, attach your custom controller.

Custom controller will have the code to check the attachment MIME type and throw an error if not valid.

Code below:

package xx.oracle.apps.ak.attach.webui;

Import oracle.apps.fnd.common.VersionInfo;
Import oracle.apps.fnd.framework.webui.OAPageContext;
Import oracle.apps.fnd.framework.webui.beans.OAWebBean;
Import oracle.apps.ak.attach.webui.AkAttachUploadCO;
Import oracle.apps.fnd.framework.OAException;
Import oracle.cabo.ui.data.DataObject;
/**
* Controller for...
*/
public class xxAkAttachUploadCO extends AkAttachUploadCO
{
public static final String RCS_ID = "$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion (RCS_ID, "packagename %");
public static final String BASE_APP_MOD = "oracle.apps.ap.oie.server.WebExpensesAM";

/**
@param pageContext OA page context
@param webBean the grain of web for the region
*/
' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
{
super.processRequest (pageContext, webBean);
pageContext.writeDiagnostics (pageContext, "* Custom controller * Base App Mod:" + pageContext.getParameter ("baseAppMod"), 4);

}
/**
* How to manage remittances form for form elements in
* a region.
@param pageContext OA page context
@param webBean the grain of web for the region
*/
' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
{
If (BASE_APP_MOD.equalsIgnoreCase (pageContext.getParameter ("baseAppMod"))) {}
FileUpload DataObject = pageContext.getNamedDataObject ("Dummy");
String contentType = "";
If (pageContext.getParameter ("Okay")! = null | pageContext.getParameter ("FndAddRowButtonSubmit")! = null) {}
fileUpload = (DataObject) pageContext.getNamedDataObject ("FileInput");
If (fileUpload! = null) {}
contentType = (String) fileUpload.selectValue (null, "UPLOAD_FILE_MIME_TYPE");
If (contentType.equalsIgnoreCase("application/pdf") |)
contentType.equalsIgnoreCase("text/plain") |
contentType.equalsIgnoreCase("image/bmp") |
contentType.equalsIgnoreCase("image/gif") |
contentType.equalsIgnoreCase("image/tiff") |
contentType.equalsIgnoreCase("image/pjpeg") |
contentType.equalsIgnoreCase("image/x-png")
){
pageContext.writeDiagnostics (pageContext, "* valid file type", 4);
}
else {}
throw new OAException ('this file type is not valid. Valid file types are .txt, .pdf, .bmp, .jpeg, .tiff, .gif and .png');
}
}
}
}
super.processFormRequest (pageContext, webBean);
}
}

Tags: Oracle Applications

Similar Questions

  • Customize the Standard login page

    I use 24 cloudy theme on APEX 4.2.6.00.03.  Just try to do a few things that quickly brought me into an edumacation rabbit hole.  But I like to keep things simple.

    Try to change the background image on the standard login page (not in the region, not the image in option left in the area, I mean background image in the classical sense of HTML) which doesn't seem to work in the same way as the other pages.  It seems to relate to the theme & model page.  To replace the model of 'Login' to 'default theme' Page displays the background as planned for my setup below.

    On the attributes Page for the default login page so any application (e.g., p.101) using this theme (have not tried others).  I have change the HTML header on the page to be:

    < style type = "text/css" >

    body

    {

    background-image: url(#WORKSPACE_IMAGES#test.png);

    background-repeat: no-repeat;

    background-size: cover;

    }

    < / style >

    Where test.png is the name of a file that I imported into my workspace application.

    Run the page, and nothing happens.  Re-edit attributes Page, up to 'Default Theme' as shown and the background shows fine (but of course the rest of the layout is wrong).

    I guess I should be copying the model of Login Page (done) and then edit in a way to support the display of a background on this page.  Any thoughts on next steps?

    IQof20 wrote:

    I use 24 cloudy theme on APEX 4.2.6.00.03.  Just try to do a few things that quickly brought me into an edumacation rabbit hole.  But I like to keep things simple.

    Try to change the background image on the standard login page (not in the region, not the image in option left in the area, I mean background image in the classical sense of HTML) which doesn't seem to work in the same way as the other pages.  It seems to relate to the theme & model page.  To replace the model of 'Login' to 'default theme' Page displays the background as planned for my setup below.

    On the attributes Page for the default login page so any application (e.g., p.101) using this theme (have not tried others).  I have change the HTML header on the page to be:

    Where test.png is the name of a file that I imported into my workspace application.

    Run the page, and nothing happens.  Re-edit attributes Page, up to 'Default Theme' as shown and the background shows fine (but of course the rest of the layout is wrong).

    I guess I should be copying the model of Login Page (done) and then edit in a way to support the display of a background on this page.

    Probably your CSS rule is not applied due to rules theme appearing later in the cascade or with the greater specificity. Correspondre correspond to the specificity of rule of theme by adding that he uses the ID selector, then override the waterfall using the! important directive:

    body#uLogin {
        background-image: url(#WORKSPACE_IMAGES#test.png) !important;
        background-repeat: no-repeat !important;
        background-size: cover !important;
    }
    

    4.2 page Inline CSS property should be used for custom CSS acting rather than the HTML header, which has the advantage of not requiring the style wrapper element.

  • Customize the self-service registration page in R2

    Gurus,

    Can you please let me know the process in order to customize the self-registration page in OIM11gR2?

    Refer to this.

    http://kinisblog.blogspot.com/2012/10/OIM-11gr2-customizing-self-service-user.html

  • Vista Home Premium will not read/recognize/burn HD videos taken with my Canon camcorder HDD21/AVCHD (MTS format). Results in the message stating "Windows Media Player may not supported file type or the codec that the file compressed.

    I have a Vista Home Premium 64-bit, Service Pack 2 Dell.  He read/won't recognise no videos HD taken with my Canon camcorder HDD21/AVCHD (MTS format).  Each attempt generates a message stating "Windows Media Player may not support the file type or the codec that the file compressed.  I used a Windows 7 PC, which allowed me to play the video from the camcorder and burn a DVD of the video to share with the family.  I'd appreciate any help.  Thank you

    Information on the types of media files that supports Windows Media Player
    http://support.Microsoft.com/kb/316992

    For better support please try the Microsoft Vista for photos and video forum instead. http://social.answers.Microsoft.com/forums/en-us/vistapictures/threads

  • Customize the Oracle discoverer login page

    Hello

    Try to add a password for automatic reset for discoverer page. I would like to know to what extent Oracle allows me to this type of customization. Also any advice on where to start would be great!

    Thank you
    KK

    Published by: 848492 on March 30, 2011 18:50

    Hi KK
    Most things are possible, especially for the Viewer as Viewer using UIX files to control the interface. I don't know exactly the one controlling passwords, but it probably wouldn't be hard to find.

    Word of warning however: Oracle is not customers of support or sanction change UIX files so all what is done must be saved first in case you have problems.

    Take a look * $ORACLE_HOME\j2ee\OC4J_BI_Forms\applications\discoverer\discoverer * where $ORACLE_HOME is the place on your application of discoverer server where discoverer more and observer to have their home.

    There are a number of files in there related to passwords, namely: CECEnterPassword.uix, CECPasswordChangeWillExpire.uix, CECPasswordExpired.uix, CECPasswordWillExpire.uix, ChangePassword.uix, EnterPassword.uix, Password.uix, PasswordChangeWillExpire.uix and PasswordWillExpire.uix. The word password also exists in struts - config.xml in * $ORACLE_HOME\j2ee\OC4J_BI_Forms\applications\discoverer\discoverer\WEB-INF *.

    There are a few notes on the Oracle Support on changing some settings in the uix files and these are assumptions they are published by Oracle, but one should always be careful.

    I hope this helps
    Best wishes
    Michael

  • Customize the Grid - database of Page control

    Hello
    I would like to customize my Page of database on my grid control. I added the "Line of Business" column, but I can't find how I can fill it?

    Any idea must be appreciated!

    Thank you

    Oldschool

    Click the database that you want to insert a line of business for, then click on the properties link targets in the section related links at the bottom of the page.

  • Options button on the standard google search page disappeared

    Firefox 12.0
    on the google search page, I had two buttons:
    SafeSearch on/off button
    Options (gear) button
    the last button still appears on the screen, but now is empty: the gear is not displayed. When ipush result are incompatible: in some screens (search results), I get 4 options to choose, in other screens nothin happens at all.

    I really don't like this, because FF seems to have become unstable on my machine.

    As a fix as I complete reinstalled FF, without change, the problem persisted.

    IE is not this problem

    Hi madperson, thanks for the quick response. Indeed I cleaned all the cookies and cache, but in fact most websites like webmail seemed odd as well. To cut things short, I decided to reinstall an earlier version, which solved the problem. This isn't really a favorite firefox solution, but alas.

  • I need to customize the Oracle EBS logon page

    Hi all


    I need to put my custom OPS between Oracle EBS Login page page and the homepage of the Oracle. Please guide me to achieve this requirement.


    Kind regards

    Karna

    Connection to the EBS, go to 'Preferences--> display preferences.

    There, in the top of the page area, you can select the responsibility and the page that you want to open after the connection.

  • After its replacement by the new AM a LOV in the standard page stopped work (R12)

    I spread an AM in one of the standard Oracle applications Page. After its replacement by the new AM, a LOV in the standard page no longer works.
    Do anyone have a solution for this?

    Thank you
    Lou

    1. you can move this code to the controller.

    2. While doing the extension must also worry about the maintainability of the code.

    3. If you do not add this to the CO, create a new AM, specify this AM to a region on your page, now it will become nested AM.

    4. you can code for call PLSQL in this new AM.

    5. you can access this CO AM and call this method.

    I recommend to call the PLSQL Co.

    -Prince
    http://princekapoor82.blogspot.com

  • How to customize the windows download progress window

    How to customize the windows download progress window? (to show what files have been downloaded since the last clear)

    I didn't know that the window is a Firefox one.  Now I see how to reconfigure inside Firefox to fix my problem of 'the download since the last clear list' still being virgins.  Others have had the problem and Firefox has answers to this.

    Thanks for your help

  • Creation of DVD Windows cannot run the .avi file type

    Windows DVD maker cannot set my DVD - RW recordable station located on (e) to be able to burn a DVD.

    When I try to add my video file (.avi), that the program says that .avi is not supported by file type, and that's why I can't add it.

    Windows DVD maker cannot set my DVD - RW recordable station located on (e) to be able to burn a DVD.

    When I try to add my video file (.avi), that the program says that .avi is not supported by file type, and that's why I can't add it.

    Do not understand your first sentence.
    As for avi, google for a FREE video converter, convert avi to WMV format.
    Now, try to burn again.

    t-4-2

  • Except with respect to the Web gives estimate of file type inappropriate

    When I go to Save As For Web (and devices), I am led to the next screen that allows me to do a multitude of things. I can adjust the resolution of my image with many other parameters, but I can also, more specifically, to change the file type and upong change the type, can see the file size estimated down at the bottom right.

    The problem is the estimated file size is glued on the GIF format and only fill when I change file types. Here's a screenshot of my problem.

    http://i51.Tinypic.com/2z9mpv9.jpg

    Delete my preferences file did not work.

    It could be a driver problem or it could simply be that your graphics card is not compatible with OpenGL in Photoshop capabilities, regardless how you update the driver.

    But definitely check that the driver is up-to-date.

  • Customize the error page "submissions in double page to authorize."

    Hello

    If you set "Double page to authorize bid" to NO, you can not post a form more than once, if you do, you get an error page (for example, if you double click on save button).

    Is it possible to customize this page to standard error (translate and use a different presentation)?

    The standards page looks like this:
    Error ERR-3331 this page had already been supplied and cannot be re-introduced.
    Continue-(which is a link to a page that you can set in the properties of the page)
    OK-(redirects to the form)


    Concerning
    Bottom

    Regardless of the type of error you want to catch, it's a common request.

    Search through these forums, or try one of the many offers good blog
    http://lmgtfy.com/?q=customise+Oracle+Apex+error+page

    It also depends on your version of Apex-> 4.1 fact it very easy to customize error pages.

  • How to customize the JSP page in iSupport

    Hello

    I worked on the OA framework. But I have a requirement to customize page iSupport in oracle applications. There is a button on the page, I want to call a DB function passing 2 parameters for this function. The result of this function and display the error message to user based in the result of the function.

    This is the JSP page. I got the name of page JSP of URL in the browser. I discovered the source of this page and found after statement...

    onclick = "JavaScript:document.identifyproblem.JTFValidateFlag.Value = 'Yes'; * Next * ('identifyproblem', 'NEXTFROMIP');" "return false" type = "button" > next < / button > < img src="/OA_HTML/cabo/images/swan/t.gif" width = "10" height = "10" > < table > < /tr > < / table >

    "next" function is available in a .js file that is imported in above file.

    function next (shape, opcode)
    {
    If (opcode == 'NEXTFROMCI' | opcode == "NEXTFROMIP") {}
    If (! checkContactPoint (form)) return;
    }

    If (checkRequiredField (form)) {}
    document. Forms [form]. IBU_CF_SR_OPCODE. Value = opcode.
    document. Forms [form]. Submit();
    }
    else {}
    return;
    }
    }


    If I want to change the functionality can I add my code and more to have a "next"?

    Or I have to change something in the file of the page controller?

    Hi Paraq,

    My mistake, I'm not familiar with iSupport pages, but do a search on google I see that they are standard JSP and not OSTEOARTHRITIS.

    I'm not sure if this will help iSupport Extension

    I'm sure there are many examples of how to extend the iSupport OTN pages

    Keith

  • Customize the SRM process for a single page?

    Hello

    After using the wizard to create a report, it is possible to customize the MRU/DSM process for this page without editing for all pages? I think I probably need to go to some effort to write my own... but I thought I would ask to avoid possibly re - invent the wheel...

    See you soon,.

    Joseph

    You cannot change the standard process and you will need to write your own if you need more. What is an update of the single line or a tabular form?

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for

  • BIOS / master password (serial number) for sony VGN-SZ433N

    BIOS / master password (serial number) for sony VGN-SZ433N

  • BlackBerry Smartphones routing music through bluetooth

    HelloI have blackberry 8310 and I (655 blackberry) bluetooth headset. I was not able to route music to bluetooth device, although it works perfectly for the call. Any ideas how to fix?Thank you

  • cannot scroll on the page, only sidebar

    I have a HP Pavilion notebook g7-1260us nine and I can't scroll the page. It scrolls in the sidebar. I went through every possible setting that Synaptic has on this machine and I can not find. They show a beautiful demonstration, but simply cannot ha

  • Adobe first missing Visual C++

    Make a new package using CCP - errors on install, lead to missing components in the construction, specifically about Visual C++

  • Cold migration

    For a cold migration, there is no reason to have shared something as long as vCenter manages both correct hosts?  I can cold migrate a virtual machine from the cluster or datacenter to another also long the ESX hosts have network connectivity?