JSP, BC4j: Date Conversion

Hi,
In my JSP application, I have a form that is used to inert data. I have used the input data tag to allow users to enter date for a particular field. The date appears in the format "2000-01-31". How do I convert it to the format "31-JAN-01"? I used the following code but it gives me the result as "31-Jan-01" instead of "31-JAN-01":
<%
SimpleDateFormat myFormat = new SimpleDateFormat();
SimpleDateFormat myFormat2 = new SimpleDateFormat();
myFormat.applyPattern("yyyy-MM-dd");
myFormat2.applyPattern("dd-MMM-yy");
String tempDisplayDate = new String (myFormat2.format(myFormat.parse("2000-01-31")));
%>
Thanks

".toUpperCase()" on that tempDisplayDate, either during or after creation?

Similar Messages

  • 9i;JSP; BC4J Data Tags...

    Hi,
    What's different between these two tags in BC4J Data Tags pallet:
    <jbo:InputText> & <jbo:InputRender>

    Hello,
    Here is the difference (from the online documentation)
    <jbo: InputText> Inserts a text-input field form element into
    your page.
    JSP Syntax <jbo:InputText
    datasource="datasourceId" dataitem="attributename"
    [ cols=numberCharactersWide ]/>
    Examples
    Order Id:<jbo:InputText datasource="Orders" dataitem="Id" />
    Description The input render converts all values to a String for
    storage in the database.
    <jbo: InputRender>
    Inserts a input form element that allows user to edit data of
    all types, including complex object types.
    JSP Syntax
    <jbo:InputRender
    datasource="datasourceId"
    dataitem="attributename"/>
    Examples
    <form enctype="multipart/form-data"
    NAME="iForm" METHOD="POST"
    ACTION="Submit_AddImage.jsp" >
    Image Id:<jbo:InputRender datasource="ds1" dataitem="Id" />
    Image File:<jbo:InputRender datasource="ds1"
    dataitem="Image" /><input type="submit" /> </form>
    Description
    Input form uses a field render specific to the object type.
    Hope this helps. You can search on the online documentation for
    description about this and other components.
    Thanks,
    -Kishore
    JDev Team

  • Jsp,bc4j,Data web Bean , error : NO ROWS AVAILABLE FOR EDITING

    HI
    I'm developping a jsp application based on Bc4j. when trying to insert a new row with missing fields which must be not null,
    in order to be able to edit the row and correct the non seized fields, I display the edit page and it works for several views. but this time when editing fields and submitting the edit form an error is raised with the message no rows available for editing.
    the particularity for these views(which causes the error) is that are details for a view which is detail for an other.
    can someone please suggest some solution for such a problem
    thanks in advance
    Ghassen
    null

    ghassen
    this is a typicall error that occurs when trying to execute the Row data tag with action "Update" and there is not row obtained through the rowkeyparam (normally MyRowKey url parameter passed from the Edit page). I don4t have sufficient information to give you an exact solution.
    I don4t understand all your escenario, you spoke about "Insert new row with missing values in required fields", but if you don4t specify a right value to that fields, the insert fail.
    Then you display the Edit page to edit that just inserted row, to correct (specify?) the values of that fields. The error occurs in the EditSubmit page.
    The EditSubmit page execute de Row data tag, according to the implementation of Rowtag, first recover the row reference (from rowkeyparam url parameter) and then, if that row reference is null, throws the "No rows available for editing" Runtime Exception. This means that the datasource used in your EditSubmit page not include that RowKey reference (obtained from Edit page as Url parameter).
    HTH
    Pepe

  • Jdev3.2,Jsp,BC4J, Data Tags : Unexpected exception Caught

    I wrote an jsp aplication, with data tags based on BC4J module.
    when I run the application the first time, everything is Ok. the second Time an Unexpected exception is thrown.
    the first module displayed in the error message is
    msg=null oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
    I thought that the problem is the module so
    I runned the application module in the BC4J tester tool every thing is ok
    I created a new aplication module but without any result.
    I created a jsp Application based on the same application module but using the datawebbean and everything is ok also.
    and here is a code that let the exception thrown.
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule configname="test1.Test1Module.Test1ModuleLocal" id="Test1Module" username="wns" password="offline" />
    <jbo:DataSource id="cat" appid="Test1Module" viewobject="TfixcategoryView" ></jbo:DataSource>
    <select NAME="categoryList" size="10" multiple="yes">
    <jbo:RowsetIterate datasource="cat" >
    <option VALUE="<jbo:ShowValue datasource="cat" dataitem="Idcategory" ></jbo:ShowValue>"><jbo:ShowValue datasource="cat" dataitem="Dsnmcategory" ></jbo:ShowValue> </option>
    </jbo:RowsetIterate>
    </select>
    can some help me to find a solution.
    cheers
    Ghassen

    hi Juan
    I didn't copy all the code source. but the releasepageresources tag is there. and I have only put this code because when I delete it no exception is thrown so the problem is there( in data tags).
    more than this when this exception is thrown I have only to relog to a new windows 2000 session and no exception is thrown.
    cheers
    Ghassen
    null

  • 9i;JSP; BC4J Data Tags; NavigationBar?

    I added following jbo tag but commit & rollback icons are
    disabled. How could i enable them?
    <jbo:DataWebBean id="masterNavBar" datasource="dsWo"
    wbclass="oracle.jbo.html.databeans.NavigatorBar"
    </jbo:DataWebBean>Basically i need a Navigation Bar data tag to enable my Form to
    Commit, rollback, insert, delete, previous record, and next
    record.

    Ali,
    Are you using 3.2.x or JDeveloper9i?
    Gary
    JDev Team

  • HOW TO: Create a JSP Edit Record Form Using BC4J Data Tags

    This is a JDeveloper Tech Note found on the OTN Documentation page. This note describes the use of the BC4J data tags to create row edit/submit JSP pages. Here is the link:
    http://technet.oracle.com/docs/products/jdev/technotes/datatag_input/Edit_Form.html

    Are you using Java 1.4.* ?
    Use JFormattedTextField.
    import javax.swing.*;
    import java.text.*;
    import java.awt.*;
    import java.util.*;
    public class DateExample
        public static void main( String [] args )
          // Here's what you're interested in...
          DateFormat dateFormat = new SimpleDateFormat( "MM/dd/yyyy" );
          JFormattedTextField field = new JFormattedTextField( dateFormat );
          field.setColumns( 11 );
          field.setText( dateFormat.format(new Date()) );
          JPanel panel = new JPanel();
          panel.add( field );
          panel.add( new JButton( "Hey" ) );
          JFrame f = new JFrame();
          f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
          f.getContentPane().add( panel );
          f.pack();
          f.setVisible( true );
    }It also works with other types of Format objects (ex. Currency, Decimal, etc.)

  • HOW TO: Create a JSP Insert Record Form Using BC4J Data Tags

    This is a JDeveloper Tech Note found on the OTN Documentation page. This note describes the use of the BC4J data tags to create insert/submit JSP pages. Here is a link:
    http://technet.oracle.com/docs/products/jdev/technotes/datatag_input/Insert_Form.html

    You can loop throgh query records whit an implicit cursor (which automatically manages the open cursor, fetch and next record):
      for rec in (select intime,outtime,barcode,attend_date from dail_att; )
      loop
           t_in :=rec.intime;
           t_out :=rec.outtime;
           t_code :=rec.barcode;
           t_date := attend_date;
             PUT YOUR CODE HERE ... (if ..then... elsif... logic)
             you can avoid setting variables 'cause you can directly use the implicit cursor variables: rec.intime etc.
      end loop;
    END;Anyway, I suggest you to check the where condition of your block ... because if not all data are retrieved there should be a problem in your query ... so even the cursor (if based on very same query) will return less data than expected.
    Luca

  • Adf-Struts/JSP/BC4J- and setting date fields from jsp

    Hi,
    I'm working with the new ADF Frameworks (JDev 9.0.5.1) and ran into some questions regarding exception handling using BC4J, Struts and JSPs.
    I have a DATE column in database and an entity and VO with a datefield with type oracle.jbo.domain.Date.
    My JSP shows a textfield and the user should enter a valid date. Everything fine, until date is of wrong format or contains illegal characters...
    Problem:
    ADF tries to do a setAttribute on the datefield in VO row which expects a parameter with type oracle.jbo.domain.Date. When the user entered e.g. "NiceWeather" as date, I get an IIlegalArgumentException while converting to the correct Date format. This exception isn't thrown by bc4j as AttrValException and therefore my JSP renders a global error instead of a message directly behind the date field.
    I tried to validate the datefield in my DataForm and in my Action in the validateModelUpdates() method, but with no fitting solution.
    Any ideas how to validate a datefield with adf/struts/jsp/bc4j?
    Thanks for your help!
    Torsten.

    Torsen - In the first instance I'd recommed that you try and handle it declaritively using the Struts Validator Framework . See http://otn.oracle.com/products/jdev/howtos/10g/StrutsValidator/struts_validator_howto.html
    There is a section in there on how to use the validator with ADF databound pages and you can check the format the user enters via generated JavaScript.
    Also check out the matching sample project:
    http://otn.oracle.com/sample_code/products/jdev/10g/ADFandStrutsValidator.zip - this has a data field check on it as well

  • JSP/BC4J app: How to get view object row data into a scriplet variable?

    I have a JSP application using BC4J data tags. Within a rowsetiterate tag, how can I get the data value of an attribute for the current row into a scriplet variable?
    Thanks,
    Steve

    Using the <jbo:Row> tag like this:
      <jbo:RowsetIterate .... >
        <%--
         | Establish a scriptable variable "curRow" for the current row
         +-->
        <jbo:Row id="curRow" action="current"/>
        <%
          String foo = (String)curRow.getAttribute("YourAttrName");
        %>

  • How to share JHS BC4J data model with  JClient application ?

    In our project, some application system using JHS Struts/JSP solution but others which need rich UI application prepare to adapt JClient solution, so whether we can share JHS BC4J data model with JClient application ?

    Ting Rung,
    The JClient application will communicate with your application module. So all logic in you app module, EO's and VO's can be resued by JClient. Logic in Jheadstart handlers cannot be reused.
    Steven Davelaar,
    jHeadstart Team.

  • Creating rows Using BC4J Data Tags

    Hi!
    I want to create rows using BC4J data tags.
    I have 2 jsp pages: one containig forms and one to insert data.
    Is it possible to insert new rows into 2 or more tables?
    How can I differ the attributes to one table and to another?
    How can I do this?
    Thanks!

    The path is:
    Select "File/New" in the menu.
    Select "BC4J JSP" in the gallery.
    Select "Browse & Edit Form" wizard.
    This is in JDeveloper 9.0.2.
    Charles.

  • GL Data Conversion from Legacy to Oracle EBS

    Hi All,
    I am tasked with converting legacy data into GL. I have worked on other conversions like supplier, AR and AP conversions but never worked on GL conversion, so I don't know how and where to start, what are the pre-requisites for entering data into gl_interface table how to ensure that data is correct in the .csv file etc.
    Kindly request you all to guide me in right direction. Hope to hear from you all very soon!!! :)
    Regards

    Hi,
    When you talk about GL-Data it is the trial balance to be loaded from legacy to oracle applications.
    You can use Web-ADI to upload it ,the check list are
    The balance for each account comibnation in the legacy system to be mapped to GL-Oracle code combination balance
    With respect to open AR, AP Invoices if the invoices are converted using a control account for migration in GL then
    the the balance transfered from AP,AR need not be reversed in GL from the source receivables and payables.
    In case if the same account combination are for migrating the balances from AP,AR to GL ..Then the balances transferred from AP,AR should be reversed ..so that it does not affect the TB-GL-Balance
    Finally ensure that the balance for the TB-tallys with your legacy system and upload it using Web-ADI ,import and
    review and post it.
    Hope this points helps your GL-Data conversion.
    Regards,
    Ramaa

  • Data conversion strategy for new SOB

    Dear Viewers
    on 11.5.10
    We are creating a new SOB with a change in currency from Feb-11 as this is the requirement
    For the same, we need to do data conversion.
    I have a confusion for Purchase Orders and Sales Orders
    Purchase Orders:
    Open purchase orders will be converted, means the unfulfilled PO`s i.e the ones not received and are fully open.
    The PO`s which have been recieved but not delivered, Requested the users to clear the intransit receipts.
    The PO's which are partially received, what to be done for them?
    If a PO is fully received and Delivered will not me converted to the new SOB as its not an open PO
    but If invoice comes after Feb-11, than how the matching will be done?
    What if a return has to be made moving forward in FEB-11 under new SOB
    Sales Orders:
    Open sales orders will be converted, that is the ones that have been entered and not yet booked.
    Users have been requested to clear off the Sales order lines which are already pick confirmed but not yet shipped, hence they will be shipped and interfaced to AR
    For the Sales orders that have been booked, those lines that are not yet processed further will also be converted.
    Now what if a receipt comes after feb 11, how to handle this as the sales order wiould not have been converted?
    Please give your advise on the data migration strategy for PO`s and SO's.
    Please do add any point that may have been missed by me
    Appreciate your help
    Thanks
    Emm

    Hi David,
    for master data conversion you can use LSMW and the RE-FX BAPIs. (please refer to SAP note  [782947|https://service.sap.com/sap/support/notes/782947] ).
    Regards, Franz

  • Data conversion for new sob

    Dear Viewers
    on 11.5.10
    We are creating a new SOB with a change in currency from Feb-11 as this is the requirement
    For the same, we need to do data conversion.
    I have a confusion for Purchase Orders and Sales Orders
    Purchase Orders:
    Open purchase orders will be converted, means the unfulfilled PO`s i.e the ones not received and are fully open.
    The PO`s which have been recieved but not delivered, Requested the users to clear the intransit receipts.
    The PO's which are partially received, what to be done for them?
    If a PO is fully received and Delivered will not me converted to the new SOB as its not an open PO
    but If invoice comes after Feb-11, than how the matching will be done?
    What if a return has to be made moving forward in FEB-11 under new SOB
    Sales Orders:
    Open sales orders will be converted, that is the ones that have been entered and not yet booked.
    Users have been requested to clear off the Sales order lines which are already pick confirmed but not yet shipped, hence they will be shipped and interfaced to AR
    For the Sales orders that have been booked, those lines that are not yet processed further will also be converted.
    Now what if a receipt comes after feb 11, how to handle this as the sales order wiould not have been converted?
    Please give your advise on the data migration strategy for PO`s and SO's.
    Please do add any point that may have been missed by me
    Appreciate your help
    Thanks
    Emm

    emm wrote:
    Purchase Orders:
    Open purchase orders will be converted, means the unfulfilled PO`s i.e the ones not received and are fully open.
    The PO`s which have been recieved but not delivered, Requested the users to clear the intransit receipts.
    The PO's which are partially received, what to be done for them?
    If a PO is fully received and Delivered will not me converted to the new SOB as its not an open PO
    but If invoice comes after Feb-11, than how the matching will be done? <br>Business needs to take a decision whether they are fine with matching the POs manually (i.e. referring the documents and verify), in this case you may capture the PO information in a DFF in the Invoice distribution. Otherwise if it has to be converted identifying the POs under this scenario, you may consider converting those maintaining receipt close tolerance as 100% and matching type as 2 -way (again business approval needed to handle audit issues) in order to avoid the receipts/delivery conversion etc.<br>
    What if a return has to be made moving forward in FEB-11 under new SOB<br>Ideally returns can be done using Miscellaneous/Account Alias Issues specifying the appropriate transaction reasons to clarify the scenario.<br>

  • Question about BC4J data tags, Oracle sessions and Locking!

    Hi ,
    I have seen numerous examples of JSPs using data tags and in all the examples the data tag for the application module has the "username" and "password" harcoded in it.
    My questions are:
    1) For a stateful application should we be including the username and password in every JSP page. I personally believe that we should not.
    2) If we have a username and password in every JSP page will it not start a new ORACLE user session and if so will it not cause locking problems?
    3) If we don't hard code the username and password in every JSP page, will it reuse the same ORACLE session ?
    4) How do we avoid locking problems when we use data tags?
    5)I can understand the inclusion of username and password in every JSP page if it is a stateless application but again Is there a way we can avoid hardcoding the username and password in every single page?
    I would appreciate if some one can let me know if any of my assumptions are incorrect.
    JDeveloper Team/Juan any advice?

    The username and password are optional. They can be provided via the connections.properties file. The multple entries for username and password don't mean that separate connection are made. The first time the ApplicationModule tag is encountered, your application instance is created. If you are running in reserved mode (look at your releasePageResources tag) the application instance is kept until your Http session times out. If you are running in Stateful or Stateless mode, you application instance is returned to the application pool and retrieved the next time you need an instance. Please refer to the application pool documentation and to the source in oracle\jbo\common\ampool provided in jbohtmlsrc.zip.

