Is there a Simple Way to Reformat  Database Text with Custom Converter?

When a database column contains a string, often the string may be stored in the database in a form that may not be suitable for viewing by the user. It is often interesting to show the user the string after it has been reformatted. Many things including phone numbers, product codes and various other application specific encodings fit into this category. The JSF Converter concept seems to be an ideal place to apply the reformatting via the application of a custom converter. In fact, many of the text books written on JSF refer to the JSF ability to support text reformatting using a custom converter. However, we have not been able to make it work in JSC2_1.
For example, when a CachedRowSet Table Data Provider is used in a JSC2 application to show tabular data from a database, text columns from the database are automatically bound to StaticText components. Unfortunately, if the developer creates a custom converter and attaches it to the StaticText component, the converter is never called when the object to be converted is already of type String. If the object to be converted is a Date, CLOB or any other type the custom converter will be called - but not for type String. Thus the text is presented to the user directly as stored in the database witout the desired reformatting. The OutputText component on the other hand does appear to support custom converters but there is no possibility within the JSC2 IDE to substitute the OutputText component for the StaticText component in the CachedRowSet Table Data Provider.
This situation appears to be inconsistent with the JSF specification. Does anyone know if this is a bug or a deliberate design decision or a misuse of the IDE on our part? Last question; has anyone come across a workaround?

Try using "Examine Document" to remove the OCR output.
Be well...

