View image based on the query

view image based on the query
hi i what to download my image based on the following query,am in jdeveloper 11g am using this method for download,i show the whole link of procedure where the query is located and how was it used in forms,but nw i what to take the query and put it in my java code not the webutil just the query,i put the whole forms package so you can undestand the logic of the query how was it used
    public void ViewImage(FacesContext facesContext, OutputStream outputStream)
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
        // get an ADF attributevalue from the ADF page definitions
        AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("DocumentImage");
        if (attr == null)
            return;
        // the value is a BlobDomain data type
        BlobDomain blob = (BlobDomain) attr.getInputValue();
        try
        {   // copy the data from the BlobDomain to the output stream
            IOUtils.copy(blob.getInputStream(), outputStream);
            // cloase the blob to release the recources
            blob.closeInputStream();
            // flush the output stream
            outputStream.flush();
        catch (IOException e)
            // handle errors
            e.printStackTrace();
            FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
            FacesContext.getCurrentInstance().addMessage(null, msg);
    }when i use the above method in diffient screen without the upload i get this error
Target Unreachable, identifier 'viewImage' resolved to null
Error     
The file was not downloaded or was not downloaded correctly.
the below procedure is how i what to download the image but in java,but usin query in below procedure
function right_file (idref integer, i_file varchar2) return boolean is
begin
     -- check directory
     -- file size
       if webutil_file.file_exists(dir ||'\' ||i_file) then
       return true;
       end if;
return false;
end;
procedure download(i_dref integer, i_file varchar2) is
file varchar2(50);
dlin_id integer;
l_success boolean;
begin
     if not right_file (i_dref ,i_file ) then
            select file_name,dlin.id
            into file, dlin_id
            from sms_document_links dlin
                ,sms_document_references dref
            where dref.id = i_dref
            and dref.dlin_id = dlin.id
   l_success :=  webutil_file_transfer.DB_To_Client
                     ( dir ||'\'|| file,
                       'SMS_DOCUMENT_LINKS',
                       'DOCUMENT_IMAGE',
                       'id = '||dlin_id);
  end if;          
end download;
procedure open_image (i_dref integer,i_file varchar2) is
begin          
     local_path;
  local_viewer;       
     if I_file is not null then
          file := i_file;
     else
          select file_name into file
          from sms_document_references
          where id = i_dref
     end if;
     download(i_dref, file);
     if not webutil_host.ID_NULL(active_process) then
    close_previous_image_process;
     end if;
     image_dir_file := dir ||'\'|| file;
     process :=  webutil_host.nonblocking (image_viewer || image_dir_file);
     if webutil_host.ID_NULL(active_process) then
          active_process := process;
     end if;
     if webutil_host.equals(process,active_process) then
          null;
     else     
    close_previous_image_process;
    active_process := process;
     end if; 
     viewer_active := true;
end;--

oh ho.
Dear user,
this is not code factory/design factory/bla bla bla.
this area for guide peoples where you are? what is way right to reach your target/goal. whatever in you words...
from your post and also procedures, you are from forms background. am also came from ORacle froms 10g background try to understand. and implement it adf.
back to topic:
Target Unreachable, identifier 'viewImage' resolved to null Error .i just am giving the steps to igonre your error
simple go to your taskflow - go to overview section - go to managed beans. configured you which you created bean say as x.java
if you create following code can be seen in source
<?xml version="1.0" encoding="windows-1252" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
  <task-flow-definition id="xx-V-TF">
    <default-activity id="__1">xxV</default-activity>
    <managed-bean id="__2">
      <managed-bean-name id="__4">SUP1040V</managed-bean-name>
      <managed-bean-class id="__5">com.x.x.view.xBeans.xxV</managed-bean-class>
      <managed-bean-scope id="__3">backingBean</managed-bean-scope>
    </managed-bean>
    <view id="xV">
      <page>/ReportsPageFragments/xxV.jsff</page>
    </view>
    <use-page-fragments/>
  </task-flow-definition>
</adfc-config>

Similar Messages

  • 10G-form: How to open 2nd form based on the queried result in 1st form?

    Form1: text_item1, search_result_text_item11, search_button, go_button
    Form2: text_item2
    When I press search_button on Form1, I am able to get the result in search_result_text_item11 based on the query defined in the search_button TRIGGER.
    So I've value in search_result_text_item11.
    Now I want to copy search_result_text_item11 value of Form1 to text_item2 value in Form2 when I click go_button;
    How do I do it?
    Thanks.
    Gaurav

    i can think of two ways,
    one is pass it as parameter, when you are calling the new form
    or
    in form1, in the when-button-pressed trigger of your go_button, copy the value of search_result_text_item11 to a global variable...
    in form2, in when-new-form instance, assign the value of the global variable to text_item2
    just be sure to erase the global variable immediately after you assigned to text_item2. also, you may want to put, default_value before assigning the global variable to the text_item2, this is to ensure that you will not have error when the global variable is not created.

  • How to create a diagram based on the query?

    Hi All,
    I want to create a diagram which will show a structure based on the data in the tables.
    For example:-
    if in a table, we have on two columns,
    one have unique breed of animal and other columns have sub-breeds under that breed. it is one to many mapping.
    in some other table,we have on two columns,
    one have unique sub-breed of animal and other columns have again sub-breeds under that breed. it is one to many mapping.
    i want to display the diagram as shown at the following url:- http://www.signosemio.com/a_analyse-par-classement.asp (diagram:- The naïve ontological classes)
    At the place of Boxes, i will show images.
    but i am not able to generate this diagram.
    please help.

    I am afraid, the Google Visualization plugin (which is used internally by that apex plugin) does not support multiple parents.
    The documentation page says the following
    Each node can have zero or one parent node, and zero or more child nodes.I tried adding an extra row for a child with an additional parent, but it removed the old parent association for that record in the chart
    You might have to some other plugin which supports that or find an JS/jQuery plugin that renders as per your requirement and then write the code yourself to pass the data to JS function from the page.

  • Views - SELECT from VIEW and SELECT from the query inside view definition returning different results

    Hi,
    I am facing this weird issue. Any help would be appriciated.
    I have view with the following definition:
    CREATE VIEW [marketing].[OpenedMails]
    AS
    SELECT
    ID_EmailAddress, 
    ID_Date_Opened, 
    ID_Contact, 
    ID_MailSendJobs,
    COUNT(ID_OpenedMails) AS OpenCount,
    CASE
    WHEN ROW_NUMBER() OVER (PARTITION BY CAST(ID_EmailAddress AS VARCHAR(10)) + ' ' + CAST(ID_MailSendJobs AS VARCHAR(10)) ORDER BY ID_Date_Opened) = 1 THEN 1 
    ELSE 0 
    END
    AS UniqueOpenCount
    FROM            
    dbo.Fact_OpenedMails
    where ID_Contact = 382340
    GROUP BY ID_EmailAddress, ID_Date_Opened, ID_Contact, ID_MailSendJobs;
    order by ID_MailSendJobs 
    When I run the the select statement in the view definition I get combination of both 1 and 0 for the 'UniqueOpenCount' column.
    But when I run the select from the view itself using the following query:
    SELECT [ID_EmailAddress]
          ,[ID_Date_Opened]
          ,[ID_Contact]
          ,[ID_MailSendJobs]
          ,[OpenCount]
          ,[UniqueOpenCount]
      FROM [marketing].[OpenedMails]
    I get equal amount of rows but only 0 values for the 'UniqueOpenCount' column which seems to be very weird to me. Why is this happening ? Can anyone help regarding how to solve this ??
    Result from the select inside view definition:
    Result from the select query directly from the view:
    Thanks in advance.
    Vivek Kamath

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You failed. Temporal
    data should use ISO-8601 formats – you failed again. Code should be in Standard SQL AS much AS possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    Things like “ID_Date_Opened” are wrong. The affixes “id” and “date” are called attribute properties in ISO-11179 and data modeling. Since a date is a unit of measurement on a temporal scale, it cannot be an identifier by definition. My guess is this would be
    “open_date” if it were done right. And the only display format in ANSI/ISO Standard SQL is ISO-8601 (yyyy-mm-dd)
    An email address of -1?? Email addresses are VARCHAR(256), not numeric. There is no reason to cast them AS string!
    Your vague “mail_send_jobs” is plural, but columns hold scalars and cannot be plural by definition. The partition cause can hold a list of columns: 
    WHEN ROW_NUMBER() 
         OVER (PARTITION BY email_address, mail_send_job 
                   ORDER BY open_date)
         = 1 
    THEN 1 ELSE 0 END 
    This still makes no sense, but the syntax is better. You do not understand how ROW_NUMBER() works. 
    Would you like to try again with proper Netiquette? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Different masterhead image based on the user logged in portal

    HI,
    Presently we are using standard portal theme.How can I change the image in the masterhead based on the user logged in.How can i change that and i want to assign that masteredhead to users.
    Can anybody give me suggesion about this.
    Thanks,
    Regards,
    Srinivas

    Dear Srinivas,
    Simple of achiving this kind of scnario is create separate themes for different users and assign the themes to the users in master rule collection through Desktop Page.Here in this case you will be creating one framework page and multiple Desktops and themes.All the desktops will be having the same framework page and different themes based on the user type or group type.
    Otherway of achiving this is create an pdk application where it will have multiple jsp components in it and based on the each component create one PAR iview.Let us take if four groups of users then you will be creating four different jsps in pdk application which will inturn contains different masterhead images and related logos.After creating the iview place the iview in the correcsponding framework page below the masterhead iview.Here multiple framework pages and Desktops and you can go with single theme.
    In the first scenario the masteread , we are managing through the theme and in second the masterhead we are managing throgh application.
    Either of the scenarios can be used to create differet masterheads for different users.
    Hope the answer helps you....
    Reward the points if it is helpful.
    Thanks,
    Rudradev Devulapalli

  • Different masterhead image based on the user logged in

    HI,
    Presently we are using standard portal theme.How can I change the image in the masterhead based on the user logged in.How can i change that and i want to assign that masteredhead to users.
    Can anybody give me suggesion about this.
    Thanks,
    Regards,
    Srinivas

    Dear Srinivas,
            Simple of achiving this kind of scnario is create separate themes for different users and assign the themes to the users in master rule collection through Desktop Page.Here in this case you will be creating one framework page and multiple Desktops and themes.All the desktops will be having the same framework page and different themes based on the user type or group type.
            Otherway of achiving this is create an pdk application where it will have multiple jsp components in it and based on the each component create one PAR iview.Let us take if four groups of users then you will be creating four different jsps in pdk application which will inturn contains different masterhead images and related logos.After creating the iview place the iview in the correcsponding framework page below the masterhead iview.Here multiple framework pages and Desktops and you can go with single theme.
             In the first scenario the masteread , we are managing through the theme and in second the masterhead we are managing throgh application.
             Either of the scenarios can be used to create differet masterheads for different users.
    Hope the answer helps you....
    Reward the points if it is helpful.
    Thanks,
    Rudradev Devulapalli

  • Finding Template Name Based on the Query

    Is there a way to find the Technical Name of a Template in which a query is being used?  I tried the Where-Used command on the query but it doesn't show which templates are using it.

    The "Where used" from the BEx query designer will display all the templates and workbooks which uses that query.
    The template will be displayed only if the dataprovider assignment for the query is done in the template definition not thru the URL.

  • Copy function based on the query with variables

    Hello
    Let me share the scenario I need to implement. I have a planning query with layout like shop / material / sales volume. The variables are shop number and calendar month. User opens the planning query, selects shop number and month, then sees the list of materials and puts the planned sales volume, then saves as a temporary version. Saving as a temporary version is realized by standard u201Csaveu201D function. The matter is that the user needs to have a possibility to copy this version to official one. I created the button and linked it with the copy function. The problem is that when a user clicks this button, the function asks him/her to provide variables again. I would like to have the button which copies the data with the same selection criteria as the query already has.
    Any idea?
    Arelis.

    Hi,
    I think when you add the button you specify the planning sequence name and that takes the filter of the modeler .Now when you try to call the planning sequence the filter variables are also added to the button as VAR_NAME, VAR_VALUE which prompts you for the variable again.Delete VAR_NAME,VAR_VALUE at the back of the button  manually and then save your work book.Then it will not ask for variable entry and the values that you have specified in the query filter will pass on to modeler filters.As variables are global.
    Similarly if you are using planning function then at the back of the button remove the VAR_NAME,VAR_VALUE.
    Hope this may help.
    Regards,
    Indu

  • MODIFY THE RESPONSE HEADER VALUE IN IIS BASED ON THE QUERY STRING IN THE REQUESTED URL

    We Hosted a directory on IIS.
    The Files in the directory are saved with a Guid values.
    when there is a request from the client for a given resource ,we need to fetch the file name from the query string and modify the reponse header :" Content-Disposition",So that the User can Download with the requested name

    Sounds like a question for the ASP.NET forums:
    http://forums.asp.net
    Or the IIS forums in case you want to write some kind of module to do this without involving ASP.NET:
    http://forums.iis.net/

  • How to view images stored in the database

    Hi all
    I've a table in the db lets say T and two cols (ID & IMAGE). IMAGE data type is ORDIMAGE. I want to view this image in the web browser using the Dyanmic Page in Oracle Portal. Please anyone help me.
    Regards

    query = "Select * From (SELECT *,COUNT(1) OVER (PARTITION BY ENo) AS Occur FROM EmpLeave)t Where Occur >1)";
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Viewing images directly from the camera in Aperture?

    Hello to all. I was at a seminar last wednesday and the photographer was saying that I could connect my D300 directly into my Mac and with Aperture I could see the images right after I took it. Is this true because I haven't been able to find anything on the aperture guide nowhere...
    Thank you in advance and have a good one!

    Hi,
    This is called tethering -- watch the tutorial at:
    http://www.apple.com/aperture/tutorials/#organizeimport-tethering
    I haven't used it myself, as I only use Aperture on my Mac Pro Desktop, and I don't shoot in a studio.
    Good luck, and check out all the other tutorials available on that same site.
    Ernie

  • View Link Editor Issue - empty query clause if based on association

    JDeveloper 10.1.2
    Setup:
    - entities A and B
    - a 1 to * association from entity A to entity B (A_B_association)
    - a view of A based on entity A (AView)
    - a view of B based on entity B (BView)
    - BView has an expert mode query
    Create a view link from table A to table B:
    - choose the A_B_association under AView for the source attribute
    - choose the A_B_association under BView for the destination attribute
    - click add
    - click next
    issue: the query clause is empty
    - click next:
    info dialog pops up;
    title = "Business Components"
    message = "Restoring the default where clause."
    Note, however, that creating a view link based on the attributes works. That is, if I choose the primary key attribute under AView for the source attribute, and the corresponding foreign key attribute under BView for the destination attribute, then the wizard generates the expected query clause.
    If I create a new project and recreate the entities, the views, and the association, then I can successfully create a view link based on the association. The foreignKey value on the association end was different in the new association XML file.  I modifed the old XML file so that it used the same foreignKey element, but that did not seem to work.
    I am guessing that this is some sort of user error on my part or that we have otherwise managed to squat up our XML files.
    Any tips, hints, or ideas appreciated.
    Thanks,
    Steve

    The problem is in AView.
    We had modified the AView at one point, then reverted it to a default view of entity A. Here, "a default view" means that we undid our custom changes (apparently not thoroughly enough); that is, we did not delete it and create a default view from scratch using the contextual menu on the A entity.
    The bottom line is that the AView attributes were not being mapped to the entity -- they were showing up as calculated attributes.
    We created a "New Default View Object..." from the contextual menu of entity A, then manually corrected the AView.xml file to solve the problem.

  • Why Has The View Image @ %age Gone??? and Comment on 'Content Aware' Healing Brush.

    PLEASE, PLEASE BRING BACK the View Image @ 'x' %. on the Top Bar.
    It is necessary to view all images at 100% to check for dust on sensor.
    It is necessary to view portrait images at 50% to remove obvious skin blemishes before final editing.
    Two 'clicks' on CS5  - A convoluted process in CS6 Beta!
    Omitting this option is a major retrograde step!
    Appreciate the difficulties with this option and it is a plus.
    Would be great if you could select an area in one area of image and scale it content aware into another selected area!

    There are various ways such as using the Clone Source Panel to scale the source and then use the healing brush, though it doesn't have content aware per se.
    Emblem on sterring wheel to mirror:

  • How can I show or hide an image based on screen size in CS6?

    I have a web site built using Dreamweaver CS6. I used the fluid grid layout to have different views for each of the 3 types - phone, tablet, desktop. It works well, resizes as it should. I would like to be able to show an image in the desktop version but not the mobile version. How could I do that? I can see in the .css file that different size screens can have their own different settings. Is there code I could add that would hide/show and image based on the users viewport on the same page? Let's say I have a div tag named picture. How could I add a parameter to the picture div tag in the style sheet that would hide the image if it was mobile?
    thanks,
    Marilyn

    Insert image into a container div.
    Desktop CSS:
    #divName {
    height: xxxpx
    width: xxxpx
    Tablet & Mobile CSS:
    #divName {display:none}
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • SearchBox Not showing the result while entering the query in XSLT Listview webpart

    I Have a programmitically created a XSLT listView webpart,in that webpart I have  a Searchbox.If any search query i given in that box result is not showing or list items is not filtering based on the query.My code is below
      SPListItemCollection listItemColl = this.GetData();
                SPListItem listItem = null;
                string ListName = string.Empty;
                string listViewName = string.Empty;
                try
                    // create our List View web part
                    XsltListViewWebPart wp = new XsltListViewWebPart();
                    SPWeb web = SPContext.Current.Web;
                    if (listItemColl.Count > 0)
                        listItem = listItemColl[0];
                        if (listItem[CommonResources.List_Field_TilesListName] != null)
                            this.divListviewConfigTileWrapper.Controls.Clear();
                            ListName = Convert.ToString(listItem[CommonResources.List_Field_TilesListName]);
                            SPList list = web.Lists[ListName];
                            wp.ID = ListName + "_WP";
                            wp.ListId = list.ID;
                            wp.ListName = list.ID.ToString("B").ToUpper();
                            wp.WebId = web.ID;
                            if (listItem[CommonResources.List_Field_ListViewName] != null)
                                listViewName = Convert.ToString(listItem[CommonResources.List_Field_ListViewName]);
                                wp.XmlDefinition = list.Views[listViewName].GetViewXml();
                                wp.ViewGuid = list.Views[listViewName].ID.ToString("B").ToUpper();
                            else
                                wp.XmlDefinition = list.DefaultView.GetViewXml();
                                wp.ViewGuid = list.DefaultView.ID.ToString("B").ToUpper();
                            wp.InplaceSearchEnabled = true;                        
                            wp.AllowConnect = true;
                            wp.AsyncRefresh = true;               
                            wp.ViewGuid = list.Views[listViewName].ID.ToString("B").ToUpper();
                            wp.View.TabularView = false;                       
                            Control ctrl = (Control)wp;
                            this.divListviewConfigTileWrapper.Controls.Add(ctrl);
    Any please help me regarding this.

    Hi Karthik,
    Is your question related in any ways to Microsoft scheduling solution PROJECT? In case it is, please develop with more details about the exact issue, technology, environment, version...
    In case it is not, please delete and post it to the right TechNet forum in order to have an helpful hand.
    Regards.
    Guillaume Rouyre - MBA, MCP, MCTS

Maybe you are looking for

  • I have a iPod classic 80GB (2008) which no longer plays or connects to iTunes

    My iPod worked faultlessly until recently when it suddenly began having difficulties connecting to iTunes and the wall charger. I managed to reset the iPod and it worked as usual for 2 days but then it decided to revert back to not working. When conn

  • Project as an Investment measure - Unable to settle

    Hi, Request help on the below situation. 1.We have created a project as an Investment project using tcode CJ20N and a WBS element in the project also. The WBS element when released, creates an AUC automatically. However the AUC created does not have

  • F110 payment postings individual invoices

    Hi, When executing the paymentrun (Direct debits), the payment program generates 1 payment posting (clearing document) per customer in which several open items/invoices are processed. Now we want to have a payment document (clearing document) for eac

  • Environmental settings problem

    i am trying to run a application on tomcat 5.0 i have checked all the settings but still it is giving same problem i am giving settings which i have done in environmetal settings JAVA_HOME c:\j2sdk1.4.2_12 CATALINA_HOME c:\program files\tomcat 5.0 PA

  • Insert new segment in we30

    hello! i am inserting a new segment in an standard idoc. In delivery idoc i want to insert a segment beetwen E1EDL21 and E1DL51, but when I create it automatically insert in like son of them. How i can inert a segment between 2 standard segments with