How to make JSF render binary data

Hi Everybody,
I am trying to make JSF render some binary data. I have my own components, set of renderers and render kit all implemented.
Still, I get several problems, one of them seems to bo implementation of UIComponentTag (in Sun's reference implementation, but, on the first glance,MyFaces has the same problem).
If you are rendering response, you should use either ResponseWriter or ResponseStream, not both of them, correct ? But UIComponentTag directly creates ResponseWriter in doStartTag() code - and what are my chances to use ResponseStream somewhere ? I was thinking about UIComponent subclassing ( re-implementing doStartTag() and doEndTag() ), but it does not seems to be easy if you are NOT calling parent's methods .
Of course, I can access servlet's responseStream through facesContext and do anything I would like, but it seems to be more than a hack
So - does anybody has a positive experience of making JSF render binary data, or this is more a theoretical possibility ?
Regards, Nikolajs Krasnikovs

If the data bean is request scoped, then just load it in its constructor or initialization block.
If it is session scoped, add the following lines to the getter of the datamodel:
if (FacesContext.getCurrentInstance().getRenderResponse()) {
    // Reload data list here.
}Also see the following article for some new insights: http://balusc.blogspot.com/2006/06/using-datatables.html

Similar Messages

  • How to make use of adjacent data elements within the same buffer

    Hi,
             Does anyone know how to make use of adjacent data elements within the same buffer? To make my question clearly, I would like to give you an example. In my application, I set "sample to read" as 10 which means at each loop 10 data samples will be taken into a buffer. Now, what I would like to do is to do some calculations on adjacent data samples in same buffer. I tried to use "shift register" for this, but it seemed to me that it only can deal with the calculation between data from adjacent loops. In other words, it skips 9 data elements and take the 10th one for the calculation.
             Here I also attach my VI showing what I did.
        Thank you very much in advance,
                            Suksun
    Attachments:
    wheel_encoder_1.vi ‏98 KB

    Hi Suksun,
          I hope you'll forgive me for distilling your code - mainly to understand it better.  I tried to duplicate your logic exactly - which required reversing the "derivatives"-array before concatination with the current samples array.  As in your code, the last velocity is being paired with the first position.  If first velocity is really supposed to be paired with first position, just remove the "Reverse 1D Array" node.
    cheers
    Message Edited by Dynamik on 01-07-2006 03:17 AM
    Message Edited by Dynamik on 01-07-2006 03:19 AM
    When they give imbeciles handicap-parking, I won't have so far to walk!
    Attachments:
    encoder2.GIF ‏14 KB
    encoder2.vi ‏102 KB

  • How to make the exchange of data between 2 while loop in real time

    hello
    I have 2 while loop
    the 1st while loop includes the data acquisition program
    the 2nd while loop includes the control program
    my question is how to make the exchange of data between 2 while loop in real time
    I tried with the local variable and direct wiring between the 2 while loop
    it does not work (there is a delay)
    Solved!
    Go to Solution.

    Bilalus,
    Queues are only good to transfer data if your application isn't deterministic. Since you are using Real Time, I am assuming that your application requires determinism. If you are using Timed Loops and you use queues to transfer data between your loops, you are losing determinism. In this case, you need to use the RT FIFO functions. 
    Warm Regards,
    William Fernandez
    Applications Engineering
    National Instruments

  • How to receive the images / binary data t ype

    How to receive the images / binary data type in webdynpro....
    i have a website that let's the user send email, the email attachment and message are stored in both in images data type....
    q1) can i stored the message into binary data type...but the message is very long.....
    q2) if i have a textbox ...i surely will need to display the message  in string ,right ?
    [......... msg here ........]
    what is the codes to receive the images / binary data type in webdynpro....

    As in your previous post if you are storing them as BLOB object.. am sure you are able to get a byte stream or byte array(bytes[]) out of it.
    There should be some way to identify if its a image or a message BLOB. If its a image , convert into bytes and use 
       WDWebResource.getWebResource(bytes,resource type).getAbsoluteURL()
    to obtain the url.. assign this image UI element..
    In case its the message , use bytes.toString to get the message ..
    Regards
    Bharathwaj

  • How to make linkage query In Data Model for search

    I want to make an linkage query as a condition for my  report in BI Publisher. how to make the linkage in Date Model ?

    This is the forum for SQL Developer, not for general SQL or PL/SQL questions.
    Please repost this in the SQL and PL/SQL forum.

  • How to stop JSF requesting readonly data from applyRequestValues?

    Hello everybody,
    I need to optimise server performance without deep knowledge of jsf.. Not easy..
    Debugging I found the next dirty picture:
    Page1 shows some information which cannot be modified on this page, for example - top 10 winners. The Page1 has a commandLink which leads to Page2, no data processing needed when swithching to Page2.
    Click on that commandLink leads to full jsf lifecycle:
    1) execute()
    - restore view
    - applyRequestValues - here Page1 requests values, doing processDecodes on "<h:dataTable cellpadding="3" cellspacing="0" width="100%" border="0" var="product" value="#{HomeManager.top}">"
    - processValidations
    - updateModelValues
    - invokeApplication
    2) render()
    I see the same picture everywhere in the application.
    One solution is to use outputLink instead of commandLink.
    Then jsf does not go into the full lifecycle and would just render Page2.
    But I'm anyway interested to find the way to stop jsf from requesting readonly data, but still pass its lifecycle.
    I supposed that some jsf tags like panelGrid, dataTable or outputText have readonly attribute which will stop jsf from requesting data on applyRequestValues step, but found nothing about such attribute for these elements.
    I imagine I miss some key knowledge about jsf.. Can somebody help?
    Thanks in advance

    I still cannot solve this problem, but I have some more observations:
    1) yes it is a JApplet, and yes, the data streaming is performed in a separate thread.
    2) Wireshark sniffing shows that data sent out by the PHP datasource on the server is sent immediately, and is not buffered (am using ob_start(), ob_flush() and flush() alls in the PHP script).
    3) On Windows Vista, using Internet Explorer or Firefox, there is a constant 30 second delay before the Applet returns from this line: InputStream is = url.openStream();
    4) After this 30 seconds, data appears in the Applet, but it can be seen also with java console debug prints that the data seems to be buffered. The newest data shown in the Applet is not the newest data sent to the client by the PHP datasource script.
    5) On a SUSE Linux client, the Applet works as it should, there is no delay time in showing the data.
    It appears as if there is on Windows a buffering of data which I do not wish to have and which does not occur on Linux. I need to find out how to get the URL openStream() call to return immediately allowing the initial data to be read and shown on the Applet. And I need to remove the buffering of data so that the data can be shown on the Applet when it arrives.
    Can anyone help? Why does this work on Linux but not on Windows, and what can I do, at best within the Java code, to get the Applet to work on Windows as it does on Linux?
    Thanks!
    Steve, Denmark

  • How to add an image - binary data is present in data interface

    Hi,
    we have the requirement that an image (e.g. pie chart) has to be present in a print form. Based on the data, the image always differs. It is not possible to set an URL to get the image so we decided to store the binary data in the data interface.
    Is it possible to map the image control to the data structure?
    How can we store the binary content of an image in the data structure (please think about unicode and non-unicode ERP systems)?
    Do you have any idea?
    Thank you very much.
    Thomas

    Hi Thomas,
                     You need to create an image field and in the source choose 'graphic content ; give the name of the variable which has the binary data . and give the type as 'MIME/image'.

  • How to pass byte array / binary data to a webservice as parameter in osb

    i have a webservice that has a byte array input parameter. i tried to use this WS in a message flow via service-callout. the problem i encountered is the following: since webservice call by using service-callout requires you to use an xml input as part of soap message, i insert both of $body/ctx:binary-content and $body/ctx:binary-content/@ref variables individually into this xml-message to pass binary-data to WS. When i debug the code, i see that it make calls to WS with $body/ctx:binary-content/@ref parameter, but the byte array passed is empty(not NULL)...
    note: i tried java-callut instead of service-called and used $body/ctx:binary-content as input parameter it worked. i think, this is because java-callout doesnt need an xml input and enable to take variables as is...
    can anybody help me to solve the problem with service-callout please?
    here is the input i use to call ws with service-callout method...
    <iso2Xml xmlns="http://www.mycompany.com.tr">
    <request>{$body/ctx:binary-content/@ref}</request>
    </iso2Xml>
    and this is my WS's signature:
    @WebMethod
    public String iso2Xml(byte[] request)

    Hi
    See this thread
    /message/2187817#2187817 [original link is broken]
    Kind Regards
    Mukesh

  • How to make enhanced fields of data source delta enabled?

    Hi ,
    I have a scenario, in which we are using the DS 0CUSTOMER_ATTR to load the master data.There are some fields added to this data source but this fields are not delta enabled. I have tested these fields from R/3 side using BDCP, CDPOS tables. All the fields are writing the changes correctly. But when extracting them using delta they are not capturing.If we load the full,it is capturing all the changes.
    So running full load every week is taking more time.
    Can any one suggest how to make this fileds delta enabled to capture the change in BW side as well to extract only changed records?
    Any help will be greatly appriciated !
    Thanks & Regards,
    Vishnu

    HI,
    It is not possible to load delta this data. Your datasource only detects changes in the customer table and when any customer has been modified the record is loaded to BW. In this moment the datasource fill the append extructure.
    The problem is that if you modifies some record from the append extructure the datasources doesn't detects the changes. When you does a full load you are filling the append extructure for the entire records and it works.
    If you want to catch this deltas you should make a delta datasource for CDPOS but depending on the number of records of the tables it won't be possible.
    You could check if there is any event to detects the modification and create a delta queue datasource for the append extructure.
    Then, you can mix both datasources in a DSO in BW.
    You can look for a " how to create generic datasources which use delta queue"
    I hope it helps

  • How to make firefox render fonts as google-chrome does? (screenshot)

    How do I make firefox render fonts as google chrome does as shown in screenshot? (Chrome below and firefox above)
    Notice for instance the dash "/", "Explore", "Features" etc and the text at the bottom "added git_fixes".
    I'm no expert but is it antialiasing that makes the difference? Cause it seems the font is the same, right?
    .Xresources
    Xft.dpi: 120
    Xft.antialias: true
    Xft.hinting: true
    Xft.hintstyle: hintmedium
    Xft.rgba: rgb
    Xft.lcdfilter: lcdlight
    ~/.config/fontconfig/fonts.conf
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
    <match target="font">
    <edit name="antialias" mode="assign">
    <bool>true</bool>
    </edit>
    <edit name="hinting" mode="assign">
    <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
    <const>hintfull</const>
    </edit>
    <edit name="rgba" mode="assign">
    <const>rgb</const>
    </edit>
    <edit mode="assign" name="lcdfilter">
    <const>lcdlight</const>
    </edit>
    </match>
    </fontconfig>
    I have ttf-win7-fonts installed, and also recently I've installed Infinality (haven't configured it, necessary?).
    Advice appreciated.

    bleach wrote:
    well in firefox you can chose your font and then unclick the let sites chose there own fonts.
    ya looking at your picture I do see the diff. but I do not have that pixelation in my firefox.
    .Xresources has nothing to do with gtk
    I do want to let sites choose their own fonts though.
    When I look closely on my screenshot I wonder if it's even the same font though (the "3" looks very different).
    Perhaps that's where the problem lies.
    If I force firefox to use Arial, it looks good. If I set it to Helvetica which seems to be the font used, it looks like in the screenshot - pixelated.
    $ fc-match helvetica
    helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"
    Seems it doesn't use truetype (helvetica.ttf?) as default font for helvetica - shouldn't it?

  • How to make reports based on Data block work on web?

    I am using form 6i and oracle 9ias
    I have successfully call the common reports from the form on the web using run_report_object, then web.show_documnet(..);
    But when it come to the reports based on the data block from the form, it doesn't work. it always fetch all the records from the table which the data block is based
    Anyone can tell me how to make that work?
    thanks

    I have successfully do this when I am running forms and >reports in localhostTell me how did you achieve this?
    Did you have both Reports and Forms running under same oracle home?
    and off course was it a clinet server architecture?
    What version for Form and Reports did you use?
    Which executables did you use and what was your call from forms? When you call from Forms, which Reports executable use to run the report?
    The data integration can only be achive if both the product were running under same Oracle home and were in client server architecture. I do not think data integration is possible in web architecture.
    Thanks
    Rohit (Orcale Reports Team)

  • How does Labview stores the binary data - The header, where the actual data starts etc.

    I have problem in reading the binary file which is written by labview. I wish to access the data (which is stored in binary format) in Matlab. I am not able to understand - how the data will be streamed in to binary file (the binary file format) when we save the data in to a binary format through Labview program. I am saving my data in binary format and I was not able to access the same data in Matlab.
    I found a couple of articles which discusses about converting Labview to Matlab but What I really wanna know is - How can I access the binary file in Matlab which is actually written in Labview?
    Once I know the format Labview uses to store its binary files, It may be easy for me to read the file in Matlab. I know that Labview stores the binary files in Big Endian format which is
    Base Address+0 Byte3
    Base Address+1 Byte2
    Base Address+2 Byte1
    Base Address+3 Byte0
    But I am really confused about the headers, where the actual data start. Hence I request someone to provide me data about - How Labview stores the Binary Data. Where does the original data start. Below attached is the VI that I am using for writing in to a binary file.
    Attachments:
    Acquire_Binary_LMV.vi ‏242 KB

    Hi Everybody!
    I have attached a VI (Write MAT file.vi - written in LabVIEW 7.1) that takes a waveform and directly converts it to a 2D array where the first column is the timestamps and the second column is the data points. You can then pass this 2D array of scalars directly to the Save Mat.vi. You can then read the .MAT file that is created directly from Matlab.
    For more information on this, you can reference the following document:
    Can I Import Data from MATLAB to LabVIEW or Vice Versa?
    http://digital.ni.com/public.nsf/websearch/2F8ED0F588E06BE1862565A90066E9BA?OpenDocument
    However, I would definitely recommend using the Matlab Script node (All Functions->Analyze->Mathematics->Formula->Matlab Script). In order to use the Matlab Script node, you must have Matlab installed on the same computer. Using the MatlabScript node, you can take data generated or acquired in LabVIEW and save it directly to a .mat (Matlab binary) file using the 'save' command (just like in Matlab). You can see this in example VI entitled MathScriptNode.vi - written in LabVIEW 7.1.
    I hope this helps!
    Travis H.
    LabVIEW R&D
    National Instruments
    Attachments:
    Write MAT file.zip ‏189 KB

  • Question: How to make EDQ Purge Project data after Finishing a Job?

    Hi all
    I know how to purge project data manually by clicking
    but I am wondering if there is a way to make EDQ to Purge project data after Finishing a Job by itself.
    Thank you in advance for all answer.

    Hi,
    In EDQ 9.0, there is no automated purge facility.
    However, note that you can configure a job to write only bare metrics and the data and results data that you are choosing to stage (or indeed to stage no data at all) - and you can set such options up to be variable at runtime using a run profile. It is normally better to consider purging separately from the running of jobs, since any temporary footprint a job has in the results database is cleared up automatically in any case.
    Regards,
    Mike

  • How to make BI Info obj Data element in-herit source DE documntn?

    Say I am in ECC. I go to SE11, give table name MARA and then doubleclick on the dataelement 'MATNR'. Then I click on documentation. I get a popup with Short text " Material Number" and Definition "Alphanumeric key uniquely identifying the material'.
    I am interested in the latter information that is 'Definition' - & in general whatever documentation comes up for data element in ECC.CRM.SCM,SRM.
    Now I log into SAP BI. I find that under characteristic 0Material, the data element is /BI0/oimaterial. When I double-click this datamaterial and press the documentation button, the system says 'No documentation'.
    My Questions:
    1. IS there a switch we could turn on in source ECC/SRM/CRM/SRM so that the data element in SAP BI inherits the original source field data element documentation.
    { I am not too convinced of the argument- that in BI we have info objects in ECC we have fields - since I am talking of data element level information- I would tend to think of this as an oversight of the designers or de-prioritization !!}.
    2. Could we have an ABAP workaround? That is, in BI we identify the tables that house the mapping between the source and destination data elementsa and take out this information. Then we extract the dataelement documentation by function DOCU_GET (from eCC) and use the mapping info above to link SAP BI data element with source data element documentation.
    WHY do I want to punish myself as above? My use case is, we take out SAP BI Table, field, metadata etc and create a model in a modeling tool and physical implementation in a 3rd party DW database as our own canonical, application-agnostic corporate datawarehouse. I would want the source data element documentation to flow to this last system as well as the modeling tool.
    Regards
    Sasanka

    That is, in BI we identify the tables that house the mapping between the source and destination data elementsa and take out this information. Then we extract the dataelement documentation by function DOCU_GET (from eCC) and use the mapping info above to link SAP BI data element with source data element documentation.
    1) SAP don't supply this, I would imagine, because R/3 isn't the only possible source of data.  I'm currently working on an app that extracts from R/3, an Oracle database and APO.  From whence should I take the documentation for my MATERIAL info object?  While being able to transfer the documentation of data elements might be very useful for your app, I can't see that generally it would be of interest to clients - I've certainly never heard of such a requirement.  So, my opinion at least, it isn't a design flaw.
    2) As you've pointed out, you can get the tables that do the mapping, so you know the source data elements, so you can get the documentation.  I'm not sure of how to store the documentation, but the obvious candidate for a link between infoobject and dataelement would be master data of an own infoobject.  You could wrap DOCU_GET in an RFC (if it isn't RFC enabled), and do a direct call between your 3rd party app and r/3 to get the documentation.  For information about the mapping tables, I'd suggest asking that question specifically in one of the BI forums.
    matt

  • Process Chain - How to make decision based on data in PSA and execute DTP

    Need to create process in Process Chain, which will execute the DTP based on data in PSA.
    Say we have two DSO A & B, both getting data from same datasource.
    In process chain, we need to read data in one of the date field in PSA and make a decision, which DTP to get execute in process chain.
    Say if date field contains year = 2000, than load to DSO A, if year is 2001, load data to DSO B.
    Suggest the solution. ...

    Hi,
    Tyr this steps.
    1) Develop ABAP process types
    ABAP report to read PSA data using function module
    Trigger events based on year
                           event1 -> for even year data
                           event2 -> for add year data
    2) Develop local process chains for each DTPs and schdule it with events mentioned above.
    Do reply with comments.

Maybe you are looking for

  • Form & Report on a Webservice

    Hi, When I try to build a Form & Report on a web service(XDB web service), it won't allow me to build it by throwing an error message. The error message is ORA-20001: Unable to create form on table. ORA-20001: Query must begin with SELECT or WITH The

  • Help! My application uses a Single Thread !

    Hi all ! I have a web application which performs some long running tasks. This can be easily simulated with: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {           System.out.pr

  • Unable to read my local library book in my Kobo Aura H2O

    I have downloaded adobe digital editions 4.0 and have authorized my device and my computer with my adobe id.  When I download a book from my local library into adobe digital editions (ADE), I can read the book within ADE, but when I grab the book tit

  • Quicktime ..... does anyone actually use it ?

    Well, I have to use it because a client has requested a copy of a 60 minute short film as a quicktime movie. Now let me begin by saying that I have this as both a divx and a wmv file at full resolution (720x405) and for the most part it looks virtual

  • Bean compilation

    Pls, I'm getting the following error messages when I run my class java:3:cannot find symbol symbol: class Student location: package coreservlets import coreservlets.Student; Now look how I created my class and package. (1)The root to my package is C: