Rendered/required

hi, im kinda new in jsf, i have a doubt, i have an input text wich required=true and rendered have a changing backing bean value
if rendered=false the required validation still occur?

No, if rendered is false the validation will not take place. Keep in mind that the value of rendered matters on the previous request during the Render Response phase and the on the current request in the Validation phase. It is possible that the values will differ.

Similar Messages

  • Sick of "Rendering Required Files" to Play. Want 1x scrub.

    Multi-cam project. Very large.
    I can get some work done when I focus on a single sequence, and keep working at it.
    But bouncing between sequences results in "Rendering Required Files" and multi-hour delays to be able to hit play.
    Scrubbing works well enough... audio skips a bit but I can easily make out what is being said.
    How can I treat scrubbing as Play? A 1x scrub button? Can a macro be set up if it doesn't already exist?
    I hit spacebar when walking away from computer, and hopefully enjoy pre-rendered audio next work session. But I need a way to work without waiting for an audio render to complete. I move between sequences all the time, and currently am not seeing a productive workflow.
    Could someone explain how I can use scrub in a more user-friendly fashion, without it being so dependent on my current zoom level?
    Thanks, -g

    I've already submitted one (Jan 18 never heard back). I was hoping there was a work-around someone knew about.
    Here's my request copy/paste.
    Title:
    Immediate ability to edit multi-camera scene without need to pre-process audio.
    How:
    To play a scene that I'm working on, often it is necessary to pre-render audio. If the scene consists of multi-camera & multi-audio source with many cameras, this can take hours (on IMHO decent hardware).
    But, if I simply want to scrub the timeline, Premiere is capable of emitting audio indicating how the timeline sounds at that moment.
    I need some IMMEDIATE ability between the two... it need not sound any better than scrubbing... maybe the audio drops out or just doesn't sound quite right. But I need the ability to scrub/play at 1x speed without waiting hours for pre-render of audio.
    Maybe pre-render can be temporarily disabled. Maybe it is a new type of "play". Maybe it is a scrub locked to 1x speed.
    Why:
    My project consists of ~50 lectures. Each lecture is multi-cam coverage with additional audio channels. To edit any individual lecture this is (barely) passable, so long as I'm not flipping between lectures which often requires a re-render of the pre-rendered audio.
    But all these lectures are now to be used in a single timeline. I'd like to copy moments from individual lectures, but I can't review any edited lectures without re-rendering that audio. Even just to identify a snipped of audio... scrubbing is to hard to control speed to make the audio intelligible. Play almost always triggers audio pre-render taking ~1h.
    So to skip thru various lectures looking for key moments is impractical.
    As a work-around I'm using rendered MP4 and importing that, just so I can brainstorm final project easier. But I should really be able to easily pull from my edited lecture timelines, and so have access to multiple audio channels and camera angles right now. I only import rendered MP4 because I can't wait an hour just to identify and copy a 5s moment of audio.

  • CS6 Multicam "Rendering Required Files"

    Did a quick search for "rendering required files" and came up with a number of threads from early-mid 2011 regarding CS5 and 5.5 difficulty with PrPro stopping to render audio files when doing multicam edits. I never experienced that until CS6, and now it's happening frequently on a rather basic multicam edit (one HDV, one XDCam-EX, and one AVCHD, with an extra audio track).
    From what I've seen in previous threads, there never was a clear solution to the issue. Anybody shed any more light on it, now a year later with a new version of the software?
    Would I be better off to do a mix down of my four audio tracks before doing the multicam, and then nest that on track one and get rid of my other three original tracks?
    I'm running an i7-920 OC to 2.8GHz on an Asus P6T6 WS Revo with 24 GB of memory, an SSD OS/Programs, a three-disk RAID-5 Project files, a four-disk RAID-5 Data files, and a standalone 6GB/s SATA for scratch and previews, with a GTX-580 for two monitors and CUDA and a GTX-285 for preview/multicam monitor.

    This took me forever to figure out, but I think I have your answer.  When you play back multicam in premiere, it tries to mix all of the audio from your original sequence.  Even though all you hear is the audio from track 1 (at least this was the behavior in previous versions). 
    My fix for this was to delete all all of the audio clips (besides track 1) in the original nested sequence.  Since I use external audio, I just use the camera audio for syncing purposes anyway.  But that's pretty much what you'll want to do.  Mix down whatever audio you plan on actually using for your project and put that in the sequence with your multicam clip.  Or if you prefer, put it on track 1 of your nested sequence. 
    Also, you'll want to unlink the audio and video from your multicam clip, and delete any cuts you've made to the audio.  For some reason, edits to the audio clip also cause the "rendering required files" error.  So just delete all of the many audio "clips" you've made throughout the process of editiing your video, saving just one to drag out to the end of your video.  This way you'll only have one long audio clip spanning the entire length of your video.  Bam.  No more rendering required files.

  • Rendering Required Files CS5

    This is driving me nuts... I have the read the other posts bit cannot fix it. I have a multicam sequence completely built with music, graphic, etc... for whatever reason, today, I am getting this pop up "Rendering Required Files" every time I hit space bar. I am using Windows 7, 2.8Ghz.
    The mutlicam sequence was made up of two cameras and one channel of audio. I first synced them up (two video tracks and one audio track), then put in another sequence for multicam editing. After everything was switched back n forth between cameras, I added all my graphic elements, transitions, credits, etc.. I am almost finished with the edit, but now I get this pop up constantly.... Argh. I cannot go back but am I hoping someone can instruct me on what to do to get rid of this pop up...Thanks!

    I think you should wait for a bit when the "Rendering Required Files" pops up, it might just be doing what it says.

  • "Rendering Required Files" - huh?

    I'm editing a sequence with a couple of nested sequences and a multicamera edit.  Suddenly I'm encountering huge delays when PP RANDOMLY decides it needs to do some rendering. I (seemingly at random) get the message "Rendering Required Files" and then I have to wait for minutes to do anything!
    • There are no compilicated effects in any of the sequences.
    • There are only a few tracks in the master sequence, and only one or two tracks of audio and/or video in the prior sequences.
    • I have a dual quad core MacPro with 16GB of RAM.
    • I have 4x1TB hard drives.
    I can not for the life of me understand why it needs to render anything.  I get the feeling this has to do with audio, but I can not pin this down.  Can anybody explain what the heck the program is rendering so I can figure out a workaround?????

    Not that I'm too much into the "me too" kind of reply, but I just wanted to add my data into this thread in hope for an eventual fix.
    I'm using the PC version (CS5.5) with all the latest updates, on an Intel i7 (4 cores +HT), 24 GB RAM, 2 nVidia GTX470 (sli), a SolidState drive for OS and Apps, and 4x 2TB disks in RAID10 configuration for my data. I think the PC's performance should be more than adequate.
    My projet seems similar to what other users have been describing. I have a first sequence on which I have laid 2 video tracks and 2 additional audio tracks. No video effect has been applied. As for audio effect, I have applied EQ and Dynamics on 2 of the tracks (not on the clips themselves). Ultimately, I ended up muting 3 of the audio tracks. Therefore, only 1 audio track ends up in my mix. The audio clip is an uncompressed mono WAV file which was generated by Audition (44.1kHz, 16bits).
    On a second sequence, I laid the the video and audio parts of Sequence1 as two seperate clips, so they are completely unlinked. I have set the video clip to MULTI CAM. The audio clip having been laid on the sequence seperately is not influenced at by any of my video edits and camera changes. I have used this approach after reading other users' input on this thread.
    When the dreaded "Rendering Required Files..." poped up, I did a couple of UNDO/REDO in order to pin point the exact operation after which the problem occurs. It happened right after I used the Razor Tool to cut my audio clip. At this point, I haven't move my clips' begin and end points. I only applied a cut somewhere in the middle of the audio clip and left it untouch. I can undo that cut and the problem dissapears. But as soon as I cut my clip again, I can no longer play my Sequence #2 without the "Rendering Required Files..." window poping up. I have several hours of video to edit. This happened at 35 minute into the sequence. I can't afford the time to wait for all the rendering to take place, only to end up in the same position where the application will not remember the render it just did.
    Interestingly, I can play Sequence #1 with no problem. On Sequence #2, the problem persits even if I mute (click the speaker and eye icons) all audio and video tracks. I tried selecting a limited work area, even a blank are with no audio nor video, and I still have the problem when I hit the enter (preview) key.
    Also, there's a yellow line on top of my timeline (both sequences) meaning Premiere should attempt to render the sequence on the fly.

  • Rendering Required Fields - Why?

    A recent development I hadn't noticed before. As I'm editing and I try to play the timeline, it often stops and says Rendering Required Fields. How can I stop that from happening?

    >how to I fix it?
    My question would be... why do you think something is broken?
    If the software needs to render in this instance, my thought would be that the audio simply must be rendered because of what you are doing

  • Rendering Requirements - CS2

    Hello:
    I think I am over-rendering here but not sure. Using Premier Pro 2.0
    I have a stack of 3 video tracks. Each track is source footage of the same event from 3 cameras, 3 different angle. If I apply a Color correction to say track 2, of course I get the red line and have to render it. And if I apply a slightly different color correction to track 3, I get the red line and render that. These 3 tracks are being prepared to be nested into one for Multi-Cam. Each time I turn on or off the "eye" icon on the video tracks, I keep getting the red line over and over again which is telling me to re-render. For example I started with all "eye" icons on and add an effect to track 3. I render. I turn off its eye. I then apply an effect to track 2. Red line - render. Then I turn off its eye. And the only "eye" on is track one and it wants me to render that. So I do. Then I turn back on the "eye" on video track 2, and it wants me render again! Then I turn back on the "eye" on track 3 and it wants me to render again... but I have already rendered tracks 3 and 2 on the way down (turning the eyes off) and now it wants me to render them each again on the way up (turning the "eyes" back on). All I want to do is make sure that when I nest the sequence into a new one for multi-cam, that all the prior required rendering is done. But it seems to be a never-ending process if I turn the "eyes" on or off on the mother sequence.
    Can somebody help straighten me out?
    Thanks,
    Dave

    If you want to go back to a previous render, then simply undo until you get there. The eyes arent intelligent enough to know if something has already been rendered on that track.
    Rendering will never be done. Edit your sequence, then apply color corrrection to the parent clips afterwards, and you wont have to deal with trying to edit with effects on your clips. Alternatively, if you must have color correction applied beforehand, then just do that, create and intermediate CC'd version, and edit with those. Also, if you have production suite, you can use dynamic link to CC in AE and edit in PP, though i believe there is still some transparent rendering involved here.

  • Rendering Required Files pins single CPU core

    A feature request has been submitted. I'm posting to forum so to show screen-cap of unbalanced CPU load. With CC 7.1.0 it can sit like this for an hour. Better than CS6, it used to take a full day.
    Happens when switching to a not-recently-played sequence. Please parallelize it to use multiple cores, so I don't have to wait as long.
    This is important because it is still one of the biggest bottlenecks. I have a very fast system. 64GB RAM. Lots of cache space on drives. I can't throw money at this problem, only Adobe can solve it.
    Am posting this right now becuase... I'm waiting on PPro. Guess it is the best use of my time?

    PPro preforms really well for me (generally). This is the moment when PPro is presumeably rendering audio? Next time it comes up I'll just try copying the sequence and deleting all the video content from the sequence leaving audio.
    I don't think it is an effect. Just something to do with having audio ready to play when I hit spacebar. But I'll confirm this by purging the video component.

  • FCP Rendering requirement

    My final product is a DVD and the workflow is:
    FCP for editing
    FCP export to Quicktime (Not self contained movie)
    DVD SP for compression and DVD format
    Will the rendered timeline settings in FCP have any impact on the quality of the movie file that gets compressed in DVD SP?

    Will the rendered timeline settings in FCP have any impact on the quality of the movie file that gets compressed in DVD SP?
    Certainly.
    The better the quality of video in FCP, the better in DVD SP.
    Use NTSC DV versus DVCPROHD100, and there will be a marked difference.
    I do believe you should encode video and audio before going into DVD SP
    Then use the m2v and ac3 files rather than uncompressed aiff files.

  • FCP 5 RT sequences now have to be rendered in FCP 6?

    Hi:
    We upgraded from Final Cut Studio 1 to FCS 2 a week ago to upgrade Final Cut Pro to 6.0.4 to be able to read XDCAM EX clips a client sent us. That all worked fine.
    But I'm encountering problems when I open older projects and sequences. Our main focus is motion graphics, which we create in After Effects, and we often render to the Animation codec for best quality. After rendering a composition we'll often go back and tweak something, then render out just those few seconds and edit the revision into the overall animation in FCP. This always worked fine in FCP 5.0 and earlier. I'd make a sequence with the same settings as the rendered Quicktimes (usually 720x480, D1 pixels, field dominance-none, Animation codec) and drop those into the sequence with no problems.
    Today, however, I opened up a project and a Sequence I'd created using the Animation codec, and it showed a solid red bar for the whole 7 minute animation (except for two tiny slivers of blue at the fade up and fade out.) The canvas says Unrendered when I try to play it. This same sequence played fine in FCP 5 ten days ago.
    I'm not attempting to print this to tape or anything. I just want to edit the pieces together to view the whole animation realtime and output a complete Quicktime for compressing to a DVD or whatever.
    As a test I made a new sequence from scratch (720x480, D1 pixels, field dominance-none, Animation codec) and dropped a clip (720x480, D1 pixels, field dominance-none, Animation codec) into it and got the same result; the clip had to be rendered. I then went ahead and rendered the clip. I opened the resulting clip from the Render folder in Quicktime player, and it identified the clip as 720x480, Apple Animation Codec. So FCP compressed the clip to the same size and format it already was.
    Older sequences using the Photo JPEG codec behave as normal; the sequence plays real time with no rendering required.
    Was there some change in FCP 6 that prevents me from playing these Animation codec Quicktimes realtime? I'm not going to be happy if a bunch of old sequences suddenly become unplayable.
    Thanks.
    Shawn Marshall
    Marshall Arts Motion Graphics

    Well, that is weird, but I don't seem to have that problem. I made a new sequence in FCP 6.0.4 with the above settings, added NTSC bars and exported a self-contained movie. I brought that QT back into FCP and added it back to the timeline from which it was generated, and it doesn't require rendering for playback, displaying a dark grey bar.
    As I said, my main problem seems to be opening FCP 5 projects in FCP 6, though there are some minor problems with sequences created from scratch in FCP 6. In FCP 6 I reassembled the simple edit I'd done in FCP 5 and added fades at the beginning and end, which had to be rendered; the rest of the sequence showed the dark grey bar. When I scrub the timeline it scrubs very smoothly except at the beginning and end where those rendered fades are. And then, even though those fades have been rendered, when my playback gets to that fadeout it stops and gives the "One or more frames were dropped during playback" error message. I've tried the renders on two different drives, both of which are plenty fast to handle the 20-30 MB/sec data rate.
    Annoying.
    Is it safe to upgrade to FCP 6.0.5?
    Shawn Marshall
    Marshall Arts Motion Graphics

  • Why does some video need to be rendered in FCE 4 before I can work on it?

    I've been trying to get a handle on FCE 4 because it's very different than iMovie '08. I have a bunch of content in iMovie that I'd like to mess with in FCE 4, so I exported from iMovie as FCE XML and imported in FCE. There is some video that I re-encoded to Quicktime from ASF and it seems to need to be rendered before it will show up in the Canvas in FCE 4. FCE shows this content as DV/DVCPRO - NTSC under "Compressor" in the browser. Other stuff that was taken off my Sony HDR-SR7 is available in FCE 4 without any problems. This shows up as Apple Intermediate Coded in the browser.
    What's the deal with rendering anyway? Why does FCE need to "render" video to add things like effects when iMovie can add effects, etc at will with no "rendering" required?

    FCE can do certain effects on the fly without rendering. Some more elaborate transitions, like 3D wipes, require too much processor time to do them in real time. My understanding is that Macs with greater on-board processing power do more of these effects in real time, while slower machines must render.
    iMovie can do these effects on the fly because it's working with far less information. Think of iMovie works in the DV format while FCE works in the DV/DVCPRO-NTSC format. It's too subtle a name difference but the reality is quite different. It's like editing still pictures in compressed, lossy JPEG format vs. uncompressed TIFF format. Think about how long it takes your computer to open a photo of say, 8x10" 300 dpi in TIFF vs. that same file in JPEG. Well, that's what FCE has to do. It's working in the video equivalent of TIFF -- 30 frames per second. So there's a greater demand on your processor by a factor of 10. You can see this in action in Quicktime. Save a raw video import 720x480 in .dv and then in DV/DVCPRO-NTSC format and then play it back. The .dv will probably play smoothly while the DV/DVCPRO-NTSC (.mov) will hang up on play-back. It's just too much for your process to display all of those full resolution images so rapidly. And if you look at the two images side-by-side (particularly titles) you'll see how sharp and clear the .mov file is compared to the compressed .dv file.
    Hope this helps.

  • When to use Drop In Item renderer and InLine Item Renderers ??

    Hi ,
    I am getting confused in where to use Inline ItemRenderer and DropIn Item Renderer .
    What i feel is that DROP in Item Renderer are easy to use , and those can satisfy any requirements .
    What i read from tutorilas that we cant use Drop In because they say ,  The only drawback to using  drop in is that them is that you cannot configure them
    Please help me .

    Hi Kiran,
    Here is the detailed explanation you needed:
    You can also refer the link below:
    http://blog.flexdevelopers.com/2009/02/flex-basics-item-renderers.html
    Drop-In Item Renderers
    Drop-In Item Renderers are generic in nature and don't rely on specific data fields to render data. This allows them to be used with a wide range of data sets, hence, the term “drop-in”. Drop-In Item Renderers can be “dropped-in” to any list-based control regardless of the dataprovider’s data properties.
    In our previous example, the employee photo property requires use of a custom Item Renderer to render properly in the UI. In this scenario the Image component satisfies our rendering needs out of the box. Implemented as a Drop-In Item Renderer, the Image component takes any data property regardless of name and uses it as the Image component's source property value. Assuming our employee photo property contains a valid image path, the Image Drop-In Item Renderer will work perfectly and resolve the image path as an image in the UI.
    <!-- Drop-in Item Renderer: Image control -->
    <mx:DataGridColumn dataField="photo"
                       headerText="Employee Photo"
                       itemRenderer="mx.controls.Image"/>
    Drop-In Item Renderers are simple and easy to use and satisfy specific use cases nicely. However, they provide no flexibility whatsoever. If your needs are not satisfied by a Drop-In Item Renderer, you must create your own Item Renderer as an inline component or an external component.
    Inline Item Renderers
    Generally used for simple item rendering requiring minimal customization, inline Item Renderers are defined as a component nested within the MXML of your list-based control.
    It is important to note that Item Renderers nested within the itemrender property of a list-based control occupy a different scope than the list-based control. Any attempt to reference members (properties or methods) of the parent component from the nested Item Renderer component will result in a compile-time error. However, references to the members of the parent component can be achieved by utilizing the outerDocument object.
    <mx:DataGrid id="myGrid" dataProvider="{gridData}">
       <mx:columns>
          <mx:DataGridColumn headerText="Show Relevance">
             <mx:itemRenderer>
                <mx:Component>
                   <mx:Image source="{'assets/images/indicator_' + data.showRelevance + '.png'}"
                             toolTip="{(data.showRelevance == 1) ? 'On' : 'Off'}"
                             click="outerDocument.toggle()" />
                </mx:Component>
             </mx:itemRenderer>
          </mx:DataGridColumn>
       </mx:columns>
    </mx:DataGrid>
    Remember, rules of encapsulation still apply. Mark all properties or methods public if you want them accessible by your inline Item Renderer. In the previous example, the toggle() method must have a public access modifier to expose itself to the inline Item Renderer.
    public function toggle():void
    Inline Item Renderers can also be reusable by creating a named component instance outside of the list-based control. This component must have an id property and contain the rendering logic of the Item Renderer. Using data bindings, the component is assigned to the itemrenderer property of one or more data properties of a list-based control.
    <!-- Reusable inline Item Renderer -->
    <mx:Component id="ImageRenderer">
       <mx:VBox width="100%" height="140"
                horizontalAlign="center" verticalAlign="middle">
          <mx:Image source="{'assets/'+data.image}"/>
          <mx:Label text="{data.image}" />
       </mx:VBox>
    </mx:Component>
    <!-- Used within a list-based control-->
    <mx:DataGridColumn headerText="Image"
                       dataField="image" width="150"
                       itemRenderer="{ImageRenderer}"/>
    In the previous example, note that the Item Renderer component contains 2 UI controls – Image and Label. When using multiple controls within an Item Renderer, a layout container is required. In this example, a VBox was used.
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari
    Message was edited by: BhaskerChari

  • Rendering (blue line)

    I'm rendering a few photo stills that were green in the timeline. After I render them, the line shows a light blue color. What is that? Do I need to render another way? Thanks in advance.

    Dark green in the render bar indicates a real-time effect that can play back and output to video at full quality with no rendering required.
    Lighter green in the render bar means that the media does not need rendering for output and will play back on the computer screen in real time, but not at full quality.
    Blue-gray means that the material has already been rendered.

  • Table Rendering - Row level vs Column level

    Normally renderers are specified for a given class of data or column of data.
    So, how would you handle rendering requirements that are row or table dependent? For example, how do I:
    a) color alternate lines in a table
    b) change the border of the selected cell
    Traditional Approach
    Most answers in the forum would be something like "use a custom render". Sounds great, but what does it really mean? If all your data is displayed as a String then it really isn't too difficult to create a single renderer with the required logic and add it to the table as the default renderer.
    However, what if you table contains, String's, Dates, Integer's, Double's and Boolean's and you want your cell to retain the default formatting of each data type in addition to the above requirement? Now you have two options:
    a) render by class (multiple renderers). Each renderer would need to implement the default "formatting" of the data (dates: dd-MMM-yyy, numbers: right justified, etc) in addition to the "row/table" rendering requirements. So the answer really becomes "use five custom renderers". Now the "row/table" rendering code is found in 5 classes. Of course you could always move the "row/table" rendering code up to a common base class.
    b) render by table (single renderer). A single custom renderer would be created and would need to implement the default "formatting" for all data types in the table, in addition to the "row/table" rendering. The benefit is that all the rendering code is in one class. An example solution is include for this approach.
    Alternative Approach
    I recently came across an approach where the "formatting" of the data is still done by the default renderers and the "row/table" rendering is done at the table level by overriding the prepareRenderer() method. This approach is much simpler, but the rendering is done in two different places. Is this a problem?
    So, my question is which approach do you prefer:
    a) Traditional Approach - multiple renderers
    b) Triditional Approach - single renderer
    c) Alternative Approach
    Me, I like the alternative approach, but I'm more of a problem solver than I am a designer, so I don't know how the solution fits in a large scale application.
    Hopefully your response will consider:
    a) OO design principles
    b) class reusability
    c) class maintenance
    d) anything else you can think of
    import java.awt.*;
    import java.text.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    public class TableRowRendering extends JFrame
        JTable table;
        Border selected = new LineBorder(Color.GREEN);
        public TableRowRendering()
            //  Model used by both tables
            Object[] columnNames = {"Type", "Date", "Company", "Shares", "Price"};
            Object[][] data =
                {"Buy", new Date(), "IBM", new Integer(1000), new Double(80.50)},
                {"Sell",new Date(), "MicroSoft", new Integer(2000), new Double(6.25)},
                {"Sell",new Date(), "Apple", new Integer(3000), new Double(7.35)},
                {"Buy", new Date(), "Nortel", new Integer(4000), new Double(20.00)}
            DefaultTableModel model = new DefaultTableModel(data, columnNames)
                public Class getColumnClass(int column)
                    return getValueAt(0, column).getClass();
            //  Traditional Approach
            table = new JTable( model );
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            getContentPane().add(new JScrollPane( table ), BorderLayout.WEST);
            TableCellRenderer custom = new CustomRenderer();
            table.setDefaultRenderer(Object.class, custom);
            table.setDefaultRenderer(String.class, custom);
            table.setDefaultRenderer(Date.class, custom);
            table.setDefaultRenderer(Number.class, custom);
            table.setDefaultRenderer(Double.class, custom);
            //  Alternative Approach
            table = new JTable( model )
                public Component prepareRenderer(
                    TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    if (!isRowSelected(row))
                        String type = (String)getModel().getValueAt(row, 0);
                        c.setBackground(row % 2 == 0 ? null : Color.LIGHT_GRAY );
                    if (isRowSelected(row) && isColumnSelected(column))
                        ((JComponent)c).setBorder(selected);
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            getContentPane().add(new JScrollPane( table ), BorderLayout.EAST);
        //  Custom renderer used by Traditional approach
        class CustomRenderer extends DefaultTableCellRenderer
            DateFormat dateFormatter = SimpleDateFormat.getDateInstance(DateFormat.MEDIUM);
            NumberFormat numberFormatter = NumberFormat.getInstance();
            public Component getTableCellRendererComponent(
                JTable table, Object value, boolean isSelected,
                boolean hasFocus, int row, int column)
                super.getTableCellRendererComponent(
                    table, value, isSelected, hasFocus, row, column);
                //  Code for data formatting
                setHorizontalAlignment(SwingConstants.LEFT);
                if ( value instanceof Date)
                    setText(dateFormatter.format((Date)value));
                if (value instanceof Number)
                    setHorizontalAlignment(SwingConstants.RIGHT);
                    if (value instanceof Double)
                        setText(numberFormatter.format(((Number) value).floatValue()));
                //  Code for highlighting
                if (!isSelected)
                    String type = (String)table.getModel().getValueAt(row, 0);
                    setBackground(row % 2 == 0 ? null : Color.LIGHT_GRAY );
                if (table.isRowSelected(row) && table.isColumnSelected(column))
                    setBorder(selected);
                return this;
        public static void main(String[] args)
            TableRowRendering frame = new TableRowRendering();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.pack();
            frame.setLocationRelativeTo( null );
            frame.setVisible(true);
    }Before you make your final decision. What changes would be required for each solution in the following "what if " scenarios:
    a) what if, you added a Boolean column to the table
    b) what if, you added a second Double column to the table which should be formatted as a currency (ie. 1,234.5 --> $1,234.50).
    Here is an example of a currency renderer:
    class CurrencyRenderer extends DefaultTableCellRenderer
         private NumberFormat formatter;
         public CurrencyRenderer()
              super();
              formatter = NumberFormat.getCurrencyInstance();
              setHorizontalAlignment( SwingConstants.RIGHT );
         public void setValue(Object value)
              if ((value != null) && (value instanceof Number))
                   value = formatter.format(value);
              super.setValue(value);
    }

    Well, here's a partila solution using technique from a link you cited in another thread.
    import tests.basic.tables.ColorProvider;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.text.NumberFormat;
    public class DecoratedTablePrepareRenderer extends JFrame {
        JTable table;
        private DefaultTableModel model;
        public DecoratedTablePrepareRenderer() {
            Object[] columnNames = {"Type", "Company", "Price", "Shares", "Closed"};
            Object[][] data =
                        {"Buy", "IBM", new Double(80.50), new Double(1000), Boolean.TRUE},
                        {"Sell", "MicroSoft", new Double(6.25), new Double(2000), Boolean.FALSE},
                        {"Sell", "Apple", new Double(7.35), new Double(3000), Boolean.TRUE},
                        {"Buy", "Nortel", new Double(20.00), new Double(4000), Boolean.FALSE}
            model = new DefaultTableModel(data, columnNames);
            table = new JTable(model) {
                //  Returning the Class of each column will allow different
                //  renderers to be used based on Class
                public Class getColumnClass(int column) {
                    return getValueAt(0, column).getClass();
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
                    Component c = super.prepareRenderer(renderer, row, column);
                    if (isRowSelected(row))
                        c.setFont(c.getFont().deriveFont(Font.BOLD));
                    return c;
            ColorProvider prov = new TransactionColorProvider();
            ColorTableCellRenderer renderer = new ColorTableCellRenderer(table.getDefaultRenderer(Object.class),prov);
            ColorTableCellRenderer boolrenderer = new ColorTableCellRenderer(table.getDefaultRenderer(Boolean.class),prov);
            ColorTableCellRenderer doublerenderer = new ColorTableCellRenderer(table.getDefaultRenderer(Double.class),prov);
                    int priceIndex = model.findColumn("Price");
              table.getColumnModel().getColumn(priceIndex).setCellRenderer( new EtchedBorderTableCellRenderer(new ColorTableCellRenderer(new CurrencyRenderer(),prov) ));
            table.setDefaultRenderer(Object.class,new EtchedBorderTableCellRenderer(renderer));
            table.setDefaultRenderer(Double.class,new EtchedBorderTableCellRenderer(doublerenderer));
            table.setDefaultRenderer(Boolean.class, new EtchedBorderTableCellRenderer(boolrenderer));
            JScrollPane scrollPane = new JScrollPane(table);
            getContentPane().add(scrollPane);
        class CurrencyRenderer extends DefaultTableCellRenderer {
            private NumberFormat formatter;
            public CurrencyRenderer() {
                super();
                formatter = NumberFormat.getCurrencyInstance();
                setHorizontalAlignment(SwingConstants.RIGHT);
            public void setValue(Object value) {
                if ((value != null) && (value instanceof Number)) {
                    value = formatter.format(value);
                super.setValue(value);
        public static void main(String[] args) {
            DecoratedTablePrepareRenderer frame = new DecoratedTablePrepareRenderer();
            frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        class ColorTableCellRenderer implements TableCellRenderer{
            protected TableCellRenderer delegate;
            protected ColorProvider provider;
            public ColorTableCellRenderer(TableCellRenderer delegate, ColorProvider provider) {
                this.delegate = delegate;
                this.provider = provider;
            public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                Component c = delegate.getTableCellRendererComponent(table, value,isSelected,hasFocus,row, column);
                  c.setBackground(provider.getBackgroundColor(row, column));
                return c;
          class EtchedBorderTableCellRenderer implements TableCellRenderer{
            protected TableCellRenderer delegate;
            public EtchedBorderTableCellRenderer(TableCellRenderer delegate) {
                this.delegate = delegate;
            public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                JComponent c = (JComponent)delegate.getTableCellRendererComponent(table, value,isSelected,hasFocus,row, column);
                  JPanel panel = new JPanel(new GridLayout(0,1));
                  panel.add(c);
                  panel.setBorder(BorderFactory.createEtchedBorder());
                return panel;
        class TransactionColorProvider implements ColorProvider {
            private int keyIndex = 0;
            private Color sellColor = Color.yellow;
            private Color buyColor = Color.green;
            public TransactionColorProvider() {
                keyIndex = model.findColumn("Type");
            public Color getBackgroundColor(int row, int column) {
                 if( model.getValueAt(row,keyIndex).equals("Sell")){
                     return sellColor;
                else {
                     return buyColor;
            public Color getForegroundColor(int row, int column) {
                return Color.black;
    }Boolean values are problematical since JCheckBox does seem to like borders, using a panel as I did in the Etched renderer seems to work. This solution need a little more work, this is submitted as a prototype
    Cheers
    DB

  • Client-side Rendering and AIX

    Group,
    We're running a Server 2008 R2 Print Server.  Does anyone know if the Client-side Rendering option has any "gotchas" when receiving jobs from an AIX server?
    Thanks,
    Jason
    Jason Riker

    Nope.  I assume the AIX machine renders the docs there so there is no Server Side Rendering required.
    This is a setting on the machine sharing the printer that lets Windows Vista and greater clients know they need to render the document. XP and non Windows machine have no clue about this setting.
    Alan Morris formerly with Windows Printing Team

Maybe you are looking for