Looking for h:choose .  What is alternative?

I have a list of input fields which can either be a numeric
input field, or a 1 of N enumerated choice. The bean, (TestSequence),
either contains the nested structure of TestSequence.items[].numeric,
or TestSequence.items[].enumerated depending up the string value
of TestSequence.type.
I want to write the JSF below to render this input structure, but
I know tag <h:choose> and <h:when> do not exist.
What is the "JSF" manner to solve this problem?
Steeeeve
<f:view>
<h:form>
<h:data_table
value="#{TestSequence.listInputs}"
var="input">
<h:column>
<f:facet name="header">
<h:output_text value="Label"/>
</f:facet>
<h:output_text value="#{input.label}"/>
</h:column>
<h:column> <!-- Beginning of dynamic column -->
<f:facet name="header">
<h:output_text value="Value"/>
</f:facet>
<-- This is where the good stuff begins! -->
<h:choose>
<h:when "#{input.type}='numeric'">
<h:input_number valueRef="#{input.numeric.value}" size="20">
<f:validate_required/>
<f:validate_longrange
minimum="#{input.numeric.min}"
maximum="#{input.numeric.max}"/>
</h:input_number>
</h:when>
<!-- Also note nested <h:data_table> here -->
<h:when "#{input.type}='enumerated'">
<h:selectone_menu valueRef="#{input.enumerated.value}">
<f:validate_required/>
<h:data_table
value="#{TestSequence.enumerated.items}"
var="item">
<h:selectitem itemValue="#{item.value}" itemLabel="#{item.label}"/>
</h:data_table>
</h:selectone_menu>
</h:when>
</h:choose>
</h:column> <!-- End of Dynamic Column -->
</h:data_table>
</h:form>
</f:view>

A couple of ideas to get you started on some alternatives. There's no "one right answer" because everyone has different detailed requirements, but each of these seem like they would be feasible:
* Where you've got <h:choose>, write a custom component+renderer
that itself evaluates the #{input.type} expression and renders the
correct format for the input. This means you'd have to replicate the
encode and decode functionality of the corresponding renderers.
* Similar to the above, where you've got <h:choose>, write a custom
component that evaluates the state of the world, and then dynamically
adds the appropriate child components to the component tree,
allowing the standard renderers for those components to do the
actual markup creation. The only (slight) complexity is that you'll
need to make getRendersChildren() return true, and take responsibiility
for implementing encodeChildren() to actually call the child component
renderers.
Craig McClanahan