Maybe you are looking for

  • Unable to deploy example 'banking' application on weblogic, please help...

    Hi, I have downloaded the example 'banking.zip' and have installed it. I have followed all given steps in the tutorial, but I am unable to see the login page. I am also not able to see the ejb and web application descriptor file from the admin consol

  • Is it possible to see 'EXIF' data in video footage?

    Is it possible to look at a video file and see what camera settings were used, which lenses were used. I believe I shot a scene with a 400mm lens and 1.4 TC extender but am not sure. Wish I could look back at the file and see that information like I

  • Adobe Story Desktop App - unable to get past login

    This problem is not present on all my home computers or laptops which leads me to believe this will be an issue with my computer. On my 2012 iMac I was recently able to launch, login and work inside Adobe Story Desktop. Last night I went to launch th

  • How do i get the songs with the clouds and down pointing arrow off of my phone

    When I downloaded iOS 7 a bunch of my sisters disney songs got in my music on my phone and it plays when I put on shuffle and I never downloaded them. I pressed the cloud and it downloaded one of the songs to my phone. When I side swiped it the delet

  • Call for more example scripts

    Can someone post the following examples: 1. Loop through all paragraphs in a document and if the paragraph has a specific paragraph tag (e.g., Heading 1) change one aspect of the paragraph, for example, the text color. (This avoids the need to change