How to refresh an image's source value

I have an image component in a page fragment. When the page opens the image's source is set to the URI for a gif
What I want is to be able to update the URI to another image once a managed bean's property value changes.
The image component is bound to a managed bean property, pageAnimationImage.
I'm new to ADF and tried to set the partial trigger when the property value is set and also set the image's clientComponent to true
AdfFacesContext.getCurrentInstance().addPartialTarget(pageAnimationImage);
I searched this forum and other blogs but couldn't find anything related.
I'd really appreciate it if someone has a suggestion or point me to a related case.
tia

You can try to bind the component to broader scope e.g. pageFlowScope or applicationScope and see if this works.
One other thing to try is to search for the component via its id
// find a jsf component   
private UIComponent getUIComponent(String name) {
FacesContext facesCtx = FacesContext.getCurrentInstance();
return facesCtx.getViewRoot().findComponent(name) ;
}The method should find the component by its id. If you find it this way use the returned component to set the ppr on it with
// PPR refresh a jsf component
UIComponent image = getUIComponent("MyImageID");
if (image != null)
    AdfFacesContext.getCurrentInstance().addPartialTarget(UIComponent);Timo

Similar Messages

  • How to refresh an Image component

    Hi,
    jdev 1.1.1.5
    I have a parent page with a table to show employees and a tab to show detail of employees
    Detail is in a Region and is sharing the same datacontrol with parent page and i don´t have any parameter in task flow.
    Sincronization Parent - Detail works fine using Partialtriggers.
    Detail Region has a button for upload an image and another button to process the image and an Image component(by servlet) to show it.
    Process button call an operation exposed in AM, This method do Insert or Update in IMAGE TABLE.
    The problem is than image is not refreshed until i do full refresh the page.(but only occurs when updating the image, for insert the Image component show the new image)
    I tried this code at end of process button logic but i can't achieve refresh the image.
      public void saveFileUploaded() {
          oper =
              bindings.getOperationBinding("myMethodInAM");
           Map args = operaImatge.getParamsMap();
           args.put("empId", empId);
           args.put("imatgeBlob", createBlobDomain(file));
          oper.execute();
    // try refresh entire region method 1
           AdfFacesContext.getCurrentInstance().addPartialTarget(JSFUtils.findComponentInRoot("r1"));
       // try refresh image component
           AdfFacesContext.getCurrentInstance().addPartialTarget(JSFUtils.findComponentInRoot("imageEmp"));
      //  try refresh region method 2    
           RichRegion region = (RichRegion)JSFUtils.findComponentInRoot("r1");
           region.refresh(JSFUtils.getFacesContext());
      }Any suggestion?
    Thanks in advance
    Edited by: DV on 03-sep-2011 17:36
    Edited by: DV on 04-sep-2011 11:33

    Hi,
    I have updated the use case at first message.
    you wrote
    you have a binding to the component that is holding the image.. and then refresh the container region..
    that would refresh the image inside.
    can you give two cents?
    i just created a binding for image component but
    what must i do?
    Remember
    the button for process image (operation exposed in my AM service) and Image component(by servlet) are in the same .jsff.
    Means the changes occurs in same jsff without interaction with parent page.
    Thanks,
    Edited by: DV on 04-sep-2011 11:43

  • How to refresh the table after change value in the VO programatically?

    Hi,
    I like to update my table by using a popup. My problem is that the table does not refresh after I change the value in the table's VO by the popup.
    There is another table in the popup, and the popup is triggered by a command button. An af:showPopupBehavior is nested in the button. The method of the button in backing bean is as following,
    public void accountcodeButtonClicked(DialogEvent dialogEvnt) {
    ViewObject volisttable=am.getAcChartValidateView1();
    String nowcode=volisttable.getCurrentRow().getAttribute("Code").toString();
    ViewObject vobasetable=am.getGlDetailView1();
    vobasetable.getCurrentRow().setAttribute("AccountCode",nowcode);
    The partialTrigger of the base table's column AccountCode points to the triggering button.
    I do not know why the base does not refresh after the above method is executed.
    Please me.
    Stephen

    Hi,
    kind of a shame that after so many years of ADF the message that updates should be through the binding layer hasn't gone through ;-)
    You change the underlying business service, which doesn't impact the binding layer the way you do it. So here is what you can try in the same order
    - 1. RequestContext.getCurrentInstance().addPartialTarget(<table reference>)
    - 2. If 1. doesn't show the changed data, try and re-execute the iterator that is the base of the table. If this works then the effect you see is caused because you ignore using the binding layer
    Frank

  • How to Refresh The Page When The Value of selectinputData Changes

    Hi;
    I have a select input date component and I want to refresh the page when the value of selectinputdate changes. What is the way to do it?
    Also what is the way to do the same thing with choosedate component?
    Thank you very much...

    Hi Turhan,
    You may want to read about the Partial Page Refresh (PPR) capabilities in ADF Faces. You can make the selectInputDate's partialSubmit property "true" and then cause the specific components you wish refreshed have their partialTriggers property set to the ID of the selectInputDate.
    Hope this helps,
    John

  • How to get an image's source in safari?

    I need the image location/source for a picture, but I can't find a command for Safari to do this. Please help!

    Following paul2363's instructions, you will be able to read the image's location in the address bar.
    Alternatively, you can Control-click on the image and choose "Copy Image Address" from the contextual menu. Then paste the resulting URL wherever you need it.

  • Reg How to Update DeleteFlag Image (Default N)  Value in Table

    Hi Friends,
    I have One Column Delete Button(Style Image) in Advanced Table So Based on That Delete Button Click I need to Update Value in Table(DeleteFlag =Y )
    So How to Update Value in Table(Data Base).
    Select empno,deleteflag from Emp where empno=:1
    I attached this EmpVO to Advance Table So How to update Delete Flag(Y) Value.
    Hint:::::: Iam Using Packages(Pl Sql) And Read Only VO's Only.
    With out Using Package & EOVO Update is Possible In OAF.
    Thanks & Regards
    San

    Okay ,
    Here we go ,
    Step 1 : Select the item in the table ( image) and go to property inspector and select fire action , give some name for Action .
    Step 2 : Capture the above event from your controller class ( ProcessFormRequest () ) and Implement SQL statement
    Use below code :
    Import the followings
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    if ("YourEventID".equals(pageContext.getParameter(EVENT_PARAM))) // replace your event id created above
    Inside if statement Add code to handle sql statement .
    try
    String Query = " "; // write any single SQL statement along with bind parameter inside " " , in your case it should be update statement
    PreparedStatement stmt = conn.prepareStatement(Query);
    stmt.setString(1,Paramtervalue); //set your bind parameter value here ( where clause paramter )
    catch(Exception exception)
    throw new OAException("Error in Staffing Query"+exception, OAException.ERROR);
    Keerthi
    Edited by: keerthioaf on Nov 27, 2012 1:47 AM

  • How to refresh .swf file whose source data is only using "EXCEL"

    Can Some one help me out with this please.........
    I developed a dashboard using excel (embedded in xcelsius 2008) and then exported it to .swf file.
    Now when the data changes in .xlf file. I want my swf file to refresh the data.
    Thanks in Advance

    Hi,
       Read the below instructions extracted from KB Article 1424833 and see if it helps
    XML files need to be designed in a specific structure in order to work correctly in Xcelsius 2008. Below are some important conventions:-                                                                               
    1) The XML code should start and end with data tag like <data>...</data>.                                                            
    2) Row and column tags must be used to encapsulate data.                                                                         
    3) Everything is case sensitive.                                                                               
    4) While inserting a range in XML data connection, the range name should be similar to the variable name defined in the XML code.                                                                               
    The xml code should look like this:-                                                                               
    <data>                                                                               
    <variable name="ExampleRange">                                                                               
    <row>                                                                               
    <column> Row1 Column1 value </column>                                                                               
    <column> Row1 Column2 value </column>                                                                               
    <column> Row1 Column3 value </column>                                                                               
    </row>                                                                               
    </variable>                                                                               
    </data>                                                                               
    In Xcelsius, we have to give range name=ExampleRange and then assign the Excel cell to load the data.
    Regards,
    Ken

  • How to Refresh "Internal table values" in User EXIT.

    Dear All,
    My requirement is to place some checks in exit ZXQQMU20 in different tabs from the TCODE IW21 . IW22 etc.
    Now after placeing the checks towards the different tabs while doing "NOCO" from IW21 the conditions are fullfilled but
    when i go ahead to modify the created  "NOCO " from the TCODE IW22 by deleting the created values and saving in IW22 , the conditions written in the exit are still satisfied eventhough i have deleted the values in IW22.
    The reason for this is that the tables which are there in the exit ZXQQMU20 T_VIQMFE , T_VIQMUR , T_VIQMMA
    still contains the old values which were there at the time of creation of "NOCO"  in IW21 .
    How to refresh my " internal tables values" used in such that even at the time of modification of the NOCO through IW22 my table values should pick the current screen values and not the values which were there at the time of creation.
    Please help.
    The code i have written in the exit is as below:-
    ********************* Changed vide ******START
    *****IW21  IW22 also added in filter criteria of notification *************
    ******The purpose of this modification is that in the execution of IW21 or IW22 or IW24 or IW25 we have to give a check that if the
    ******notification type is M2 than inside the Transaction screen , if the Breakdown duration comes less than 15 min than there are
    ******no issues but if the breakdown duration is more than 15 min than the mandatory fields needs to be entered in the analysis tab.
    **    The user has to fill up either following mandatory fields in Analysis Data tab.
    **    A. Object Parts & Damages sub tab
    **    Code Group - Object Parts (OTGRP, VIQMFE)
    **                          AND
    **    Code Group - Problem / Damage (FEGRP, VIQMFE)
    **    Or
    **    Notification Item Short Text (FETXT, VIQMFE)
    **   B. Cause sub tab
    **    Code Group # Causes (URGRP, VIQMUR)
    **    Or
    **    Cause Text (URTXT, VIQMUR)
    **   C. Action Taken sub tab
    **    Code Group # Activities (MNGRP, VIQMMA)
    **    Or
    **    Activity Text (MATXT, VIQMMA)
    **            Then, allow user to complete notification (NOCO).
    CLEAR : L_VAR , L_COMP_TIME.
    IF ( SY-TCODE EQ 'IW21' OR SY-TCODE EQ 'IW22' OR SY-TCODE EQ 'IW24' OR
          SY-TCODE EQ 'IW25' ).
       IF ( E_VIQMEL-IWERK = '061' ) OR ( E_VIQMEL-IWERK = '062' ).
         IF E_VIQMEL-QMART = 'M2'.
           L_VAR = E_VIQMEL-AUSZT.
           L_COMP_TIME = L_VAR / 60.
           IF L_COMP_TIME < 15.
             EXIT.
           ELSEIF L_COMP_TIME > 15..
    *         IF ( T_VIQMFE-OTGRP IS INITIAL AND T_VIQMFE-FEGRP IS INITIAL )  OR  ( T_VIQMFE-FETXT IS INITIAL ) .
    *           MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
    *         ENDIF.
             IF T_VIQMFE-OTGRP EQ '' OR T_VIQMFE-FEGRP EQ ''.
               IF T_VIQMFE-FETXT EQ ''.
                 MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
               ENDIF.
             ENDIF.
             CLEAR L_TAG.
             IF T_VIQMUR[] IS INITIAL.
               MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
             ELSE.
               LOOP AT T_VIQMUR.
                 IF  T_VIQMUR-URGRP IS INITIAL .
                   IF T_VIQMUR-URTXT IS INITIAL.
                     L_TAG = 'X'.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
               IF L_TAG = 'X'.
                 MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
               ENDIF.
             ENDIF.
             CLEAR L_TAG.
             IF T_VIQMMA[] IS INITIAL.
               MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
             ELSE.
               LOOP AT T_VIQMMA.
                 IF  T_VIQMMA-MNGRP IS INITIAL .
                   IF T_VIQMMA-MATXT IS INITIAL.
                     L_TAG = 'X'.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
               IF L_TAG = 'X'.
                 MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
               ENDIF.
             ENDIF.
           ENDIF.
         ENDIF.
       ENDIF.
    ENDIF.
    <Added code tags>
    Thank you so much in advance..
    -Sudhish
    Please use the code tags when you're posting any code snippet
    Edited by: Suhas Saha on Jul 13, 2011 12:39 PM

    Hi, I was thinking just like XVBAP and YVBAP values in the USEREXIT_SAVE_DOCUMENT.
    Plz check u have x /y versions or tables like _old/ _new suffixes and then move the value accordingly.
    otherwise there may be inconsistency.
    Edited by: Prasenjit S. Bist on Jul 13, 2011 3:03 PM

  • How stop PS6 from removing the DPI value from an image when using "save for the web"?

    How stop PS6 from removing the DPI-value from an image when using "save for the web"?
    Example:
    - Open a tif image, that contains a dpi value (resolution).
    - Use the splice tool in PS6.
    - Export the slices with "Save for web", as gif-files.
    Then the dpi value is removed, the gif files has no dpi value (it's empty).
    How can we stop PS6 from removing the dpi value when using "save for web"?
    OR:
    When using the slice tool, how can we save the sliced pieces without PS removing the dpi value?

    you can make your art go a little bit over the bounds. or you can make sure your artboart and art edges align to pixels

  • How to remove target node if source field value is empty SAP PI Mapping

    Hello,
    how to remove target node if source field value is empty in graphical Mapping.
    Like if
    MIddle name in source filed is empty, I would like to eliminate target field from out put XML.
    Thank you
    John

    Hi Jhon,
    If you want to remove all empty tags and you dont to complicate your message mapping, you can use a XSL, after the message mapping,  to remove all the empty tags:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="node()|@*">
            <xsl:copy>
                <xsl:apply-templates select="node()|@*"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="*[not(@*|*|comment()|processing-instruction())
         and normalize-space()='' ]"/>
    </xsl:stylesheet>
    Regards

  • How to refresh the input text value in backing bean

    hi all
    i want to know
    how to refresh the input text value in backing bean?
    i have tried this code ,but it doesnt work
    public void click(ActionEvent actionEvent) {
    tempConId.setValue("111111111111111");
    AdfFacesContext.getCurrentInstance().addPartialTarget(tempConId);
    sb know?
    Edited by: Joe Zou on 2012-4-6 下午9:11

    The code looks good.
    Here is a sample based on your use-case:
    InputTextSample.jspx:
    <af:form id="f1">
            <af:panelFormLayout id="pfl1">
              <f:facet name="footer">
                <af:commandButton text="Ok" id="cb1" partialSubmit="true"
                                  actionListener="#{InputTextSampleBean.onClick}"/>
              </f:facet>
              <af:inputText label="InputText" id="it1"
                            binding="#{InputTextSampleBean.myInputText}"/>
            </af:panelFormLayout>
          </af:form>
    InputTextSampleBean.java:
    import javax.faces.event.ActionEvent;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.context.AdfFacesContext;
    public class InputTextSampleBean {
        private RichInputText myInputText;
        public InputTextSampleBean() {
        public void setMyInputText(RichInputText myInputText) {
            this.myInputText = myInputText;
        public RichInputText getMyInputText() {
            return myInputText;
        public void onClick(ActionEvent actionEvent) {
            this.myInputText.setValue("1234");
            AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
            adfFacesContext.addPartialTarget(this.myInputText);
    }

  • How to refresh image component JSP?

    hi i am using Netbeans 6.01 and developing a web project.
    I need to do some manipulation on an image according to input and save the image at address in the project/build/resources/image with the same name when user press a button but sometimes page refreshes the image and sometimes it does not refresh.I don't know what to do
    thank you for your interesting and help if u need more details about the problem please just ask me.

    I have just discovered something this is not about the code that i wrote
    double x=0;
    while(x<=1000000000)
    x++;
    super.init();
    init();
    i delete this code when i reload page once after that all of my requests works properly.I mean when i press reload button of the browser once then page works and image is resfreshes.
    Now i can solve the issue if anybody can tell me how to reload a page when i press a button
    i don't wanna use the javascript onclick() window.location.reload().
    Edited by: maniacneron on Dec 24, 2008 2:34 PM

  • How to define source value for filtered recordset (ASP)

    Hi,
    I'm using ASP & CS4. I have a search page which upon submission sends form parameters to a results page. The results page matches the search parameters to a recordset and returns the appropriate record/s.
    How can I take one of the values from the returned filtered recordset (which wasn't one of the original variables/parameters), and use it as a value to filter another recordset from another table? Do I have to create a parameter from that value, or can it be done in a SQL statement?
    Many thanks

    How many results are returned from the first recordset? Where is the second recordset to be displayed?
    If the first RS returns a single row and the second RS is displayed on the same page, you don't need to create anything. Just use the value of the column you want in the SQL statement. If you need to pass the value to another page, you can either set a session variable or pass the value in the querystring.

  • How to upload an image in jsp page

    hi,
    I want to upload an image file with my jsp page, but i cannot do it,
    I have used Jakarta common file upload for this & i have also read following file. But my code isnot working properly? Can you give me any example how to upload an image & how to display it?
    Can u give me any source code? Please help me.
    http://jakarta.apache.org/commons/fileupload/using.htmlwith regards
    Bina

    Hi,
    But after writing the following code i have got following error? What's the problem of this code? please help me?
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    <%@ page import="org.apache.commons.fileupload.*" %>
    <%@ page import ="java.util.*" %>
    <%@ page import ="java.io.*" %>
    </head>
    <body>
    <%
    boolean isMultipart = FileUpload.isMultipartContent(request);
    DiskFileUpload upload = new DiskFileUpload();
    List items = upload.parseRequest(request);
    Iterator iter = items.iterator();
    while (iter.hasNext()) {
    FileItem item = (FileItem) iter.next();
    if (item.isFormField()) {
    String name = item.getFieldName();
    String value = item.getString();
    //ring name= request.getParameter("")
    %>
    <%= name %>:<%= value %>
    <%
    } else {
    %>
    <%
    InputStream stream = item.getInputStream();
    OutputStream bos =
         new FileOutputStream(getServletContext().getRealPath("/images"+"/"+ item.getName()));
    int bytesRead = 0;
    byte[] buffer = new byte[8192];
    while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {
    bos.write(buffer, 0, bytesRead);
    bos.close();
    stream.close();
    item.delete();
    %>
    </body>
    </html>Error is:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileUpload cannot be resolved
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileUpload cannot be resolved
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    DiskFileUpload cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
    An error occurred at line: 13 in the jsp file: /uploadfileC.jsp
    Generated servlet error:
    FileItem cannot be resolved to a type
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Please help me.
    With regards
    Bina

  • How to display a image in webdynpro view using a bytearry

    Hi Frndz..
    How to display an image in a view using webdynpro java ..i have bytearry object in context ..like
    *byte[] img = wdContext.nodeYywwwdataImport_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();*_
    by using this i need to show image in view..
    Kindly help me ....
    Thankas in Advance
    Regards
    Rajesh

    Hi,
    byte[] img = wdContext.nodeYywwwdata_Import_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();
    use this code to create resource and you need to set this value to the context created to display the image suppose in the image UI and set the source property with this attribute:-
    IWDResource res=WDResourceFactory.createCachedResource(b,"MyImage",WDWebResourceType.JPG_IMAGE);
    IPrivateAppView.IVn_ImageTabElement imageEle=wdContext.createVn_ImageTabElement();
           imageEle .setVa_Name(res.toString());
    wdContext.nodeVn_ImageTab().addElement(imageEle);
    Hope this may help you.
    Deepak

Maybe you are looking for

  • Accidentally deleted a song I already purchased a while ago

    I accidentally deleted 2-3 songs I purchased over the summer from my computer. Is there a way on Itunes to redownload previous purchases without paying for them again? Thank you.

  • Cfgrid not displaying in flash format

    <cfform format="flash" width="1000" action="editContact.cfm"> <cfgrid name="contact" query="contact_details" selectmode="edit" insert="yes" delete="yes" height="200" width="1000" align="middle"> <cfgridcolumn name="ID" display="no"> <cfgridcolumn nam

  • Pull variable from outside of OBIEE?

    Hi, say I have a .NET, Java or Javascript form which I embed in OBIEE simply by having the web form in a OBIEE portal as embedded content. Is it possible to get a report to 'see' the variables in the form?? thanks for your time, Robert.

  • IWork '09 Physical DVD Upgrades via App Store?

    I purchased iWork '09 on DVD from the Apple Store back when it came out. I have been able to receive constant updates through "Software Update" up until upgrading to Mountain Lion. Now that OS X 10.8 shifted all software updates to the Mac App Store,

  • 4 DECIMALS UOM

    Hi All, i want to use UOM with 4 decimals in SERVICE PR , PO but system is not accepting value more than 3 decimals. message : input must be in the format ,,_,__~._ -.. please suggest. thanks and regards mahesh