Possible to create a custom renderer for rendering standard component ?

This is in context for creating dynamic Data tables. Is it possible to create a custom Renderer for rendering component (standard) without creating a custom component?
namanc

Let's assume you want to create a custom renderer which will be used to render the error-messages (the h:messages tag). The component-family in this case is: javax.faces.Messages, the renderer-type javax.faces.Messages.
Therefor in your application's faces-config.xml add this renderer-statement (inside a render-kit, obviuosly):
<faces-config>
  <!-- other stuff like components, managed beans, navigation-rules,... -->
  <render-kit>
    <renderer>
      <component-family>javax.faces.Messages</component-family>
      <renderer-type>javax.faces.Messages</renderer-type>
      <renderer-class>my.very.special.MessagesRenderer</renderer-class>
    </renderer>
  </render-kit>
  <!-- other renderers... -->
</faces-config>The code for MessagesRenderer is very dependent on your needs, therefor I will not post something here. Basically you need to extend javax.faces.render.Renderer. For help in that camp, surf to the online tutorials or get yourself a book (I learned a lot from Kito Mann's "JSF in Action"). Additionally grab the source for Sun's RI AND Myfaces and dig into that java-code. There is a huge learning potential looking at that source-material.
hth
Alexander

Similar Messages

  • Is it possible to create a customs declaration for the document which is cleraed from customs

    Hi Experts,
    I want to generate a custom declaration for the declaration which is cleared from customs.
    Is there any function module for this requirement.
    Please post your suggestions ASAP.
    Thanks
    Srinivas

    hi Srinivas,
    It’s not possible to create a new declaration for a declaration that is
    already accepted by customs. There could be below 2 possible options
    1. U need inbound cancellation messages in the respective activity sequence,
    and then u can request customs by mail or phone to send the cancellation
    message. Once the cancellation message is received document gets cancelled and
    u can create new declaration
    2. U need a new optional activity sequence that will have outbound
    cancellation message. once u trigger the cancellation message, customs will
    reply back with the cancellation confirmation message and u can create a new
    declaration
    Hope this helps...
    Regards,
    Santosh

  • Is it possible to create a custom dictionary for my iPhone?

    I use the dictation feature a lot, but it does not know how to spell some words.  Is there a way to teach it the correct spelling?  Perhaps with Siri?
    Thx

    There are apps, in the app store, like this:
    https://itunes.apple.com/us/app/ringtone-maker-pro-create/id390777480?mt=8
    Or, read here:
    https://discussions.apple.com/docs/DOC-3792

  • Is it possible to create a custom web app for online quotes?

    is it possible to create a custom web app for online quotes?
    Any advise greatly appreciated.

    Hi there,
    You really need to expand a lot more on what you want to achieve. That really is nothing to go on there .

  • Is it possible to create a tool tip for an individual cell?

    Hi,
    Is it possible to create a tool tip for an individual cell?
    Sun's JTable tutorial shows how to create a tooltip for an individual column:
    TableColumnModel tcm = table.getColumnModel();
    TableColumn tc = tcm.getColumn(0);
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("This is a tool tip text");
    tc.setCellRenderer(renderer);
    Thank you.

    See reply #2 below:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=424429
    ;o)
    V.V.

  • Is it possible to create a customized survey with our organizations logo at the top?

    Is it possible to create a customized survey with our organizations logo at the top? I'm trying to create a survey for our members but instead of using a template we would like to use something simple with our logo included at the top.

    Just create a blank form and click Add Header at the top of the form page:

  • Is it possible to create a custom photo layout when creating a photo book in iphoto?

    Is it possible to create a custom photo layout when creating a photobook in iphoto? How about adding text boxes?

    Yes and no
    You can not make a custom template nor can you modify one
    You can do a page in other software and then print to PDF using the send PDF to iPhoto option and place the resulting image as a full page photo - See Old Toad's tutorial No.19 for more information.
    LN

  • Is it possible to create a customer master with different address

    Hi Gurus,
    Is it possible to create a customer master with different address as we maintain in SAP CRM.
    Kindly help me onthis issue \
    Regards
    Kannan

    Hi Kannan,
    There are no multiple addresses but you can use multiple unloading ponts for the same address for the ship to Party.
    So when you create a Sales order the system will give a pop up with the unloading points allowing you to select the desired one.
    I hope I understand your query correctly.
    Regards
    Yogesh

  • Is it possible to create a custom E-mail Notification?

    Dear all,
    We have a requirement where the customer would like an additional email notification in the RFx process which is not available in the E-Sourcing system.
    What they want to do is send an email to Vendors who did not get awarded in the RFx Process and let them know.
    Is it possible to create a custom email notification in any way, perhaps using the javax.mail classes?
    import javax.mail.*;
    import javax.mail.internet.*;
    If anyone has prior experience with this, please let me know. I would appreciate pointers on this.
    Thanks & Regards,
    Reshma

    Hi Thashin,
    I understand you have done custom jar email notification for Transnet. I need to do this now for another component, Task Escalation. please contact me regarding correct way to do this. I have developed the custom java code to access Task info. What I need to know is that, does e-sourcing use its own queing mechanism to send out emails, if so what packages in IAPI does this use, or does it use normal java mail api to send out mails?
    Assistance will be highly appreciated.
    Thanks
    Tebogo

  • Is it possible to create an inbound delivery for STO in a 2 step process ?

    Hi Experts,
    Is it possible to create an inbound delivery for STO in general (how do I get a vendor for a Plant. I have already assigned a plant to my vendor in vendor master - additional purchasing data, but it does not seem to work).
    In particular if I want to create an inbound delivery in intra-company plant STO scenario, how do i do it?
    Let me know in case if that is not possible.
    Thanks,
    Nitin

    Hi Tao,
    I did that also, but it did not work.
    Finally I had to debug, and found that the for the document type UB (intra-company transfer) i should make the customizing setting which makes the vendor data to be considered. (Table T161).
    Anyways, thanks for your help.
    Regards,
    Nitin

  • Is it possible to create many primary key for a table?

    hello sir/mam.
    i am selva, i am new to abap,
    is it possible to create many primary key for a table?
    please guide me.

    Hi Selva,
    Many Primary Keys = Composite Key.
    i.e some set of columns will enable you to identify a unique row from a set of rows in the table.
    This can be achieved by checking the primary key check box in se11.
    Hope it helps.
    Regards,
    Maheswaran.B
    Message was edited by: Maheswaran B

  • How to create a custom measure for each level of a dimension

    Hi all!
    Can Anyone please explain me with an example, how to create a custom measure for each level for a dimension? I dont mine if you use
    one or more measures.
    thanks in advance
    hope someone helps me.

    For example:I create a dimension for product_dim witch has 4 levels:total, class, family and item:
    d_aben18
    n1_aben18
    n2_aben18
    n3_aben18
    n4_aben18
    herarchy:h_aben18
    cube:cubo_aben18
    measure:med_aben18
    I create this code to fetch the data to the dimension:
    TRAP ON CLEANUP
    SQL DECLARE c1 CURSOR FOR SELECT-
    total_product_id,1,'N1_ABEN18',total_product_dsc,-
    class_id,1,'N2_ABEN18',total_product_id,class_dsc,-
    family_id,1,'N3_ABEN18', class_id, family_dsc,-
    item_id,1,'N4_ABEN18',family_id,item_dsc-
    FROM PRODUCT_DIM
    "OPEN THE CURSOR
    SQL OPEN c1
    "FETCH THE DATA
    SQL FETCH c1 LOOP INTO-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N1_aben18_LEVELDEF,:D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N2_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N3_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N4_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    "SAVE THE CHANGES
    UPDATE
    COMMIT
    CLEANUP:
    SQL CLOSE c1
    SHOW 'KK2'
    Then I create a cube with use compression off, and in rules sum for example.
    After, I create a measure and I select Override the aggregation specification for the cube, in rules I put nonadditive and I would like to create aprogram to assign distinct values to each level of the dimension. For example, I put 1, 2 3, and 4 values, but at the end I would like to put count(distinct(values)).
    for that I create another program:
    VRB D_RETURN DECIMAL
    if D_ABEN18_N1_ABEN18_LEVELDEF eq 'N1_ABEN18'
    then D_RETURN = 1
    if D_ABEN18_N2_ABEN18_LEVELDEF eq 'N2_ABEN18'
    then D_RETURN = 2
    if D_ABEN18_N3_ABEN18_LEVELDEF eq 'N3_ABEN18'
    then D_RETURN = 3
    if D_ABEN18_N4_ABEN18_LEVELDEF eq 'N4_ABEN18'
    then D_RETURN = 4
    else d_return=26
    return d_return
    "SHOW D_RETURN
    cubo_aben18_med_aben18_stored=d_return
    but it doesnt work.I dont know how to put to assign or to see what I want.
    I report the measure, or I report the program, but then how can I see the values of the measure?
    thanks in advance

  • How to create a custom tag for a custom converter

    In Jdeveloper 11g, I have a project where I have created a custom converter class that impements the javax.faces.convert.Converter class. I have registered the converter with an id in the faces-config.xml file of the project, and the converter works fine by using the <f:converter type="myconverter"> tag. However, the custom converter has a field which I would like to set from the tag itself. Hence, I would like to add an attribute to <f:converter> tag if possible or create a custom tag that has the attribute.
    I have done some reserach and I found that a custom tag can be implemented: I need to create a class which extends from the ConverterTag class or javax.faces.webapp.ConverterElTag class, which I did, but I also need to create ".tld" (tag library) file which defines the tag itself.
    The part about creating the ".tld" file and registring the new tag is what I'm not sure how to do.
    Does someone know how to do this?
    thank you

    Hi frank,
    that's a good document, and it explains how to make a custom converter. I already created the custom converter, it converts a number to any currency pattern. I know java already has a currency converter, but it doesn't support Rupee currency format, and I need that format.
    My converter works, but I would like to pass the pattern of the format through an attribute in a tag. Since f:converter doesn't seem to support that, I created a custom tag which uses my converter, and it enables me to pass a pattern to the converter.
    All of that works, but I need to be able to pass the pattern as an EL expression, and it's not evaluating the expression before passing it to the converter. It just passes the whole expression as a string. I'm thinking It may be something I'm doing wrong.
    this is the tag library definition file:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.2</tlib-version>
    <jsp-version>2.1</jsp-version>
    <short-name>custom</short-name>
    <uri>custom-currency-converter</uri>
    <description>
    custom currency custom tag library
    </description>
    <tag>
    <name>CurrencyConverter</name>
    <tag-class>
    converter.Tag.CurrencyConverterTag
    </tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <name>pattern</name>
    <type>java.util.String</type>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    Edited by: Abraham Ciokler on Feb 4, 2011 11:20 AM

  • How can I create a custom dock for all users?

    Hello,
    I would like to create a custom dock for everyone that uses a certain Mac. I have found a bunch of stuff, but it is outdated. Most of the tutorials are for 10.4 or 10.5. I am using 10.7.4 and I have found nothing regarding that. Can anyone point me in the right direction?
    Thanks in advance

    Hello,
    I am not sure how I wound-up in the server forum. I am using the desktop version of OS X 10.7.4.
    Thanks

  • Is it possible to create a custom IDOC status?

    Is it possible to create a custom idoc status on table TEDS1?
    I have looked through customising and cannot seem to find a way to create a new idoc status.
    Has anybody done this?

    Hello Chester..
    hope this link will be helpful,
    Re: IDOC status
    *********Please reward points ,if found useful

Maybe you are looking for