Similar Messages

  • Why isn't there a simpler way to initialize a subclass with its super class

    Let me explain my doubt with an example...
    public class Parent {
    �    public String parent;
    public class Child extends Parent{
    �    public String child;
    I've an instance of Parent p. I want to construct Child c, with the data in p.
    The only way that is provided by Java language seems to be, having a constructor in Child like
    public class Child extends Parent{
    �    public String child;
    �    public Child(Parent p){
    �    �    parent = p.parent;
    �    }
    The problem with this is there is lot of redundant assignment code.
    What I don't understand is why there is not a simpler way of doing this when a subclass is after all super class data + some other data(excuse me for not looking at the bahavior part of it)
    I'm looking for something as simple as Child c = p, which I know is wrong and know the reasons too.
    Yes, we can wrap Child over Parent to do this, but it necessitates repeating all the methods in Parent.
    Why is the language writers didn't provide a simple way of doing this? I should be missing something here...I'm just searching for an explanation. May be I'm asking a dumb question, but this bugs me a lot...
    Regards,
    Kothapalli.

    To answer DrClap, I'm demanding it now :-). Let me
    not suggest something that Mr.Gosling didn't think of;
    he should be having some reasons in not providing it.Because it's essentially impossible in the general case. One of the reasons you may be extending a class is to add new invariants to the superclass.
    eg- extend java.awt.Rectangle by BoundedRectangle - extra invariant that none of its corner points may be less than 0 or more than 100 in any dimension. (The rectangle must be entirely contained in the area (0,0)-(100,100))
    What would happen if you try to create a BoundedRectangle from a rectangle representing (50,50)-(150,150)? Complete invariant breakdown, with no generic way to handle it, or even recognise it.
    Actually, BIJ and sgabie are asking for it. Provide an
    automatic copy constructor. Every object should have
    an implicit copy constructor defined. From any
    subclass, I should be able to invoke
    super(parentClass). From the subclass, we can invoke
    super(parentClass) first and then go on to initialize the
    subclass data.
    I really don't know the implementation issues of this,
    but what I'm looking for is something like this. I'm just
    curious to know the implementation issues.Implementation issue #1: Classes that should not, under any circumstane, be copied.
    * eg 1- Singleton objects. If there's an automatic copy constructor, then multiple singletons can be created, making them essentially useless. This by extension kills the Typesafe Enum pattern also.
    * eg 2- Objects with extra information, such as java.sql.Connection - if you copied this, would the copy be using the same socket connection, or would another connection be required? What happens if opening another connection, and the JDBC driver requires the password to be entered for every new connection? If the wrong password is entered, what happens to the newly creating connection?
    Implementation issue #2: Copying implementation?
    * Already mentioned by RPWithey. The only guaranteed way to perform the copy would be with a shallow copy, which may end up breaking things.
    Why can't you write the copy constructor yourself? If it's a special case, it only has to be done once. If it's a recurring case, you could write a code generation tool to write them for you, along with most of the rest of the class.

  • To reinstall Acrobat 8 Upgrade I need to present previous versions e.g. 3 and then 4 and then 5 Upgrade every time. Is there no simpler way to validate my ownership?

    To reinstall Acrobat 8 Upgrade I need to present previous versions e.g. 3 and then 4 and then 5 Upgrade every time. Is there no simpler way to validate my ownership?
    I had two laptops stolen and the reinstall is a real pain. This also applies to reformats and changeovers to Windows 7, etcetera.

    Windows 7? Then don't waste your life minutes fumbling with an Acrobat 8 - Windows 7 combination.
    If you are to be using Win 7 you'll need the current release of Acrobat (XI). "X" will function but it is no longer marketed by Adobe.
    Be well...

  • I have two apple accounts and one of which has my music on. I would like to move this music to the other account. Is there a simple way of doing this?

    I have two apple accounts and one of which has my music on. I would like to move this music to the other account. Is there a simple way of doing this?

    There is currently no way to merge accounts.  The best option is to pick one, and use it consistantly.
    HTH.

  • I just got new ipad mini....I want to delete all of the music that was synced from my itunes account.  I have went through and deleted some songs one by one but some have a cloud icon with a red arrow on them.....is there a simple way just to delete them?

    I just got new ipad mini....I want to delete all of the music that was synced from my itunes account.  I have went through and deleted some songs one by one but some have a cloud icon with a red arrow on them.....is there a simple way just to delete them?

    Yes there is. Those songs are not actually on your iPad. They are in iCloud ready for download if you choose to do so. If you want to remove them go to Settings>iTunes & App Store>Show All>Music>Off. You can also do this in Settings>Music>Show All Music>Off.

  • Is there a simple way to retrieve the data from a resultset using JavaBean?

    I have a result set from a select * from users where userid = xxx statement. However, at the moment I have had to hard code the remainder of the code to get the data from each column as I need the column name as well as its data.
    I had read somewhere using java beans and reflection it is easier. But i do not know know how.
    Is there a simple way to retrieve the data from a result set ?
    thanks in advance-
    kg

    Well, it is not really simple. But there are Open Source components to simplify it for you. See e.g http://www.must.de/Jacompe.htm - de.must.dataobj.DataObject and its subclasses. Feel free to contact me if you have any questions: [email protected]

  • Is there any simple way to close a group of PO's?

    Hello All,
    I was looking an answer for my question on forum but didn't found anything which could help me to solve my issue.
    I would like to close a group of PO's in some period of dates. Is there any simple way to do this? I mean transaction for example, which will let me to choose company number, period of dates  or range of PO numbers and close them by one tick (one action).
    Thank you in advance for any support from your site.
    Regards,
    Kamil

    Kamil,
    Though I have not used this functionality, can you check whether you can use this functionality for mass change?
    Upload and Download of Purchasing Documents
    http://help.sap.com/saphelp_srm70/helpdata/en/09/1f42188473402a890183fd1b7c6082/frameset.htm
    Using this function, you can download purchasing documents as a file to your PC, process them locally, and then upload the changed documents to the SAP Supplier Relationship Management (SAP SRM) system. You can download the following purchasing documents :
    Features:
    The upload/download supports the following functions and possible uses:
    - Cross-Document File Structure
    You can display and process the data in a standard tabular file structure for the documents named above. The file structure assigns a unique technical ID to each data field in a metadata area.
    - Process Document Data Offline and Retain
    You can change or delete existing data, add new data, and transfer all document data, for example, customer fields.
    - Process Large Documents
    This function simplifies the creation of documents with numerous items, and simplifies mass changes to large documents; for example, you can download a document with only one item, and add multiple items to it offline.
    Background processing occurs in the case of very large documents.
    Regards,
    Sandeep

  • IS THERE ANY SIMPLE WAY TO RETURN SPEED PERFORMANCE TO FACTORY SPEED AFTER ABOUT 3 YEARS OF RELATIVELY STANDARD USE?

    Everyone is often so quick to bash all these 'cleaning' utilities but rarely give any solutions.
    There's a lot of critiques and endless lists of what NOT to do to avoid performance problems.
    My Powerbook is 3 years old. It runs like molasses... SLOW.
    I'm not a computer geek, but I'm smart and understand quite a bit more than a newbie.
    Do I need a degree in computer engineering to fix/speed up my mac?
    Yes, I know, the cleaning utilities suck. But is it really true of all of them?
    I'm not totally convinced because there seems to be such a huge market for them.
    Sure, there's a huge market for bottled water too, so maybe they are just useless/marketing crap, but I really want to return to my original speed performance quickly and can't seem to find out if it's possible with a utility.
    I'm not willing to sit down for 3 hours and study line by line b.s. about how to fix it.
    I have no problem if it's not fixable. I've always assumed operating systems outgrow their hardware's capacity to keep up, and sell my old one for a new one, no prob.
    I don't care, really, but again, I'm curious if there is any quick, easy, user-friendly utility or method that I can use to return the speed performance I had as recently as a year ago? (I'd be satisfied with that).
    Anyone willing to bite on that? Anyone willing to not critique, complain, tell me what NOT to do and actually know a solution?
    IS THERE ANY SIMPLE WAY TO RETURN SPEED PERFORMANCE BACK TO (OR CLOSE TO) ORIGINAL FACTORY SPEED AFTER ABOUT 3 YEARS OF RELATIVELY STANDARD USE?
    The only thing I may have done outside of the norm was some video editing, but very little.

    Look for solutions here:
    https://discussions.apple.com/docs/DOC-3521
    https://discussions.apple.com/docs/DOC-3353
    Ciao.

  • Is there any simple way to create ods files (OpenOffice Calc)?

    Is there any simple way to create ods files (OpenOffice Calc) using ResultSet (from java.sql)?

    Mabe, you can create CVS files (plain text) Ej...
    ====test.cvs=====
    1, "aaa"
    2, "bbb"
    3, "ccc"
    ===============
    Using a "BufferedWriter"

  • Just bought a new MacBook Pro. Would like to transfer my Waves plugins from My old Hard Drive into my new MBP. IS there s simple way to do this?

    Just bought a new MacBook Pro. Would like to transfer my Waves plugins from My old Hard Drive into my new MBP. Is there a simple way to do this?

    Hi
    The easiest and most reliable way would be to download the installer from Waves and re-install.
    CCT

  • I've created a prproj file and want to create a master DVD.  Is there a simple way to do this?

    I've created a prproj file and want to create a master DVD. Is there a simple way to do this?

    I'm not sure I would call disk authoring a 'simple' process.  Unless it's a very basic disk, or course, with but a single timeline and no menus.  But the kind of disk we're using to seeing from Hollywood is anything but simple to create, and so not so simple to explain.
    Might be time for some research.

  • HT3697 Is there a simple way to create a borderless PDF from Keynote.

    Is there a simple way to create a "borderless" PDF using Keynote slides?
    When I create a PDF, each slide appears separately with a border around it.
    I am a relatively new keynote and mac user.
    I am using Keynote version 6.2

    I got the same result.
    I'm trying to create what looks like a single document that viewers can scroll through.
    I done quite a bit of checking and it seems that Keynote used to give you the ability to crop the PDF which, if I understand what they are talking about, would make it look like one big document and not a series of slides.
    I read about using terminal commands (?) which are way beyond my skill level.
    Also, I could buy Adobe Acrobat which, from what I've read, would also work. I'm not fond of making that investment.
    Right now, I'm stuck!
    I need to create a "long form sales letter" and I'm starting to think that I'm using the wrong program.
    Thank you very much for your help and any other suggestions you might have.

  • Simple way to create rollover text?

    I want to ask visitors on my page to enable pop-ups if they click on one of my quicktimes (to decrease load times, I use pop-up windows on my video-heavy pages). I want the text to appear over the still "poster" image of the quicktime when they mouseover it. Is there a simple way to do text rollover? Or do I have to make it into an image (create another jpeg for each "poster" with the text written on it)?
    Here's the site: http://web.me.com/roncutz/roncutz/theatricaltvspots.html
    Thanks in advance.

    Heres' a solution that takes the form into acount :
    <iframe style="margin: 0px auto"
    src="../../../roncutz/" width="322" height="240" frameborder="0" scrolling="no">
    </iframe>
    <script language="JavaScript" type="text/javascript">
    <!--
    function open_win()
    window.open("http://homepage.mac.com/roncutz/.Public/MonstersVsAliens.m4v","_blank","
    toolbar=no, location=yes, directories=no, status=no,
    menubar=no, scrollbars=no, resizable=yes,
    copyhistory=yes, width=480, height=270") }
    // -->
    </script>
    <form style="position: absolute; left: 45%; margin-top: -35px;"><input type="button" value="PLAY">
    </form>
    It would be safer to use a webpage to display the popup movie. A MIME file error exist on the MobileMe server when you either upload your movie from the Finder to the Sites folder on MobileMe or if you upload with Cyberduck.
    The movie will download in Safari instead of being displayed.
    http://discussions.apple.com/message.jspa?messageID=11150467&tstart=0
    Here's a solution : http://www.wyodor.net/MoreEmbed/embedmedia.html
    Click the link in the sentence : +Here's a basic sample page with shaded background you can use for testing.+
    And click the link in the sentence : +Click to open a window with the pop-up code.+

  • Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?

    Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?
    Thanks!
    -Adrian

    the old apps are on my computer but they have had upgrades since they were put on the ipod originally.  you think you would get a warning about this when you restored. I was not worried about losing the progress of the apps but i would have been worried about the app it self!!!!!

  • Is there a fast way to wrap unstructured text into [Para] tags?

    I'm trying out my new Frame 12 by trying to produce an ebook in several formats. I'm using the out-of-copyright Agatha Christie's A MYSTERIOUS AFFAIR AT STYLES.
    Is there a fast way to wrap each paragraph with a [Para] tag?
    Thanks in advance.

    Wow, Russ, leave it to an FDK programmer to want to write a script or plugin to solve every problem! And FM does indeed have native functionality that addresses this situation. The conversion tables (see the Structured Application Developer Reference) that you mention in passing were designed to handle exactly this situation. Except that a conversion table operates on an unstructured rather than a partially structured document. So, all TdeV1 need do is:
    1. Create a new document from the chosen sample.
    2. Delete all content, including the root element.
    3. Paste the original, unstructured paragraphs.
    4. Use StructureTools > Generate Conversion Table to create a new coversion table.
    5. Complete the table as follows:
    Wrap this object or object
    In this element
    With this qualifier
    P:
    Para
    Para+
    Section
    Section
    Chapter
    6. Save the conversion table but leave it open.
    7. In the original document, use StructureTools > Utiltities > Structure Current Document.
    8. Create the needed Head elements for the Chapter and Section.
    Another alternative, available since FM 11, is Smart Paste. Recall that Smart Paste allows the user to copy material from web pages and Microsoft Office products such as Word and paste it into FM. Yes, in general, there is a significant amount of setup to prepare for using Smart Paste. However, Smart Paste is supported out of the box for DITA. So TdeV1 could do the following:
    1. If the content originated in Word, open the Word document and copy the paragraphs to the clipboard.
    2. Use DITA > New DITA File > New <topic> to create a new DITA document.
    3. Click in the <body> element to set an insertion point within that element.
    4. Use Edit > Smart Paste. FM will paste the content, converting each paragraph to a <p>.
    5. Copy the resulting <p> elements to the clipboard.
    6. Paste the <p> elements into the actual document.
    7. Select the <p> elements and use the Element Catalog (or Ctrl-3 to bring up the Smart Catalog for changing elements) to change them to <Para> elements.
    However the structured document is created, while this sample template is appropriate for initial experimentation with structured FM, it is intended for technical material and not optimal for fiction. To get the most out of a structured document for production work, it's almost always necessary to define elements and attributes appropriate to the particular project.
        --Lynne

Maybe you are looking for