Similar Messages

  • Looking for new laptop what are the differences between pro and air? Besides size. Does the air preform like the pro?

    Looking for new laptop what are the differences between pro and air? Besides size. Does the air preform like the pro?

    The NEW macbook Pro and Air are EXTREMELY close in form factor
    The newest macbook Pro is essentially a larger macbook Air with Retina display and options for speed in increasing prices up to an independent graphics and quad core processor.
    both Air and new Pro now have PCIe SSD and permanent RAM.
    The Air is the lightweight portable form factor, fast to boot and shut down, but with longer battery life than any of the macbook pro in 13"
    Now the new macbook Pro and macbook Air are extremely close in form factor and nature.
    both have 802ac wifi
    both have permanent RAM, no superdrive
    both are slim profiles and SSD
    The only real differences now are (in the most expensive Pros) faster processors and quadcore processors and top end model autonomous graphics.
    ....and of course the retina display
    both are now "very good for travel"
    Other than features the form factor of the Air and Pro are VERY close now,....so now its merely a matter of features and price more than anything.
    You need an external HD regardless of what you get for backups etc.   Drop into an Apple store and handle both and make your choice based on features, such as Retina or non-retina, .... both at a distance now look like the same computer.
    The Pro weighs more, ....but nowhere near what it used to just a month ago on the older macbook Pros
    The NEW macbook Pro is a different creature entirely than the older macbook Pro, .....the new Pro is thicker than the Air, but id frankly call the NEWEST Pro a "macbook Air with Retina display" , or
    Maybe a “macbook Air PRO with Retina display” 
    Instead of Air VS Pro now,.....its really a smooth transition from Air to pro without comparing say, 2 different creatures, now its like contrasting a horse from a race horse.
    Either one in 8gig of RAM (preferably)... the 4gig upgrade costs very little,  the I7 you will notice only 15% faster on heavy applications over the I5, and NOTHING on most APPS.....I5 has longer battery life.
    As you see below, the non-Retina 13" AIR is 82% of the Macbook with Retina display in resolution
    there is no magical number of pixels per inch that automatically equates to Retina quality.
    http://www.cultofmac.com/168509/why-you-might-be-disappointed-by-the-resolution- of-those-new-retina-display-macs-feature/
    A huge internal SSD isnt a game changer for anything, you need an external HD anyway
    what you WONT READ on Apple.com etc. is that the larger SSD  are MUCH FASTER due to SSD density
    "The 512GB Samsung SSD found in our 13-inch model offers roughly a 400MB/s increase in write speeds over the 128GB SanDisk/Marvell SSD"
    http://blog.macsales.com/19008-performance-testing-not-all-2013-macbook-air-ssds -are-the-same
    Here is an excellent video comparison between the 11” I5 vs. I7 2013 Macbook Air.
    http://www.youtube.com/watch?v=oDqJ-on03z4
    http://www.anandtech.com/show/7113/2013-macbook-air-core-i5-4250u-vs-core-i7-465 0u/2
    I5 vs. I7 performance 13” Macbook Air 2013
    Boot performance
    11.7 I5 ……11.4 I7
      Cinebench 
    1.1 I5….1.41 I7
    IMovie Import and Opt.
    6.69 I5….5.35 I7
      IMovie Export 
    10.33 I5…8.20 I7
    Final Cut Pro X
    21.47 I5…17.71 I7
      Adobe Lightroom 3 Export 
    25.8 I5….31.8 I7
    Adobe Photoshop CS5 Performance
    27.3 I5…22.6 I7
    Reviews of the newest Retina 2013 Macbook Pro
    13”
    Digital Trends (13") - http://www.digitaltrends.com/laptop-...h-2013-review/
    LaptopMag (13") - http://www.laptopmag.com/reviews/lap...play-2013.aspx
    Engadget (13") - http://www.engadget.com/2013/10/29/m...-13-inch-2013/
    The Verge (13") - http://www.theverge.com/2013/10/30/5...ay-review-2013
    CNet (13") - http://www.cnet.com/laptops/apple-ma...-35831098.html
    15”
    The Verge (15") - http://www.theverge.com/2013/10/24/5...w-15-inch-2013
    LaptopMag (15") - http://www.laptopmag.com/reviews/lap...inch-2013.aspx
    TechCrunch (15") - http://techcrunch.com/2013/10/25/lat...ok-pro-review/
    CNet (15") - http://www.cnet.com/apple-macbook-pro-with-retina-2013/
    PC Mag (15") - http://www.pcmag.com/article2/0,2817,2426359,00.asp
    Arstechnica (15") - http://arstechnica.com/apple/2013/10...-pro-reviewed/
    Slashgear (15") - http://www.slashgear.com/macbook-pro...2013-26303163/

  • Looking for help on what Hardware to use for FCS

    I am looking to set up a shared storage for use in a small editing network and I am having a hard time getting my head around what exactly I need.
    I have 4 edit stations that currently run externals. I am looking at a solution like FCS to centralize all the captures and media to edit from. We usually edit Apple Pro res and DV footage.
    My understanding is that we need to connect to the storage using Fibre to get the bandwidth needed. My issue is wondering exactly how much hardware I need to get this done and what the layout of this hardware should be.
    I currently have a Mac Pro that could be dedicated as the server running FCS. I plan on buying a Fibre connected storage RAID and outfitting the 4 Mac Pros in the office with Fibre cards. I am guessing I need to connect all of this with a Fibre switch. Is this all I would need? Would I be able to capture and edit off of the RAID using this configuration? What else would I need?
    I have been looking for diagrams or some type of examples of configurations people have use and not been able to find much. Any advice would be great
    Thanks

    Steve Price wrote:
    XServe, Promise RAID, QLogic Sanbox 20 port fiber switch, XSAN software, 5 Mac Pro Fiber cards.
    That's pretty good, assuming you have the numbers right. You need Xsan software and a Fibre Channel card for every computer connecting via FC (the Xserves and Mac Pros). Note that the 20 port switch has 16 usable ports, and each storage or computing device should connect to two ports, so you've basically filled it up with what you've listed.
    I also have an XServe that is on the (10 GB ethernet) network (in another building on campus) that is currently being used as a login/account manager (could it be used for metadata as well?).
    It would be good to use this as the failover MDC to support the one you are purchasing. Can you relocate it so it is physically closer? It should be Intel. It is not recommended to have the primary MDC perform directory or other services, but some people do this (at a slight risk) on a secondary server.
    Will I need to reduce one of the Mac Pro editors to merely a metadata controller (leaving me with 4 editors)?
    Not recommended, except maybe as a backup.
    Can I use the existing network for the LAN and METADATA Switches?
    You'll need a separate network for metadata traffic. This can be physical or virtual (on higher-end switches).
    @trezero-your list is the first I've seen with 3 XServes. Is this just because of FCServer? Can you not use the MDC or one of the networked editors?
    FCServer warrants its own machine since it is fairly CPU intensive, especially if you are doing transcoding on it. In high performance environments people will add a second machine just to do rendering.
    Don't put any other server process on the MDC. You could use the backup MDC for FCSvr, but this isn't recommended since if it gets failed over to, then it is no longer the backup, and you're again risking your Xsan integrity on a shared system. In an educational lab setup where the risk of downtime is not an inconvenience, you could probably get away with it.
    You would probably benefit from either taking the Xsan class or working with a professional systems integrator. I'm based in the Southeast and can refer you to a few people if you contact me offline.

  • HT201272 I purchased extra power from a big fish game, the money was pulled from my account but was never given the stuff I purchased, I have spent hours trying to look for a solution, what a waste, the money went to Apple, the game was called FOUND hidde

    I purchased stuff for a game I play, did not receive the stuff but money was taken from account, normally it goes through with no problem but tonight it just stopped
    Apple got the money but I did not get what I purchased

    You can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Looking for advice on what which freamework or dev. methodology for read only database centric web application

    Hello, I hope the experts here can advise me on which development approach for a new .net web application that  I am to begin development shortly.  I have the back end stored procedures complete and now I will build a .net front end. 
    This front end will be 95% populating custom html5/css3/jquery pages from c# DataSets which are themselves populated from calls to oracle stored procesures.  There will be no updating - this is read-only querries of OLTP prpared tables off of a data
    warehouse schema.  I am a verteran at the back end stuff but my web app development skills are new so I hope to get a recommendation form the experts on what approach I should persue to build the front end.  From what I have seen I might start
    with MVC5 framework and build the web pages with RAZOR embedded c# code looping through the DataSets to create the html. I need to the ability to create very custom div elements throughout, so I understand I should not use some high level code generation
    tool.  Thanks so much for the feedback. 

    Hello Jay,
    This forum is discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.
    >>I hope the experts here can advise me on which development approach for a new .net web application.
    From this message, you are doing web applications, you will need to post this thread to Asp.Net  forum for some advices. For MVC issues, please post
    Here.  Thanks for your understanding.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Looking for new camera - what is compatiable and what is best ??

    I am purchasing a macbook pro in the very near future (next week) and am also in need of a new camera. What brands are compatable? Is there a list that I can reveiw?

    Canadamom
    Welcome to the Apple Discussions.
    1. Are you buying a camera that shoots RAW or one that shoots only jpegs? If jpegs then any camera that saves to a card - compact flash, SD etc - will work with iPhoto. Buy a USB card reader, they're inexpensive and save on wear and tear on the camera. Then pop the card from the camera into the card reader and iPhoto will import them.
    2. If you're planning on shooting RAW this list is useful:http://support.apple.com/kb/HT1475
    3. Other than that, the best suggestions are to stick with a major brand and have a look at the review sites: here's a couple:
    http://www.steves-digicams.com/
    And
    http://www.dpreview.com/
    Regards
    TD

  • Looking for Dockable Case, What about old Docking Station from ipod?

    Hey everyone,
    You must know by now that most plastic cases wont let you dock your ipod because the new docking station is too tight. Has anyone tried using the old dock from the video ipod or older and than docking with a plastic case? If so, what's a good case to buy to protect from dropping which would fit in the old docking stations?

    I just bought a Speck Toughskin, which I really like. It feels pretty rugged and seems like it would protect the iPod if I dropped it (I'm a klutz). It has a detachable belt clip on the back. I also like the hard screen protector--it has a little rubber rim on the bottom so it doesn't actually touch the screen, which should keep it from getting scratched. My only concern is how well the iPod will dissipate heat while charging, but I figure I can punch a few small holes in the back if it becomes an issue.
    The only downsides to this particular case are that you cannot put it in a dock, it does bulk up the iPod a bit, and it completely covers the iPod so it's not the best choice for someone that wants to maintain the standard appearance of their iPod. But for good solid protection, it seems pretty hard to beat (no pun intended).

  • Looking for Leanne Rimes - What I Cannot Change

    I live in Toronto, Ontario, Canada and I want to download 'What I Cannot Change' by Leanne Rimes, but for some reason it is NOT available to Canadians. Does anyone know where I can BUY & DOWNLOAD this song?
    I really hate the fact that there are different music libraries for Canadians vs. Americans.
    All this does is encourage illegal downloading!
    THANKS!

    I wish iTunes would stop all these different libraries and just have ONE LIBRARY FOR EVERYONE.
    It's not up to Apple; they'd love to have the same offerings for all countries. But the holders of the rights to the material, who are almost always different from country to country, won't allow cross-border sales, and require individual negotiations for the rights to sell in each different country. IF the holder for the rights to a given track/album in your country is slow to grant those rights (or refuses outright), there's nothing Apple can do.
    Message was edited by: Dave Sawyer

  • Raid Card, what to look for in a card?

    Hi guys,
    Im looking for help on what to look for in a Raid card. Im new to Raid, but i have read the tweakers pages and it seems like the way forward.
    Im a full time editor working with AVC-Intra footage doing fast cuts. Im about to ditch my 2008 mac pro and build a up to date PC around the i7 4930k. Im planning on running 8x3-4tb drives for footage; raid 5, 3x3tb raid 3 for exports, maybe 2x256 ssd raid 0 for boot, 2x3tb drive for page file and media cache, and maybe 3x3tb for stock footage raid 0.
    Im totally lost in what to look for in a Raid card?
    Cheers Ryan

    For 13 drives is there a cheaper option?
    Yes, Areca 1882ix-16, 1264IL-16, Intel RS2WG160, LSI 9260-16i - or for that matter, any RAID controller with 13+ internal connections. There are much cheaper controllers from Highpoint and others, as well.
    If your next question is, is it worth it going cheaper? ...Usually not for me personally - at least certainly not with Highpoint or other entry level controllers with subpar support and all kinds of performance and reliability problems. Even Tier 1 controllers aren't exempt from them.
    That said, I am curious about Intel and LSI controllers I listed above. The LSI one especially so given the availability of SSD caching and other neat features.
    Hope this helps.

  • What should a student look for in a backpack?

    Here are some key things to look for when choosing the perfect backpack for back to school!

    Here are some key things to look for when choosing the perfect backpack for back to school!

  • How come iTunes doesn't have a band I am looking for?

    I am looking for a band that I LOVE, and iTunes doesn't have it or something. Does anyone know why iTunes doesn't offer all music?

    Isabella Ann wrote:
    I am looking for a band that I LOVE, and iTunes doesn't have it or something. Does anyone know why iTunes doesn't offer all music?
    What band are you looking for and in what country iTunes store?
    You can request specific artis/music/songs here
    -> http://www.apple.com/feedback/itunes.html

  • What is alternative to youtube in iPad2 on iOS 6?

    I have upgraded to iOS 6 today, and realized there is no youtube app. Then I googled it, and then come to know youtube will be available for iPhone.
    Whats the alternative of youtube in App Store and available for FREE. Pls suggest.

    Using the mobile web version of YouTube?

  • Restore from Time Machine hung on "Looking for source"

    Had to buy a new Macbook Air to replace my old one which was water damaged.
    I have a full Time Machine backup on a portable USB hard drive which is divided into two partitions: Time Machine backup and a storage partition.
    Old Macbook air has the previous operating system, updated.
    New MA has mavericks of course.
    Setup assistant didn't see the Time Machine backup when attached.
    So I setup an account on the new computer, got to the main screen, started migration assistant to see if that would work.
    (With the new account, the portable USB drive is recognized and both partitions show in the finder.)
    Same problem. Migration assistant sits with spinning icon at "Looking for source".
    What can I do to show it where the Time Machine backup is?
    Thanks.

    mjmorris11733 wrote:
    I start TM, I can see the NAS drive as a TM-mount point, I select it
    Does that mean you selected it on the Time Machine Preferences window?  If not, do that.
    If that doesn't help, the preferences file may be damaged.  Try a "full reset" per #A4 in Time Machine - Troubleshooting.
    If still no help, the backups themselves may be damaged.  Try to repair them, per #A5 in the same link.

  • IAS-39: looking for info

    Hi.
    We are looking for info regarding what type of support do SAP gives for this IAS rule.
    So far we saw that this rule is supported in the Tresurey module and we are looking to avoid implementing this module.
    thanx.
    ayal.

    Hi Ayal,
    you can find some information by using the SAP Service Marketplace.
    If you follow this link:
    https://websmp105.sap-ag.de/ias
    You will be led to the IAS/ IFRS information page.
    The information regarding IAS39 you will find within the media library.
    Kind regards
    Thomas

  • E2000: looking for qos or throttling

    Hello-
    On our home network, we have a Roku streaming video device as well as two laptop computers.  Our router is an e2000.  I enjoy playing interactive games on my laptop, and everything is fine, except when my wife is watching videos on the Roku.  Then I get hiccups on the laptop which can last anywhere from a few seconds to a minute or more.  (I lose my connection to the game server.)
    I think what I need is some way to throttle the bandwidth going to the Roku device.  This should leave enough bandwidth for the game on the laptop.
    Does the e2000 support this kind of throttling or qos?  I looked at the qos config on the device, and it doesn't look to me that it will do what I want.  If so, which router do I need?
    Thanks.  Scott

    Please keep in mind that I hardly know anything about network administration.  I hadn't even heard of QOS until a few days ago.
    I'm looking for a way to restrict the bandwidth going to a particular device on my network, because it "doesn't play nice."  It seems to eat up whatever bandwidth it can and sometimes doesn't leave any for other devices.  The device I'm talking about is a Roku streaming video player.
    I've figured out how to get to the advanced settings using Cicso connect.  I see seven main categories in the advanced settings:  setup, wireless, security, access restrictions, applications & gaming, admin and status.
    I don't see these four options you're talking about.  Can you be more specific?
    I read in another forum that I need to go to applications & gaming | qos, which I've done.  There I see the subcategories wireless, internet access priority, category and summary.
    What I'm looking for is some what to throttle or restrict the bandwidth going to the Roku streaming video device on my network.  Giving the data going to the Roku a lower priority would also help, but I don't know how to do it, or if it is even possible on my e2000.
    Thanks for your help.   Scott

Maybe you are looking for

  • Document Restriction Interactive Form

    Hey guys i have generate an Interactive Form like  the ABAP Program FP_TEST_IA_01. Now we try to "configure"  the PDF restrictions over the structure sfpoutputparams (parameter PDFCHANGESRESTRICTED). Our problem is, that the generated PDF doesn't all

  • Reg: Process Chain, query performance tuning steps

    Hi All, I come across a question like,  There is a process chain of 20 processes.out of which 5 processes are completed at the 6th step error occured and it cannot be rectified. I should start the chain again from the 7th step.If i go to a prticular

  • J2EE Best Practices on Cache (I know there's a lot of answers but...)

    Hello friends, i'm developing a JSP-Servlet MVC application and I have the following problem. I want to control errors at low level, so i want to permit send a form, presenting a error message in a new window with a back button that cals history.back

  • Best way to store big amount of data

    Hi, i need to store a big amount of data, written in a txt its size is almost 12 mg, anyway it depends on the computer it runs, beacause what i want to store is all the shared files in a computer. Which is the best way to store it? Array string? text

  • Conert  currency in sap script

    Hi experts,   I have problem in SAP SCRIPT , I want to display currency in the PO currnecy format, How it is possible? we removed all comas and dots in the currency, now i want to display these values in the particular PO currency format.