Philosophy of tags, components and renderers

I am having a rough time getting my head around JSF's separation of JSP tags, components and renderers. Specifically:
1. Why are there so many HTML specific components? Clearly, there must be HTML renderers, and perhaps some components only make sense in a HTML world, but why is something like 'HtmlOutputText' not simply 'OutputText' with a HTML renderer?
2. Why should you use application.createComponent("javax.faces.HtmlInputText") rather than 'new HtmlInputText()'? What does this extra level of indirection buy you?
3. Why does the JSP tag nominate the renderer name that the renderkit looks up? Shouldn't the component be doing this? If I have a non-JSP framework, will it therefore have to specify renderer names for every single component too?
Regards,
Richard.

Update:
1. SOLVED: I now see that the HTML specific components are not HTML in terms of the platform they render to, only the attributes they need to accept (eg. styleClass). This is, of course, fine.
2. Any ideas, anyone?
3. It seems you can safely return null from the JSP tag's getRenderer, and just use the Component's getRendererType instead. In that case, what is the JSP tag's method for?

Similar Messages

  • [svn:fx-3.x] 5698: Fix masking when renderers are components and get individually masked

    Revision: 5698
    Author: [email protected]
    Date: 2009-03-27 22:18:52 -0700 (Fri, 27 Mar 2009)
    Log Message:
    Fix masking when renderers are components and get individually masked
    QE Notes: None
    Doc Notes: None
    Bugs: sdk-19377
    Reviewer: ryan
    tests: checkintests, mustella/datagrid
    Ticket Links:
    http://bugs.adobe.com/jira/browse/sdk-19377
    Modified Paths:
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataG ridBase.as
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/controls/listClasses/ListBase. as

    Revision: 5698
    Author: [email protected]
    Date: 2009-03-27 22:18:52 -0700 (Fri, 27 Mar 2009)
    Log Message:
    Fix masking when renderers are components and get individually masked
    QE Notes: None
    Doc Notes: None
    Bugs: sdk-19377
    Reviewer: ryan
    tests: checkintests, mustella/datagrid
    Ticket Links:
    http://bugs.adobe.com/jira/browse/sdk-19377
    Modified Paths:
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataG ridBase.as
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/controls/listClasses/ListBase. as

  • Custom tag attributes and rtexprvalue property

    I have created a custom tag. In my .tld file I have added <rtexprvalue>true</rtexprvalue>
    for several of the tag's attributes. Now I want to be able to pass values to
    these attributes with the expression syntax:
    eg <mytagprefix:pager maxRecordCount="{pageFlow.maxRecords}" />
    where maxRecords is a public variable in my pageflow.
    In my tag code to assign the value of maxRecordCount I have the following:
    public void setMaxRecordCount(String maxRecordCount) throws JspException
    Object obj = null;
    obj = evaluateExpression(maxRecordCount, "maxRecordCount");
    if(hasErrors())
    reportErrors();
    localRelease();
    else
    pb.setMaxRecordCount(new Long(((String) obj)).longValue());
    I keep getting compile time errors in my jsp such as:
    Error: no match was found for method setMaxRecordCount(long) in type package.PagerTag.
    where package is the package of my custom class PagerTag.
    In my pageflow maxRecordCount is a String. I don't understand why it is looking
    for a long. Sometimes the error goes away and I thought I had gotten it to work
    but then I realized that it was only working as long as the name of my attribute
    and the name of my public variable matched and that is not what I wanted to do.
    Should I be able to do what I am doing? I can instead pass this to the tag:
    <netui-data:getData resultId="maxreccount" value="{pageFlow.maxRecordCount}" />
    maxRecordCount="<%=(String) pageContext.getAttribute(\"maxreccount\")%>"
    but that is much less convenient.
    Thanks for any help.
    Robin

    Hello,
    Yes I forgot to include the faces xml DD. Here are the portions of code relating to the component and renderers:
    <render-kit>
    <renderer>
    <component-family>MyFamily</component-family>
    <renderer-type>MyRenderer</renderer-type>
    <renderer-class>essaisUn.MyRenderer</renderer-class>
    </renderer>
    </render-kit>
    <component>
    <component-type>MyComponent</component-type>
    <component-class>essaisUn.MyComponent</component-class>
    <component-extension>
    <component-family>MyFamily</component-family>
    <renderer-type>MyRenderer</renderer-type>
    </component-extension>
    </component>I changed from "<hello>" to "hello" and I still get the same exception.
    Can anyone bail me out?
    Thanks in advance,
    Julien Martin.

  • Summary report to show all the software components and version installed

    We are using 64bit Windows 2003 and Hyperion Planning and Essbase in 2 separate servers. I am not sure whether Windows can have a summary report to show all the software components and version installed and show it is 32bit or 64bit version installed?
    Thanks!

    Refer steps here to delete SC file.:
    http://support.apple.com/kb/TS2363
    Then proceed to repair your QuickTime. START / CONTROL PANEL / ADD n REMOVE PROGRAMS / highlight QUICKTIME and click CHANGE then REPAIR.

  • Is it OK to re-use 1 instance of editors and renderers?

    Hi,
    The simple version of the question, is can I make 1 instance of my custom cell editor and cell renderer classes and safely use it in all my JTable instances?
    For example, I have a DateRenderer class, and instantiate it in a static member, and use it in all Date columns and tables, many of which will be instatiated at one time. If a column needs a non-default format, then I guess I'd create a special instance for it, other wise it would use the default instance.
    It seems to be OK so far, but but my program hasn't received any serious usage yet.
    As to why, I'm thinking this way, I've been messing around with CellEditors and renderers and despite wanting to use default functionality whenver possible, I find that I'm using custom versions for every situation... so if possible, I'd like to keep the number of instances to a minimum.
    Regards
    Iain

    OK, I see what you mean.
    Stop cell editing on focus lost isn't the default behaviour, but I've had to use it anyway (it seems to make sense).
    The reason I asked is that, to get the behaviour that I want, it looks like I'll have to have my custom renderers and editors on every column of every table so I'd like to avoid unneccessary instantiation.
    I'm aiming for a system where:
    - 1 click selects the row (default behaviour),
    - 2 clicks starts editing the cell (also default),
    - but tabbing or pressing enter after editing a cell keeps you in editing mode.
    I don't suppose that many people here have had experience with this, but entering Japanese (and presumably other non ascii type character sets) using MS's IME doesn't work very well with the standard JTable behaviour. If you don't double click, the entered japanese text appears in a little IME window somewhere on the screen (no neccessarily near the editing cell) and just gets lost when you press enter. You have to double click every time, and I can't see the users accepting that.
    I'll be investigating this over tme, and hopefully will be able to get it working smoothly.
    Thanks,
    Iain

  • My assistant and I are using two Lightrooms (i.e. two serial numbers) and need to share between our two computers. I provide originals to her onto a flash drive. She tags them and returns them to me. I then copy the photos from her flash drive onto my com

    My assistant and I are using two Lightrooms (i.e. two serial numbers) and need to share between our two computers. I provide originals to her onto a flash drive. She tags them and returns them to me. I then copy the photos from her flash drive onto my computer and load them in my LR. The photos appear but witthout any editing or tagging. We need to be able to have her working on the photos on her computer with her copy of LR and me on my computer with my version of LR being able to access what is already tagged and given back to me. This seems hard. We need advice on if it is at all possible to have two computers simultaneously working on LR . I bought her her own version because I was told at the time of purchasing that that was the only way to share. Please advise urgently! Thanks.

    Sounds like your assistant isn't instructing Lightroom to write the tagging and editing to the files themselves, so wehn the files return to you, they don't have editing and tagging information. She need to select the photos in Lightroom and then Ctrl-S (Cmd-S on Mac). Or alternatively turn on the option to autmoatically write this information to the files.
    If you are using RAW photos, then this information will be written to a sidecar XMP file, and your assistant must provide you with the sidecar file. If these photos are not RAW photos, then the information is written directly into the photo file itself.
    Lightroom wasn't designed to be a multi-user program, and so it is truly not possible to have two people working on the same catalog at once. The way you are doing things, as modified above, is probably the way to go.
    As an alternative, you can transfer (portions of) catalogs as well as photos back and forth and then all of these issues disappear, but a catalog might be rather large for a flash drive (or maybe not, it depends)

  • Bookmarks sync erase new tags, labels and description on former synchronized bookmarks

    hello,
    on firefox 32.0.3
    bookmarks synchronisation erase recent tags, labels and description during the sync.
    this happen on already sync bookmarks on which we add some tags, labels and description, but not on new ones.
    no error message when logging or unlogging.
    thanks in advance
    best regards

    Hi ebntv,
    Thank you for your question, I understand that after a recent sync to your sync account that there are Recent Tags, descriptions and labels missing. However it is only the older Bookmarks that are affected.
    I have attached two screenshots to clarify to make sure I understand the feature that is affected:
    # The first has the default recent tags and list of all tags.
    # the second is an older bookmark visited 32 times that has all of the details after a sync.(However it never had a description or keyword)
    Which information is missing exactly?

  • Error - 50 when trying to open iTunes. Have tried uninstalling all 6 components and reinstalling but no joy :(

    Error - 50 when trying to open iTunes. Have tried uninstalling all 6 components and reinstalling but no joy Happened after an upgrade. Can anyone help?

    By way of experiment, let's try launching iTunes as an administrator.
    In Computer, open Local Disk C: or whichever drive you have your program files installed on.
    If you have a 32-bit version of Windows, open the "Program files" folder.
    If you have a 64-bit version of Windows, open the "Program files (x86)" folder.
    Open the "iTunes" folder.
    Right-click on the iTunes.exe file and select "run as administrator".
    Does it launch without the -50 now?

  • About the difference between the AWT components and the swing components

    As we know that an AWT component has a peer, but dose a lightweight component(e.g: a swing component) has also a peer? And could somebody tell me that who and how creates the CLICKED_EVENT when I click a JButton(a swing component), and where the CLICKED_EVENT to go util it was processed by a method like btn_ok_clicked(Event e)? And if I click a Button(an AWT component), what's the difference?
    Thanks a lot!

    The main difference is that AWT are native components, and Swing components are entirely in java written. That's besides the look and feel. There are a lot of other differences between AWT and Swing, and there are better described in the documentation.

  • How to pass tag name and value dynamically in the output of PCo notification?

    Hi,
    I have a requirement to develop such a scenario where there can be multiple no of tags in PCo (Say 10) but there will be single notification to push the tag name when the value got changed and the changed value to MII. for any value change for any of the tag, the notification will be trigger. So As per my knowledge I have to pass the tag name and value dynamically in the "output" tab of the notification. But need your support to find out how to pass them dynamically.
    Thanks in advance.
    Regards,
    Suman

    Hi Suman/Jeedesh,
    As per Pco notification, it will trigger whenever any of the tag value changes in Agent instance subscription items.
    For above issue, My suggestion
    1. Create DB table name TAGLIST with 200 tags as rows in columns (Tagname, TagValue)
    2. Based on notification trigger, create a transaction and update values w.r.t TagNames in above table
    3. Next time, when notification trigger with fresh value for any of the tag, cross check with existing TagName with Value and update in DB table.
    4. And in the mean time, send those Tag details vie mail trigger or as per requirement
    Instead of creating 200 notification, above is a just alternate way suggestion to achieve dynamic tag value change notification.
    Hope it might solve your problem
    Regards,
    Praveen Reddy

  • Flash Components and XML Binding

    I just ran through the XML binding Bike Trails tutorial about
    a hundred times. I can get that to work just fine. But when I try
    to work with my XML file, it keeps falling apart. I just don't get
    it! I've been working on it for 2 days and it's still not working
    right.
    For one, the bindings are not showing up right. I have 2
    combo boxes and then a final one I'd like to use to list the
    stores. Here's a link to basically what I'm trying to do:
    http://www.thinkseed.com/test/stores.html
    My bindings keep falling apart. I get null values all the
    time for the second drop box that's supposed to house the States
    (the one on the site is a fluke...I accidentally had the
    <store> node on a separate line instead of nested in the
    <state> node. No idea why that one sort of worked.)
    Here's an example of the XML code:

    The flashComponents are standard AS2 components, and you can look up their APIs in the Flash documentation.  Here is the button docs:
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001977.html#3654189
    Looking at that, there is a getStyle() method, and I just tested it out:
    put sprite(1).getStyle("borderStyle")
    -- "inset"
    put sprite(1).getStyle("fontFamily")
    -- "_sans"
    put sprite(1).getStyle("color")
    -- 734012.0000
    I'm not real sure what that means (probably the hex color converted to a float), but you can change the color like this:
    sprite(1).setStyle("color","red")
    And here is a page that lists all the styles that are defined:
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001973.html#3136306

  • Why ADF Business Components and TopLink

    Hi All,
    Why are there two types of components in Businses Tier? (ADF Business Components and TopLink). Even through there are other types, I can visualize the use of other components but ADF Business Components & TopLink seems to serve the same requirement.
    Can some one provide me information on what is the difference between these two and when to use which one?

    ADF Business Components (aka BC4J) are different from Toplink from approach point of view. Basically if you are more comfortable with SQL and want fine grain control over what and how SQL are run against the database, BC4J is the way to go, because, it's you who write the queries(in ViewObjects)
    If you are from more of java backgroup and can visualize things in term of Object and relationships among objects, so on and so forth then Toplink would be the right choice.
    Pls see the post by Shay in his blog:
    http://blogs.oracle.com/shay/2006/03/10
    regards - rutwik

  • Custom Components and passing arguments

    This afternoon i got a great answer regarding the use of custom MXML components and calling a function back in the main application file. I can accomplish this now by using parentDocument BUT I need to pass the name of a function(for filtering) as a parameter of the function call in the custom component. Below are the two code fragments.
    Custom Component Code
    <mx:LinkButton label="10% off or more" click="parentDocument.filterFunction(showTenPercent)" />
    Main App Code
    public function filterFunction(functionName:Function):void {
    merchantDG.visible=true;
    merchantData.filterFunction=functionName;
    merchantData.refresh();
                public function showTenPercent(item:Object):Boolean {
                        return (item.merchantOfferCategory=="10%");
    The filterFunction in the main App is called by multiple components so I believe I need to keep in centralized in the main app. There is probably another way to do this but I am building my Flex skills slowly and need to understand how to do this. As the code is now, I get an error about functions and strings.

    I believe instead of calling the function from inside the custom component you need to do this from inside your main application whenever you're initiating the custom component.
    for ex.
    <custom:LinkBtnCustom label="10% off or more"  click="filterFunction(showTenPercent)"/>
    this way you don't need the parentDocument prefix.

  • Difference between business components and EJB

    hello guys, do anyone knows what is the core difference of using ADF Business components and EJB Session Beans ??

    this blog might help http://blog.whitehorses.nl/2012/03/26/adf-11g-bc4j-or-ejb3/
    Timo

  • JSF 2.0: Composite Components and their ID

    I'm using Composite Components with JSF 2.0.
    Template:
    <composite:interface />
    <composite:implementation>
        <h:inputText id="text" />
    </composite:implementation>Template Client:
    <h:form id="form">
        <components:myComponent />
    </h:form>In the rendered result, the h:inputText's id will be "form:j_id1060595728_4b62ee3:text".
    How can I override that default ID?
    I tried to set an id attribute on composite:interface and composite:implementation, however, that doesn't have any effect.
    Using ui:debug, I found that the component with ID "j_id1060595728_4b62ee3" is a UINamingContainer.
    When using my own UINamingContainer implementation, i.e., ...
    <composite:interface componentType="util.jsf.UINamingContainerWithID" />
    @FacesComponent("util.jsf.UINamingContainerWithID")
    public class UINamingContainerWithID extends UINamingContainer {
         private String id = "foo";
         @Override
         public String getId() {
              return id;
         @Override
         public void setId(String id) {
              // this.id = id;
         public void setFooID(String id) {
              this.id = id;
    }... I can prevent the id from being set in setId(String), and h:inputText's id will be "form:foo:text".
    (I have tried to debug but the source code is slightly out of sync.)
    I also tried to add an attribute fooID to composite:interface and composite:implementation, with no effect.
    How do you work with Composite Components and their IDs?
    Thanks

    All composite components are NamingContainers. This is necessary to prevent ID collisions.
    In order to avoid a generated ID on a particulare composite component, specify an ID in the component
    within the using page:
    <h:form id="form">
        <components:myComponent id="c" />
    </h:form>So the client ID of the text component would be: form:c:text.

Maybe you are looking for

  • Win XP 64 driver for hp laserjet pro 200 color mfp m276nw

    Hi, any workaround for using this printer under XP-64? Maybe driver rename or compatible generic? Just bought it, unpacked, connected - and found out that XP 64 is not supported. Now what? Return in disgust and buy Cannon or Minolta again, as they su

  • How to restrict material master by material type  t-code MM01

    Hi, how to restrict Materilal master by Material type in t-code MM01 I do restrict by M_MATE_MAR authorization object . After i see there not restrict. Amit

  • The quicktime plugin doesn't play mp3 in Firefox

    I've got a webpage with <a href="audiofile.mp3" target="a_frame">link text</a>.  This page is part of a website that I'm webmaster on. Clicking on the link always plays the audio in Safari but is inconsistent in Firefox in my iMac (OSX 10.6.8).  Some

  • Pages won't allow me to type in a new document

    I have Pages '09 version 4.3. When I went to open a new document today, the blank new document will not allow me to type in it. I can insert a table and type in that fine, but if I try to just type a list or document, it won't allow me to do anything

  • Trying to connect SPA122 for VOIP

    Hello, I am new to VOIP and if I did not search well enough to find an answer, I apologize. I know Google is my friend, but in this case I have not found the answers I am looking for. Here is my setup: Cisco SPA122 Apple Airport Extreme Wireless Rout