Can I render facelet  to string in memory ?

Hi,
I've been working on porting an existing asp.net web app to a facelets based solution, and there is a particular method which is used quite frequently in the asp.net project. A component, with an ascx extension is loaded dynamically, and rendered to string, which is later either passed via ajax calls or used for decorating a portion of a page.
Is it possible to render facelet composite components like this? Like passing a pojo to a composite control and rendering the output as string?
Kind regards
Seref

Hi Nick,
That's a valid suggestion for the LabVIEW developers (post it using the "feedback" link on ni.com/contact), but I'm afraid that it would invite customers to mess up things by not keeping references in a short leash and closing in the right order when done.
In case you want the closest to this kind of feature, try the Request Deallocation function and place it inside the VI that holds the references. When that VI finishes and returns to the caller, all unused memory will be deallocated.
- Philip Courtois, Thinkbot Solutions

Similar Messages

  • How can i render a dynamic html file in jsp page

    Hi everybody,
    i am trying to render a dynamic html file in jsp page with the result of querying a database.
    The response of the query is a xml document. And i have a stylesheet to transfer it to html.
    How can i render the html in a jsp file?

    I am using below code for HTML files
    private var appFile:String="index.html";
    if (StageWebView.isSupported)
                        currentState = "normal";
                        webView.stage = stage;
                        webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                        var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                        webView.loadURL(fPath);
                        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                    else {
                        currentState = "unsupported";
                        lblSupport.text = "StageWebView feature not supported";
    above code is working fine for me.

  • Loading a large number of strings into memory quickly

    Hello,
    I'm working on an iPhone application where I need to load a large number of strings into memory. Currently I'm simply reading from a file where each string is stored in plain text on a single line. I read the file contents into a string using stringWithContentsOfFile and then I create an NSSet object using NSSet setWithArray:[string componentsSeparatedByString:@"\n"]];
    This works like a charm but takes around 8 seconds to load on the iPhone. I'm looking for ways to speed this up. I've already tried a few things which weren't any faster:
    1) I used [NSKeyedArchiver archiveRootObject:myList toFile:appFile]; to store the NSSet data structure. Then instead of reading the text file storage. I read this file using [NSKeyedUnarchiver unarchiveObjectWithFile:appFile]; This was actually very slow and created a strings file that was about 2x the size of the original plain text.
    2) Instead of using an NSSet, I used and NSDictionary and used writeToFile and dictionaryWithContentsOfFile. This was also no faster.
    3) Finally I tried using the NSDictionary to write to a binary file format using NSPropertyListSerialization. This was also not any faster.
    I've been thinking about using SQLite instead of the flat file read, but I haven't had a chance to prototype that out to see if it would be faster. It's important that I can do fast searches for specific strings, which is why I originally used a set.
    Does any one else have any ideas how to load this into memory faster? If all else fails, I'm simply going to load the strings into memory using a separate thread on application launch so I don't prevent the user from getting to the main menu for 8 seconds.
    Thanks,
    -Keith

    I'd need to know more about what you're doing, but from what you're describing I think you should try to change your algorithm.
    For example: Instead of distributing one flat file, split your list of strings into 256 files, based on the first two hex digits of their MD5 hashes*. (Two digits might not be enough--you might need three or four. You may also want to use folders, especially if you need more than two digits.) When testing if a string exists, first calculate its MD5 hash and extract the necessary number of digits, then load that file into memory and scan its list. (You can cache these lists in memory so that you only have to load each file once--just make sure that a didReceiveMemoryWarning message will empty those caches.)
    Properly configured, SQLite may be faster than the eight second load time you talk about, especially if you ensure it indexes the column you store the strings in. But it's probably overkill for this application.
    \* A hash is a numeric code calculated from a string; on average, changing a single bit anywhere in the string should change half the bits in the hash, so even very similar strings should generate very different hashes. I suggest using MD5 instead of -\[NSString hash\] because the hash method is not guaranteed to return the same results on Mac OS and iPhone OS, or on different releases of either OS. You could also use a different algorithm, like a CRC; these are faster but I'm not as familiar with them. This thread discusses calculating MD5 hashes on iPhone OS: http://discussions.apple.com/thread.jspa?messageID=7362074
    Message was edited by: Brent Royal-Gordon

  • How can I render an active link (yrl) within a UIX/XML page

    How can I render an active link (url) within a UIX/XML page.
    How can I get <jbo:ShowValue> to work in UIX/XML, or is there another way?
    Bill G...

    It may seem strange, but the <contents> of <rawText> aren't actually
    raw - it's only the "text" attribute that's raw. (It seems strange because
    it is. Ah well.) This is different from UIX JSP.
    So, try something like the following:
    <bc4j:attrScope name="Notes">
    <contents>
    <rawText text="&lt;a href=&quot;"/>
    <rawText>
    <boundAttribute name="text">
    <bc4j:attrProperty name="value"/>
    </boundAttribute>
    </rawText text="&quot;&gt;"/>
    Some text in the link.
    <rawText text="&lt;/a&gt;"/>
    </contents>
    <bc4j:attrScope>
    Thankfully, this will be much simpler in 9.0.3, when the following
    will work:
    <link text="Whatever you want">
    <boundAttribute name="destination">
    <bc4j:attrValue name="Notes"/>
    </boundAttribute>
    </link>

  • Can we change data in string object.

    Can we change data in string object.

    Saw this hack to access the char[]'s in a String in another thread. Beware that the effects of doing this is possible errors, like incorrect hashCode etc.
    import java.lang.reflect.*;
    public class SharedString {
            public static Constructor stringWrap = null;
            public static String wrap(char[] value, int offset, int length) {
                    try {
                            if (stringWrap == null) {
                                    stringWrap = String.class.getDeclaredConstructor(new Class[] { Integer.TYPE, Integer.TYPE, char[].class });
                                    stringWrap.setAccessible(true);
                            return (String)stringWrap.newInstance(new Object[] { new Integer(offset), new Integer(length), value });
                    catch (java.lang.NoSuchMethodException e) {
                            System.err.println ("NoMethod exception caught: " + e);
                    catch (java.lang.IllegalAccessException e) {
                            System.err.println ("Access exception caught: " + e);
                    catch (java.lang.InstantiationException e) {
                            System.err.println ("Instantiation exception caught: " + e);
                    catch (java.lang.reflect.InvocationTargetException e) {
                            System.err.println ("Invocation exception caught: " + e);
                    return null;
            public static void main(String[] args) {
                    char[] chars = new char[] { 'l', 'e', 'v', 'i', '_', 'h' };
                    String test = SharedString.wrap(chars, 0, chars.length);
                    System.out.println("String test = " + test);
                    chars[0] = 'k';
                    chars[1] = 'a';
                    chars[2] = 'l';
                    chars[3] = 'l';
                    chars[4] = 'a';
                    chars[5] = 'n';
                    System.out.println("String test = " + test);
    } Gil

  • Ive deleted contacts from my contacts list but they still pop up when i go to text and type in the name of a current contact. .  How can i delete them off my phones memory for good?

    Ive deleted contacts from my contacts list but they still pop up when i go to text and type in the name of a current contact. .  How can i delete them off my phones memory for good? iPhone 4S

    At the present time, the only way to clear that is to restore the phone as new.  Perhaps a future iOS update will give us the option to clear that cache.

  • I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    I have two iphones, different telcos, i am using the same apple id for both - how can i use the 10GB icloud free memory of my new iphone 5?

    Thank you KiltedTim!
    YES, that is the free 5GB icloud memory for each apple ID. Can I not add the free 5Gb of my second Iphone to my original apple ID (5GB also) as I want to use one Apple ID name on both 2 Iphones? Is it necessary to have a different apple ID for the second Iphone to avail the free 5GB it carries with it?

  • How Can I replace newScale Text Strings with Custom Values?

    How Can I replace newScale Text Strings with Custom Values?
    How can I replace newScale text strings with custom values?
    All  newScale text is customizable. Follow the procedure below to change the  value of any text string that appears in RequestCenter online pages.
    Procedure
    1. Find out the String ID of the text string you would like to overwrite by turning on the String ID display:
    a) Navigate to the RequestCenter.ear/config directory.
    b) Open the newscale.properties file and add the following name-value pair at the end of the file:res.format=2
    c) Save the file.
    d) Repeat steps b and c for the RmiConfig.prop and RequestCenter.prop files.
    e) Stop and restart the RequestCenter service.
    f) Log  in to RequestCenter and browse to the page that has the text you want  to overwrite. In front of the text you will now see the String ID.
    g) Note down the String ID's you want to change.
    2. Navigate to the directory: /RequestCenter.ear/RequestCenter.war/WEB-INF/classes/com/newscale/bfw.
    3. Create the following sub-directory: res/resources
    4. Create the following empty text files in the directory you just created:
    RequestCenter_0.properties
    RequestCenter_1.properties
    RequestCenter_2.properties
    RequestCenter_3.properties
    RequestCenter_4.properties
    RequestCenter_5.properties
    RequestCenter_6.properties
    RequestCenter_7.properties
    5. Add the custom text strings to the appropriate  RequestCenter_<Number>.properties file in the following manner  (name-value pair) StringID=YourCustomTextString
    Example: The StringID for "Available Work" in ServiceManager is 699.
    If you wanted to change "Available Work" to "General Inbox", you  would add the following line to the RequestCenter_0.properties file
         699=General Inbox
    Strings are divided into the following files, based on their numeric ID:
    Strings are divided into the following files, based on their numeric ID:
    String ID  File Name
    0 to 999 -> RequestCenter_0.properties
    1000 to 1999 -> RequestCenter_1.properties
    2000 to 2999 -> RequestCenter_2.properties
    3000 to 3999 -> RequestCenter_3.properties
    4000 to 4999 -> RequestCenter_4.properties
    5000 to 5999 -> RequestCenter_5.properties
    6000 to 6999 -> RequestCenter_6.properties
    7000 to 7999 -> RequestCenter_7.properties
    6. Turn off the String ID display by removing (or commenting out) the line "res.format=2" from the newscale.properties, RequestCenter.prop and RmiConfig.prop files
    7. Restart RequestCenter.
    Your customized text should be displayed.

    I've recently come across this information and it was very helpful in changing some of the inline text.
    However, one place that seemed out of reach with this method was the three main buttons on an "Order" page.  Specifically the "Add & Review Order" button was confusing some of our users.
    Through the use of JavaScript we were able to modify the label of this button.  We placed JS in the footer.html file that changes the value of the butt

  • Can Lightroom render 1:1 Previews when importing my Photos?

    Q: Can Lightroom render 1:1 Previews when importing my Photos?
    FAQ revised 25 April 2009
    Ans: Prior to version 1.3 Lightroom did not support 1:1 preview rendering during import, the actual options for  Initial Previews being:  Embedded or  Standard. However, more recent versions allow four types of previews to be rendered during import (i.e.  Minimal, Embedded & Sidecar, Standard,and  1:1). It's also worth noting the following on Lightroom import behaviour: 
    1.  Minimal (Lightroom default) or Embedded & Sidecar is by far the quickest method for getting your photos into the Lightroom catalog. However, the lack of Standard, which is the minimum that Lightroom can actually work with, means that the application will render standard-sized on demand (i.e. as thumbs/photos become visible within the photo Content area). Asking Lightroom to undertake this task at the same time as you're trying to use the application will result in sub optimal performance. 
    2. Importing your photos with the  Standard preview selected within the Import dialog will take longer than 1 above, but on completion Lightroom will already have previews that match the minimum requirement for working in the Library. Assuming that you won't be looking at every image at 100% (i.e 1:1) then this preview size will allow you to quickly review, rate, label, even make quick colour/tone adjustments, etc the photos within the Library module. If you need to see a photo at 100% then Lightroom will render that preview on demand (while it's being rendered you'll see the "Rendering Preview" overlay appear at bottom of preview).  Note that when using a 23" or larger monitor it to is best to set the Standard sized previews so that they are rendered at 2048 pixels
    3. Importing your photos with the  1:1 preview size selected will result in Lightroom taking even longer to complete the import process than would have been the case if standard-sized had been chosen. 1:1 previews also take up significantly more disk space than standard-sized.
    If you're not going to be working on the photos immediately after import but do need to get them into Lightroom as quickly as possible, then the best option would be to choose import option 1. Once the photos have been imported choose either  Render Standard-sized Previews or  Render 1:1 previews from Library module Library>Previews menu.

    When I search these forums for "CFCopyFormattingDescription", I find a bunch of crash reports posted that look almost exactly the same as mine.  It appears there's a bug in iPhoto, perhaps when reading metadata from the JPG file (readRawTiffPropsFromPath).
    Interestingly, the Preview app can open and display the file just fine.  I even opened the inspector and it showed all of the TIFF and exif metadata just fine, no crash.  The file also opens just fine on Windows.
    Now how do we get the attention of the iPhoto development team so I can send them the photos, have them reproduce the crash, and fix it?

  • Can't change the connection string of SSIS package with derived columns?

    We upgraded SQL server 2008 to 2012, copied and converted all SSIS packages from Visual Studio 2008 to 2010.  When I opened a package in VS 2010 and tried to change the connection string, in the local connection managers, if the data source is another
    SSIS package B(.dtsx file) with derived columns, I can't change the connection string of package B. When I opened the file connection manager editor for package B and tried to locate a dtsx file in another location, saved the change, reopened the project.
    Package B still pointed to previous file.  Other packages without derived columns work fine. Any thoughts?

    We are using the package deployment model and refer to other packages in the same project. If
    we changed the path of package B (with derived columns) to "D:\Visual Studio 2010\xxxx", and refer it in package A, in the A's connection manager, the connection string of package B is still its previous location  "D:\Visual
    Studio 2008\xxxx". When we ran the package A in the SQL server agent, the data source is still
     "D:\Visual
    Studio 2008\xxxx", so how can I change it to "D:\Visual
    Studio 2010\xxxx"? Why has the package C (without derived columns) no such problem? thanks.

  • How can I display on a string the symbol omega (ohms)

    how can I display on a string the symbol omega (ohms)

    Hi,
    See there : http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000032410000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    Hope this helps !
    Julien

  • Adobe Media Encoder can´t render out AE Ray-Trace Composition

    Hey,
    AME can´t render out my composition (or sequence if i include the comp in a PP sequence) which includes some 3D stuff.
    I am able to render it out in AE in a few minutes, preview it easily in AE and even in PP but i´m not able to render it out in AME or PP.
    AME says it would take like 10+ Hours to render it and doesn´t come to an end.
    I tried multiple encoding settings but nothing worked.
    Also i checked, that cuda rendering is enabled in all my Adobe programs, but nothing helped...
    AE File .aep :
    Dropbox - Twitch Infovideo.aep
    AME .epr Preset for encoding :
    Dropbox - Media Encoder Error Test.epr
    Thanks for helping,
    Johannes

    It raises another question: what settings do I need to encode the comp in 720p resolution without taking up lots of space?
    Well, it depends on whether you need a production master (something for broadcast, for example, or to use as a source for other encoding tasks) or if you want a version for distribution. If it's the former, there's nothing wrong with "lots of space" - A Quicktime file with PNG or Animation codec is a good idea, but it will take a lot of space. If it's the latter, H264 is perfect but there's no built-in preset to take 720 material to the web.
    You could do this:
    * Pick the generic H264 template. You'll see that it will give an error if you attempt to render, because the default setting uses an H264 profile/level which doesn't let you use HD resolutions.
    * In the H264 video options, set the "Profile" menu to "Main" and "Level" to 4.0. That will keep it compatible to Quicktime and Flash player, while allowing larger frame sizes and higher bit rates.
    * Set Target Bitrate to 5-8 Mbps and Maximum Bitrate to 9-10 Mbps if you're targetting web delivery. That's a bit over what Apple uses for 720p content on the Apple TV, for example.
    The H264 original preset will instruct you in the comment field to stretch to 640x480 in Output Module. There's no need, since you are using a profile/level combination which allows higher frame sizes.

  • Can we get Arraylist from String.Please check the code

    Hi all,
    I have just pasted my code over here.Can anyone of you find the solution for obtaining the Array list from the String.
    For Example :
    ArrayList al = new ArrayList();
    al.add(new byte[2]);
    al.add("2");
    String stringVar = "" + (ArrayList) al;
    Here I can convert the arraylist into string.But can we do he vice versa like obtaining the above arraylist from the string?If please advice me.
    URGENT!!!!

    cudIf you run the code you posted you will observe that the string form of the list does not contain all the information of the list: in particular the array elements are missing. It follows that the "vice versa" conversion you seek is simply not possible.
    A variation on this theme is the following:import java.util.ArrayList;
    public class ListEg {
        public static void main(String[] args) {
            ArrayList al = new ArrayList();
            al.add("foo");
            al.add("bar, baz");
            String stringVar = "" + (ArrayList) al;     
            System.out.println(stringVar);
    }If you think about the output you should be able to conclude that lists with different contents can easily have the same string form.
    Just something to chew on.

  • Can't free up enough startup disk memory

    Hi,
    "Your Mac OS X startup disk has no more space available for application memory."
    I am trying to free up space to stop this message from popping up on my screen. I've emptied my trash, but the problem isn't gone.
    I have a iMac with OS X 10.6.8, with 4GB of Memory.
    My local disk capacity is 499.76 GB and i am only using 179.07GB.
    I am unsure how to remove temporary files, even though i am clearing temp files from my browser's history.
    I don't know which program can be reliable and safe to remove the temp files for me
    I'll appreciate if someone can help.

    Reboot to clear out virtual memory.
    Your problem is excessive swapping of data between physical memory and virtual memory.
    That can happen for two reasons:
    You have a long-running process with a memory leak (i.e., a bug), or
    You don't have enough memory installed for your usage pattern.
    Tracking down a memory leak can be difficult, and it may come down to a process of elimination. In Activity Monitor, select All Processes from the menu in the toolbar, if not already selected. Click the heading of the  Real Mem column in the process table twice to sort the table with the highest value at the top. If you don't see that column, select
    View ▹ Columns ▹ Real Memory
    from the menu bar.
    If one process (excluding "kernel_task") is using much more memory than all the others, that could be an indication of a leak. A better indication would be a process that continually grabs more and more memory over time without ever releasing it.
    If you don't have an obvious memory leak, your options are to install more memory (if possible) or to run fewer programs simultaneously.
    The next suggestion is only for users familiar with the shell. For a more precise, but potentially misleading, test, run the following command: 
    sudo leaks -nocontext -nostacks process | grep total
    where process is the name of a process you suspect of leaking memory. Almost every process will leak some memory; the question is how much, and especially how much the leak increases with time. I can’t be more specific. See the leaks(1) man page and the Apple developer documentation for details:
    Memory Usage Performance Guidelines: About the Virtual Memory System

  • I'm getting an error Out of memory message when I try to render - There's lots of memory

    I'm getting an error Out of memory message when I try to render - there's lots of memory and I've never gotten this before - any ideas?

    Thanks - I did go through and change all the profiles to Apple RGB, there are several to choose - but I'm still having problems - I think it has to do with corrupt  images - Im backing up and starting over - I've worked with images large and small for years and never had this problem - thanks

Maybe you are looking for

  • CK11N update

    Hi guyes, We have uploaded the data while go-live with some cost element for batch costing i.e. Labour, power, Fuel cost per kg. Now we want to change this cost, pl guide me on the procedure to follow or will it be automatically get updated by some p

  • Problem with 100% height

    I'm having a problem trying to get the LEFT and RIGHT DIV tags to drop down 100% along with the CENTER DIV tag. I don't want to use javascript. In all browser, except IE6, the DIV tags will fill 100% of the document window, but will not extend down w

  • Can I Make a Leopard Boot disk with my Free Agent Desk 1.5TB External Hard Drive?

    Can I Make a Leopard Boot disk with my Free Agent Desk 1.5TB External Hard Drive?  Using my Power Mac G5 Dual 2.0Gig original computer?

  • Delete Overlappring Requests in Infocube functionality manually

    Hello Friends, I have used the process "Delete Overlappring Requests in Infocube" in Process chain. Now i have to use same fuctionality manually without using process chain. How can i do this..? Thanks Tony

  • Opening a form and stopping a video

    I have a button on a page with a video running.  i want the button to open an html form I have already set up and i want the video to stop playing.  i tried this code and it achieves  neither objective. thanks for any ideas, Gregg my code on the butt