How to replace a user's photo with a default in Spaces

Hi,
When a user deletes a photo in his/her profile, I want to use a default photo for the profile. When a user doesn’t has a photo in the profile, the default one will be displayed. Can I pass in an empty string, null string or a default photo to setJpegPhoto().
// ADFContext
ADFContext adfCtx = ADFContext.getCurrent();
SecurityContext secCntx = adfCtx.getSecurityContext();
secCntx.getUserProfile().setJpegPhoto("/tmp/LARGE.png");
Thank you.

Sorry, typo and no proofreading on my part :) (right forum is ID 354, and I typed 254)
{forum:id=354} is what I meant

Similar Messages

  • [wlpi] HOW TO replace wlpi user management mechanism with LDAP service?

    Dear all,
    Is it possible for wlpi sp3?
    Any suggestion or ideas?
    Thanks in advance
    Eric

    Eric,
    Could you please post this on the
    weblogic.developer.interest.personalization newsgroup?
    Eric Chen wrote:
    Dear all,
    Is it possible for wlpi sp3?
    Any suggestion or ideas?
    Thanks in advance
    Eric--
    Developer Relations Engineer
    BEA Support

  • How do I take 300 dpi photos with my iPhone 4s? And how do I export them to my MacBook Pro at 300 dpi to use as I want to print photos.

    How do I take 300 dpi photos with my iPhone 4s?
    And how do I export them to my MacBook Pro at 300 dpi to use as I want to print photos.
    I have been using the standard camera on the iPhone and require 300 dpi to create photo books as the photos are resized according the layout.
    Your time and assistance in appreciated.
    Thanks

    Thanks Tonefox!
    After looking at a few of the links I found a mathematical equation that assisted me.
    Inches = Pixels/DPI
    eg: 3 inches = 300 pixels/100 DPI
    Using this equation and the fact that iPhone 4s takes photos that are 3264 x 2448 I was able to work out the largest print I could make with 300 DPI.
    Width 3264 pix/ 300 DPI = 10.88 inches
    Height 2448 pix/ 300 DPI = 8.16 inches
    Therefore, the largest print (with 300DPI) I can make of these photos is 10.88 inches x 8.16 inches.
    Which is great!
    So is it critical for me to change the dpi in say photoshop or does it not matter as long as I don't go above the 10.88 inches x 8.16 inches?
    From what I can gather the smaller I resize the photo the higher the DPI and the bigger I stretch the photo the lower the DPI?
    Further clarification will be much appreciated. Thanks

  • How do i view photos in macbook pro, and while viewing how can i delete the unwanted photos with delete button?

    1 My questions are about viewing and managing photos from a folder.
    a. How do i view photos in macbook pro - i know the space bar thingy but does not help my purpose?
    b. While viewing how can i delete the unwanted photos with delete button?
    c. How can i increase the size of the photos that i am seeing in the form of icons?

    double clicking in iPhoto will open the photo.
    The left and right arrow key will move between photos, as well as swiping on a trackpad or Apple mouse.
    See >System Preference>Trackpad or mouse  for options and tut
    While selected or in the smaller icon view hitting the Delete key will delete the pic.
    Command Z will undo the last action taken.
    Periodically you have to empty the iPhoto trash.  iPhoto drop down menu>empty trash
    Same applies for viewing pics in a Folder NOT in iphoto,  Use the up and down arrows does not work in Preview, but as you know in QuickLook (spacebar) the up and down arrows will navigate.

  • How to replace a substring that starts with and end with another substring?

    Hi,
    I am trying to parse data from HTML tables. First I want to remove all useless tags like <font>. Now, how can I remove substrings like-
    *<font face="Verdana, Arial, Helvetica, sans-serif" size="1">My_Data_to_parse</font>*
    I was searching for any method which replaces a substring what starts with a substring (in this case "<font") and ends with another substring (in this case ">") . Is there any method like that? Or any better solution?
    Another situation like the following-
    *<td align="left" height="30" width="100%">*
    In this case I want to remove all the height, align , width etc and make it as simple as "<td>". How can I do that?
    Finally, all I am trying to do just to parse data from the tables in a html file. Is there any parser API or library to help me do that? Or to bring the data down to array from the tables based on table structure? Please suggest me.
    Thanks in advance.

    probably the best place to start is to search for the "<keyword" of all of the html keywords, then search for the location of the next ">" - this will indicate the end of the <keyword> opening tag.

  • How to create portal user and integrate with external appl login

    How to create portal user and integrate the user with external application for single sign-on ?
    I want to access my external application thru portal user ..?
    Shyam

    Hi Jithin,
    The link that you've shared talks about a different scenario.
    In my case, I want to pass the portal user id when the user clicks on the Help Link present in the header area.
    I am trying to pass it along with the Help Link Url property of a masthead iview but it is not getting passed to the target Url.
    I would like to know if it is possible to pass the Portal User Id in this way or not.
    Though if we create a appintegrator iview and pass the user id <User.UserID> along with the target Url, it reaches there.
    Thanks & Regards,
    Anurag

  • How to Insert a User Defined Column with CheckBox In ADF Swings

    I have create JTable by dragging a view object from Data Control Palette .But apart from columns listed in JTable i need to insert a User Defined column with Check Box selection option in each row .
    Can any one help me out to sort the problem.
    Regards
    Bhanu Prakash
    Message was edited by:
    user579125

    I retrieve 10 column from Database and build JTable. But apart from 10 column displayed i need to display one more column( User Defined) at run time with the check box option for each row . Because on select of corresponding check box i need to do some mathematical calculation. add also How do i know whether check box is selected or not.
    Regards
    Bhanu Prakash

  • How to replace a older Airport Extreme with a newer model? (OS 10.6 w/ Mac Mimi)

    How do I replace a older Airport Extreme with a newer model? (Mac Mini OS 10.6.8 )

    There is not much more to it than to buy a new one, and configure it using AirPort Utility.
    You should be using AirPort Utility 5.6.1.
    Power down your modem before removing your older Extreme and connecting the new one.

  • How to implement Oracle user/role security with Access front end?

    Hi,
    We have successfully migrated our Access database tables to Oracle 10g using SQL developer. We've recreated all the users and roles(i.e., access groups) in Oracle and granted rights to tables.
    In the Access front end database, in the Database window we have saved linked Oracle tables which replaced the Access tables. The forms, reports, queries run fine with the linked Oracle tables. All the linked table use one ODBC DSN to the Oracle database with the same Oracle user id.
    We need to be able to authenticate users into the Oracle database and RE-link the tables based on their own unique user id. By during so we can allow users to use the Oracle standard user id/role and system privileges to control select, update, ect. rights to the database.
    I've been able to use the VB code within Access to logon into the database with a unique id, but I have not been able to find out how to RE-link the tables to the unique user id using VB. There should be some way to relink tables dynamically, based on users login into the Access front end.
    I don't know a great deal about Access projects, but I do know with SQL server allows login into your Access project and link tables dynamically.
    Can someone give me some assistance or point me in the right direction?
    Thanks in advance,
    Larry

    We had one of our programmers here come up with a VB code solution for re-linking table within Access. However the relinking takes 3-4 minutes for 100+ tables.
    In an effort to help you understand the situation better, I will attempt to elaborate on the problem:
    We have an Access 2003 application which currently has a front end using Access(forms, reports, queries, & VB code) and a MS Access 2003 backend.
    We have migrated the backend tables to Oracle. However, we still have a need to maintain the front end in Access, since we have over 60 forms, 40 reports, 200+ queries in Access. Its easy to understand, we have a significant investment in the front end(Obviously, the plan is to migrate the front end also at some future date).
    In order to utilized the existing front end, we have to validate and modify the current front end connections to the new Oracle backend. One of the features of Access is that you can "link" tables and save the link for runtime. Each Access table can have its own link which is a separate ODBC/JET connection. As such, each separate link has its own userid/database information.
    The other issue with using the Access front-end is that Access utilizes a workgroup file to implement user and group security. The workgroup file contains all the users and which groups the users belong to in Access. Then within Access, you allow users access to object(tables, queries, ect) by their userid and or group. When users open an Access database with Access security enabled, they are required to log into Access. The login is authenticated by the workgroup file. Once, logged into Access, users have rights to Access objects based on their rights granted to their userid and groups they belong. The problem here is that when you remove the linked Access tables and replace them with linked Oracle tables, Access has knowledge about Oracle table rights granted to users; nor would you expect it to.
    The dilema is the disconnect between Access and the fact Oracle utilizes a similar but much more sophisticated security model. It creates users and roles(which are similar to Access groups), and again this is independent of Access security.
    Our solution was to still use the Access workgroup file security along with the Oracle security model. By using the Access userid and then creating a similar Oracle userid with similar table rights granted in Access, you could apply security within Access and also with the Oracle database.
    For example, a user BOB logs into Access via the workgroup file, using VB code, Access then establishes a Oracle connection logining into Oracle using the same unique userid BOB into Oracle.
    After connecting and validating user BOB into Oracle, then the Access tables are relinked to Oracle using the user BOB userid and table rights.
    This Oracle userid has been granted table rights specific for this userid.This allows the user BOB to use the Access application and still be authenticated into the Oracle database.
    The problem with this solution is that the relinking of the saved Access tables takes 3-7 minutes for about 100+ tables. This is not acceptable for users each time they log into the application.
    Our current alternative is to use one Oracle userid to login each user, and use Access form restrictions/security to allow/prevent users from updating/viewing data. Obviously, this is not the optimal solution in respect to security, but it at least allows us to control access to the data(via the forms) by using one logon required for each user, and quick startup time for the application.
    I understand SQL server does a better job in integration, but we use Oracle which is what I am trying to work with.
    Larry

  • How to replace the existing selection screen with new selection screen

    Hi,
    I have first selection screen with parametre as a table name, then I have created dynamic selection screen as 2nd selection screen with different fields of that table as select options. This is done using genaration of dynamic report. Now If I click on button on this 2nd selction screen , then I want to replace this 2nd dynamic selection screen , with the other selection screen fields.
    Can anybody guide me, How to do replace one slection screen with different selection screen.
    and one imp thing is this selction screen is populating with dynamic fields on it.
    Regards,
    Mrunal

    As I can understand you want to make some of the screen field to disable or visible on screen  depending upon the interaction of user with screen 1.
    You may use this example code in PBO of screen 2.
    LOOP AT SCREEN.
        " action has been taken to modify the area office screen as per the option chosen at screen 99.
        CASE ACTION.
            " if the user has taken up the option of UPLOAD
          WHEN 'UP'.     " screen processing while we upload the plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_VE'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
          WHEN 'DN'.      " screen processing while we upload the approved plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'AO_UP' OR SCREEN-NAME = 'AO_VE'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
          WHEN 'VW'.      " screen processing while we view the plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'RLGRAP-FILENAME' OR SCREEN-NAME = 'FNAME'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
            " and hide the file input field
            IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_UP'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
        ENDCASE.
      ENDLOOP.

  • How to "delete" a user's photo in Spaces

    Hi,
    When a user deletes a photo in his/her profile, I want to use a default photo to replace his/her photo. Can I pass in an empty string, null string or a default photo to setJpegPhoto()?
    // ADFContext
    ADFContext adfCtx = ADFContext.getCurrent();
    SecurityContext secCntx = adfCtx.getSecurityContext();
    secCntx.getUserProfile().setJpegPhoto("/tmp/LARGE.png");
    Thank you.

    Hi,
    I’ve found another way to call setJPEGPhoto(). But, a problem is that when a user “yes” to delete, the photo is not refreshed and replaced by “LARGE.png” until the page is saved. Looking at the logs on backend, I know it’s replaced.
    ProfileFactory.getProfileManager().getProfile(taskFlowUser).setJPEGPhoto("/tmp/LARGE.png");
    When a user choose his/her new photo(upload), and “ok” it, the new photo shows up on the page before the page is saved. How is the Delete different from Upload for saving and refreshing a photo on the page?
    Thank you.
    DELETE PHOTO:
    ============
    <af:commandLink xmlns:af="http://xmlns.oracle.com/adf/faces/rich" text="Delete Photo"
    partialSubmit="true" id="commandLink1">
    <af:showPopupBehavior xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    popupId="subform3:popup3"/>
    <af:subform xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="subform3">
    <af:popup xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="popup3">
    <af:dialog xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="sd1" type="yesNo"
    attributeChangeListener="#{employeeBean.handleDialog}">
    <af:outputText xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    value="Do you really want to delete the photo?" id="sot2"/>
    </af:dialog>
    </af:popup>
    </af:subform>
    </af:commandLink>
    public void deleteUserPhoto() {
    // ADFContext
    ADFContext adfCtx = ADFContext.getCurrent();
    // Security
    SecurityContext secCntx = adfCtx.getSecurityContext();
    //String userID = secCntx.getUserProfile().getUserID();
    byte[] photo = new byte[10000000];
    photo = secCntx.getUserProfile().getJpegPhoto();
    String taskFlowUser = (String)RequestContext.getCurrentInstance().getPageFlowScope().get("userId");
    System.out.printf("deleteUserPhoto() user ID:'%s' photo size: '%d'\n", taskFlowUser, photo.length);
    try {
    ProfileFactory.getProfileManager().getProfile(taskFlowUser).setJPEGPhoto("/tmp/LARGE.png");
    } catch (ProfileException pEx) {
    pEx.printStackTrace();
    } catch (Exception ex) {
    ex.printStackTrace();
    photo = secCntx.getUserProfile().getJpegPhoto();
    System.out.printf("deleteUserPhoto() photo size: '%d'\n", photo.length);
    return;
    public void handleDialog(DialogEvent event)
    if (event.getOutcome().equals(DialogEvent.Outcome.no))
    System.out.printf("handleDialog() DON'T DELETE\n");
    } else {
    System.out.printf("handleDialog() DELETE\n");
    deleteUserPhoto();
    UPLODAD A PHOTO:
    ================
    <af:panelGroupLayout id="pgl1" layout="vertical" halign="center">
    <af:commandImageLink icon="#{webCenterProfile[pageFlowScope.userId]
    .photoURI.LARGE}" id="i2">
    <af:showPopupBehavior popupId="phUp:popup"/>
    </af:commandImageLink>
    <af:commandLink text="#{uib_o_w_pc_p_ProfileMessages.LABEL_CHANGE_PHOTO}"
    partialSubmit="true" id="cil1">
    <af:showPopupBehavior popupId="phUp:popup"/>
    </af:commandLink>
    <af:subform id="phUp" defaultCommand="ok">
    <af:popup id="popup">
    <af:dialog title="#{uib_o_w_pc_p_ProfileMessages.TITLE_UPLOAD_PHOTO}"
    titleIconSource="/adf/webcenter/fileupload_ena.png"
    type="cancel" id="d1">
    <af:inputFile simple="true" id="if1"
    shortDesc="#{uib_o_w_pc_p_ProfileMessages.PHOTO_HINT}"
    valueChangeListener="#{profileHelper.photoUploaded}"/>
    <f:facet name="buttonBar">
    <af:commandButton id="ok"
    text="#{uib_o_w_pc_p_ProfileMessages.LABEL_OK}"/>
    </f:facet>
    </af:dialog>
    </af:popup>
    </af:subform>
    </af:panelGroupLayout>
    public void photoUploaded(ValueChangeEvent event)
    String METHOD_NAME = "photoUploaded";
    LOGGER.entering(CLASS_NAME, "photoUploaded");
    String taskFlowUser = (String)RequestContext.getCurrentInstance().getPageFlowScope().get("userId");
    try
    UploadedFile uploadedFile = (UploadedFile)event.getNewValue();
    if (!WebCenterFrameworkViewUtils.isValidImage(uploadedFile))
    ProfileException validateEx = new ProfileException("UPLOAD_IMAGE_INVALID", new Object[] { uploadedFile.getFilename() }, null);
    throw validateEx;
    File tempFile = null;
    if (taskFlowUser.trim().length() < 3)
    String tempFileName = "photo_" + taskFlowUser;
    tempFile = File.createTempFile(tempFileName, null);
    else
    tempFile = File.createTempFile(taskFlowUser, null);
    String tempFilePath = tempFile.getCanonicalPath();
    if (LOGGER.isFinest()) {
    LOGGER.finest(CLASS_NAME, "photoUploaded", "Created temporary file {0}", tempFilePath);
    BufferedInputStream in = new BufferedInputStream(uploadedFile.getInputStream());
    BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(tempFile));
    while (true)
    int c = in.read();
    if (c < 0)
    break;
    out.write(c);
    in.close();
    out.close();
    ProfileFactory.getProfileManager().getProfile(taskFlowUser).setJPEGPhoto(tempFilePath);
    tempFile.delete();
    catch (BaseWCServiceException ex)
    WCServiceViewUtils.getInstance().logAndDisplayError(ex);
    catch (Exception ex)
    if ((ex instanceof ProfileException))
    WCServiceViewUtils.getInstance().logAndDisplayError((BaseWCServiceException)ex);
    else
    ProfileException presentableEx = new ProfileException("UNEXP_ERR__SAVE_PHOTO", new Object[] { taskFlowUser }, ex);
    WCServiceViewUtils.getInstance().logAndDisplayError(presentableEx);
    LOGGER.exiting(CLASS_NAME, "photoUploaded");
    Edited by: 891549 on Jun 21, 2012 4:26 PM

  • How to replace my iphoto library 08 with version 11 on my external hard drive

    I have my iphoto library version 08 on an external drive. I just downloaded the version 11 onto my internal hard drive. I have moved the version 11 to my external hard drive. How do I merge the 2 versions as the version 11 did not replace the version 08
    Thank you for your help!

    Does the new iPHoto 11 library contain photos that your iPhoto 08 library doesn't?  If so do the following:
    Open your verions 08 library with iPhoto 11 to convert it to iPhoto 9 (11).  Then use the paid version of  iPhoto Library Manager  to merge the two libraries into a new 3rd library.
    When the merge is completed launch iPhoto with the Option key held down and select the new 3rd library.  When you're satisfied that the new library has all of your photos from the other two you can delete them.
    If the iPhoto 11 library is empty just replace it with your iPhoto 08 library and open it with iPhoto 9 (11) to convert it to version 9.
    OT

  • How to replace guest user icon?

    How can I replace the dark shadow profile for guest user with a more friendly user icon?

    Follow the steps in this hint that show how to change the guest account's login name. Ignore step 5.

  • How to replace my old 500GB TC with dual band 2TB TC on existing network

    I bought a new 2TB Time Capsule to replace the old 500Gb. I have had a network set up long ago but the iMacs, Apple TV are on ethernet and MBP uses WiFi as well as my Android phone. I can't remember the order of dismantling the old TC and replacing with the new and keeping my network all the same as far as password etc. Bob Timmons info is awesome for adding the 500GB TC back with ethernet as extra backup space. I really need the steps to take to replace with my 2TB TC and have a smooth transition. We have photos galore on Aperture and iPhoto ergo the large drive. Thanks

    I shall not be saving any backups from the old 500GB TC so I need to erase that right?
    If you are absolutely sure that there is nothing on the old TC that you want saved, then by all means erasing the drive will make the space available for other things like file sharing ... as the old TC's internal drive is still available even when the TC is reconfigured as a bridge. In addition, you can share external USB HDDs attached to it as well. One option would be to dedicate this TC as your Network Attached Storage (NAS) device and use the new TC for the Time Machine backups.
    Once you're sure you won't need to access any of the data on the old TC, you can erase it using the AirPort Utility. (ref: AirPort Utility > Select the old TC > Manual Setup > Disks > Erase)
    If you prefer "pictures," check out this link: Ask Dave Taylor: How do I erase and reformat an Apple Time Capsule?

  • How Can I Make A Large Photo with Product Detail for My Thumbnails in Dreamweaver

    Hello All:
    New to Dreamweaver, so my code knowledge does not exist yet. Have Mercy!!!!
    Anyway , I am making a typical product page.
    I prefer that when people click the thumbnail product photo to not have to click into another brower.
    Nowadays you are able to click in what is commonly called a "Quick View" that pops up and gives you a full sized
    image along with product detail, and pricing.  That's all I want.
    How can I link this [the larger photo and product detai] to my thumbnails in Dreamweaver???? 
    I want the look that is on every website like Target, Macy, etc.
    Someone, please help me to  !!!!!!!
    These lil' faces are really cute.  They are helping me to smile after hours and days, weeks of frustration.   TWIN MADDOG!!!

    Hi,
    don't understand your problem, ore hope to understand it right. You could put the images on a DW file and link to another file with the larger image and where you have written all your informations.
    I made this here only for a new, larger image (without additional informations):
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Unbenanntes Dokument</title>
    </head>
    <body>
    <p><a href="pflanze1_l.jpg" target="_parent"><img src="pflanze1_s.jpg" alt="Thumbnail01" width="100" height="75" border="0" /></a></p>
    <p><a href="pflanze1_l.jpg" target="_parent">or this you use an Hyperlink to the larger image</a></p>
    </body>
    </html>
    s=small; l=large
    Hans-G.

Maybe you are looking for

  • Error while transmitting message.

    All, Newbie here. We are trying a simple file to file scenario - where xi picks up the file from a FTP location and maps the message and dumps it in another FTP location. While we execute this example - we get the following error - <b> "Transmitting

  • Prefix: 'q1' can not be resolved to a URI

    We are trying to import a WSDL whihc is provided by the client in Informatica using Web Service consumer, the WSDL is using SOAP12. While importing it gives erros like below.. has any one encountered a similar issue? @schema5, line 5, char 112 ): Pre

  • Aloha, i am trying to use the resume templates in pages, but its not in english.

    This is what i see: How do i get it to appear in english? I have already went to the inspector icon and then the Text icon to make sure it spell checks in english but i want all the templates to be shown to me in english. please help me accomplish th

  • Smarlists and historical formula

    Here are my dimensions: Years   ->FY15   ->Fy16   ->FY17 Account    ->Type (smartlist : new or old)    -> Account 1    -> Account 2    -> Account 3 Here is my question Lets say if my product is "new in FY15" i would like to account 1 +account 2 for F

  • IMac 27 - Pixel Distortions

    Hello community, I hope someone can help me out with my bad situation. Since I bought an iMac in April 2010 - I really had NO problems and was so happy with the product. Last week unfortunately a strange error happend SUDDENLY. After I turned on the