Af:ConvertDateTime how to control the year to start with 19xx or 20xx

Hi,
I am facing an issue. I have a af:inputDate component with af:convertDateTime with pattern MM/dd/yyyy and secondary pattern= MMddyyyy.
The issue is when the date is entered as 101147 the date gets converted to 10/11/2047 but the user wants it to be converted to 10/11/1947
Th requirement is if the two digits entered for year(yy) is less than the last two digits current year(2011) the year should be 20yy else it should be 19yy
example: if entered date is 052104 it should get converted to 05/21/2004
if entered date is 062198 it should get converted to06/21/1998
if the entered date is 07132009 it should be 07/13/2009 (no conversion here)
if the entered date is 07131986 it should be 07/13/1986 (no conversion here)
Kindly reply

This one is a tricky problem - a side-effect of JSF doing a lot of things automatically is that sometimes it does too much.
I don't have a great solution, but here's a couple of ideas:
(1) Try using multiple <h:form>s on your page (not nested one inside the other, but separate). Data will only get updated in the form that contains the button that got pressed.
(2) Use an intermediate model layer, and discard updates as appropriate.
Neither of these are beautiful solutions - the second is way ugly - but they might help. Long-range, I'd love to see something like "subforms" supported in JSF that can provide finer grained control over what gets processed (validations, model pushes, etc.) and what doesn't without resorting to the blunt hammer of multiple HTML forms.
I'm a little confused about "the model is updated with the value of the components whenever the form is submitted, and regardless of whether the value of the components has changed or not.", because JSF is checking the old value and using ".equals()" to see if its changed. Note, however, that it's not caching the old value across the request, but simply going back to the model on the subsequent request, which may (or may not) explain the behavior you're seeing.
-- Adam Winer (EG member)

Similar Messages

  • How to control the role in portal with SRM7.0

    HI ,My expert :
      I work in SRM 7.0  with EP.
      I want to control the ROle about the business partner manage .In the portal ,some user can edit the business partner  data ,however the other can only display the data .In this case ,I do not  how to control ? dispaly the role in SRM or portal ?
      BestRegards!
      Alex!

    hello
    authorizations are made on SRM; create roles z in SRM and subsequently assigned to a group role-z also. But the authorization in SRM.
    Best regards.
    José Luis

  • How to Control the Valves and Pump with Labview?

    I have started a new project where I have to control the valves operation through Labview 2009,using PXI 1031, NI 5105(Digitizer) and NI 6251(M-series DAQ).
    The valves I need to control using the labview are:
    a) Pressure Reducing Valve (open & close)
    b) Remote control Valve(On & Off) with in-built actuator
    c) Flow control valve(open, semi open, partially open, semi close, partially close, fully close), 1%, 2%, 3%..etc
    d)saftey valve (opening closing depending on increase in pressure from certian limit)
    I hav eto control
    a) Hydraulic pump operation with in built gear-box
    Please let me know, how should l develop the VI for all? How to get started?, any helpful links? If there is any example code?
    Its little urgent !

    If you are not familiar with LV, I would suggest you go through the tutorials. Then take the leap and figure out how to use Action Engines and State Machines (search any of the terms I used that don't understand, there are a zillion threads on them).
    Then...
    Sit down and write stand-alone testers for each of the widgets you are going to control monitor etc.
      These testers will give you an idea if they really work the way you think, their character, and will serve as a "Sanity Check" when you think you are going crazy  durring development.
    THen integrate the tester so they can all work at the same time. This will become a utility screen that will serve you well when maintaining the critter latter in its life.
    Only then...
    write out a complete set of state diagrams that describe what you plan to do (don't cheat! ) and walk through them in your head until you are cetain it will all work blah blah blah.
    This step is optional but highly recomened...
    Compose a detailed set of documemtns describing what you have in mind and post them here (include the images, they will get many mor readers) and let people  pick aprat your design.
    When you have a final design, use everything you learned along the way to be a kick-ass developer.
    Along the way post distinct well defined question on this site and as long as it looks like you are trying someone will probably reply and get you going again.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to find the year ago measure with out using time series functions

    hi all
    is there any way to find year ago sales with out using time series functions like ago
    Thanks
    Sreedhar

    Hello Madan,
    Thanks for the reply.
    It still doesn't consider the product into account.
    My columns are as below
    Prod Week End DATE Current Sales Prior Sales % Change
    A 12/4/2010 100 0
    A 12/11/2010 200 100
    A 12/18/2010 300 200
    B 12/4/2010 400 300(this value is not for prod B, i want this to b 0 aswell. But we get product A's last sale amount)
    Is there any way this can be done. I have tried evaluate,MSUM.
    I cannot build a time dimension as all I have is a view.
    Thanks,
    Deep

  • How to control the default infotype start date when executing an action?

    Dear all,
    I have a custom Infotype, which start date should always before the hiring date and so we want to leave the start date blank which creating the relative Infotype.
    I have already done the configuration in V_T582A such that the start date provides no default value when creating the new Infotype in PA30. However, the hiring date is still being defaulted when the Infotype when being created in an hiring action. Before I go to user exit programming, is there any place I can do relative configuration?
    Thanks,
    Steven

    Hi Chris,
    In our personnel action, IT0022 Education is included, and I've noticed that the system can provide no default start date even it is created through PA40. I have checked the dynamic action configuration that IT0022 is not included in the standard list, so I guess there may be a place to do such configuration.
    Steven

  • How to make the listener auto start with OS?

    Using: 10gR2 (10.2.0.3) RAC +ASM 64bit  &  11g Gateway (11.1.0.7) 64bit
    2 Node Cluster
    Platform: SUSE Linux Enterprise Server 8 (x86_64) (kernel: 2.6.5-7.276-smp)
    I have a two node cluster that uses a 10gR2 DB home. I have setup a 11g Gateway home to allow the 10gR2 Home to connect to an AS/400 system.
    The Heterogeneous connection works perfectly.
    The problem is that when I reboot the nodes the 11g Gateway listener doesn't startup with the OS.
    Question: How can I setup my OS to have the listener startup at system boot?
    Currently, I have to manually set ORACLE_SID, change to 11g Gateway home and start the listener.
    Thanks,
    (BLL)

    user10860953 wrote:
    My initial research (google) the subject of "oracle 10g adding listener clusterware" finds plenty of hits for adding instances to the cluster.
    I was less successful with finding information on adding a listener as a node app.
    Any suggestions on a reference article?
    The way to add applications is documented in the Admin Guide.
    Would not the netca (run under 11g) achieve the same?

  • How to control the measure based on the related dimension.

    Hi Experts,
    In order to improve performance, I have created three kinds of time tables in DB,such as Year .Month, Day.
    Then import them into the physical layer in RPD, and combine them into one dimension in BMM.
    Actually, it has three level fact related with three time tables,so they are also dragged into one fact in BMM,and one column will be corresponding with three column derived from different Fact table in physical layer.
    So I want to know how to control the measure based on the related dimension.
    For example:
    when users drag the Year,Sales column, it will come from Year Dimension and Year Fact Table.
    when users drag the Month,Sales column, it will come from Month Dimension and Month Fact Table.
    when users drag the Day,Sales column, it will come from Day Dimension and Day Fact Table.

    Hi,
    Create a dimension Hierarchy, with Year >> Month >> Day Levels and
    Next Double click on Year Table LTS >> click on Ocntetnt Tab >> set as Year
    same way for Month LTS and Day LTS.
    So now when you select year column then server canknow which LTS to hit and Hits Year LTS.
    Mark If Helpfu/correct
    Thanks.

  • How to control the options in Search popup of an LOV?

    I have a query panel which is based on a view criteria of a view object. One of the query item is a ComboListOfValues. I do not have control over the 'Search' window which opens when we click on the LOV inside the Query Panel. Basically, I want to control the width of the results table and I do not want the title('Search') for the dialog. Also, I want to hide the Advanced button. Is there any way to do it?

    Hi,
    Below is my code for the popup. What I am saying is, inside the popup I have a search parameter which in ComboListOfValues. On click on that LOV it will invoke a search popup on which we do not have control. How to control the properties in that search popup. I am not talking about initial popup(id=popup1) on which we have control and I have set all the properties. I am talking about a LOV search parameter inside the query panel(id = qryId2).
    <af:popup id="popup1" contentDelivery="lazyUncached"
    popupFetchListener="#{popUpBean.candSearchListener}">
    <af:dialog id="dialog1" type="cancel"
    title="Search Candidates"
    stretchChildren="first" contentWidth="920"
    contentHeight="480">
    <af:panelGroupLayout layout="vertical" id="pgl30">
    <af:panelHeader text="" id="ph2">
    <af:query id="qryId2" headerText=""
    disclosed="true"
    value="#{bindings.SearchCandVOCriteriaQuery.queryDescriptor}"
    model="#{bindings.SearchCandVOCriteriaQuery.queryModel}"
    queryListener="#{bindings.SearchCandVOCriteriaQuery.processQuery}"
    queryOperationListener="#{bindings.SearchCandVOCriteriaQuery.processQueryOperation}"
    resultComponentId="::resId2"
    modeChangeVisible="false"
    saveQueryMode="hidden"
    modeButtonPosition="footer"
    binding="#{popUpBean.searchCandQuery}"/>
    </af:panelHeader>
    <af:table value="#{bindings.SearchCandVO1.collectionModel}"
    var="row"
    rows="#{bindings.SearchCandVO1.rangeSize}"
    emptyText="#{bindings.SearchCandVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.SearchCandVO1.rangeSize}"
    rowBandingInterval="0"
    selectionListener="#{treeSelectionBean.candDetailsSelect}"
    rowSelection="single" id="resId2"
    inlineStyle="width:inherit;">
    <af:column sortProperty="CandidateId" sortable="true"
    headerText="Candidate Id" id="resId2c1" width="80">
    <af:commandLink text="#{row.CandidateId}" id="cl4"
    actionListener="#{treeSelectionBean.candSearchListener}">
    <af:setActionListener from="#{row.ClientId}"
    to="#{pageFlowScope.clientId}"/>
    <af:setActionListener from="#{row.PeopleId}"
    to="#{pageFlowScope.candPeopleId}"/>
    </af:commandLink>
    </af:column>
    <af:column sortProperty="Fullname" sortable="true"
    headerText="Candidate Name" id="resId2c2" width="160">
    <af:outputText value="#{row.Fullname}" id="ot42"/>
    </af:column>
    <af:column sortProperty="ClientName" sortable="true"
    headerText="Client Name" id="resId2c3" width="165">
    <af:outputText value="#{row.ClientName}" id="ot41"/>
    </af:column>
    <af:column sortProperty="InterviewName" sortable="true"
    headerText="Interview Name" id="resId2c4" width="215">
    <af:outputText value="#{row.InterviewName}"
    id="ot40"/>
    </af:column>
    <af:column sortProperty="InterviewDate" sortable="true"
    headerText="Interview Date" id="resId2c5" width="100">
    <af:outputText value="#{row.InterviewDate}"
    id="ot38">
    <af:convertDateTime pattern="#{bindings.SearchCandVO1.hints.InterviewDate.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="CandStatusName"
    sortable="true"
    headerText="Candidate Status" id="resId2c6" width="160">
    <af:outputText value="#{row.CandStatusName}"
    id="ot39"/>
    </af:column>
    </af:table>
    </af:panelGroupLayout>
    </af:dialog>
    </af:popup>
    Thanks!

  • How to change the year in a range of column dates to the new year?

    How to change the year in a range of column dates to the new year?

    Depends on the pattern of the dates. The last procedure will work for any pattern, or no pattern at all.
    For examples.the dates are assumed to be in column A, starting at A2
    Sequential dates?
    Enter first updated date in the first cell.
    Enter =A2+1 in cell A3. Copy the cell.
    Select A3 to the end of the list. Paste.
    With the cells still selected, Copy, then go Edit > Paste Values.
    Evenly spaced dates?
    Same procedure as above, but replace +1 in the formula with + and the number of days between dates in the list.
    Randomly spaced dates?
    Select cell B2. Press option-left arrow to insert a (temporary) column to the left of column B.
    Click on the empty cell B2 in the new column. Enter the formula below:
    =DATE(YEAR(A)+1,MONTH(A),DAY(A))
    Copy the cell, then select B2 - Bn where n is the last ow containing a date to be converted. Paste,
    With the cells still selected, Copy.
    Click on A2, then go Edit > Paste values.
    Click on the column B reference tab to select all of column B.
    Hover the mouse over the right end of the reference tab, and click the black triangle when it appears.
    Choose Delete Column from the menu that appears.
    Regards,
    Barry

  • How to control the data  in data selection

    Hi,
    how to control the data  .
    in the transfer structure I am having 10 fields and and the file which is to be loaded contains 7 fields only.where can I control  the other 3 fields and how .
    thanks in advance
    karna

    If your source file is flat file, add extra three fields with blank (just add field separator say comma for each extra field) and then load. It should be ok.
    Hope it helps..

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0
    and  How to control the flv file  add the play paus button and add seekbar.
    I have using to load the flv file following code
    var flvPlaceHolder1:MovieClip = new MovieClip();
    var vid1:Video = new Video(734, 408);
    flvPlaceHolder1.addChild(vid1);
    addChild(flvPlaceHolder1);
    flvPlaceHolder1.x = 1059;
    flvPlaceHolder1.y = 152;
    var nc1:NetConnection = new NetConnection();
    nc1.connect(null);
    var ns1:NetStream = new NetStream(nc1);
    vid1.attachNetStream(ns1);
    var listener1:Object = new Object();
    listener1.onMetaData = function(evt:Object):void {};
    ns1.client = listener1;
    ns1.play("GV-1600 TURNING.flv");
    ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
    function statusChanged1(ns1:NetStatusEvent):void
             trace(ns1.info.code);
            if (ns1.info.code == 'NetStream.Buffer.Empty')
                 trace('the video has ended');
                 removeChild(flvPlaceHolder1);
                 //trace('removeChild');
                gotoAndPlay(1786);
    then how to add the play,paus ,full screen button    and   seekbar,volumebar.

    I have to Create the flash presentation for our company product
    In this presentation the left  side the text animation are displayed then right side the our product video is displayed.
    In this presentation i need the following option :
    1, The first product video and animation is finished then the next product is played
    2, then the video displayed  (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
    3, then the playing video i control  it play, stop, paus button and volume bar, seek bar.
    4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
    I have finished first two steps 1 and 2
    the following are the screen short and code:-
    code :-
    var count=0;
    var flvPlaceHolder2:MovieClip = new MovieClip();   
    var vid2:Video = new Video(734, 408);
    flvPlaceHolder2.addChild(vid2);
    addChild(flvPlaceHolder2);
    flvPlaceHolder2.x = 1059;
    flvPlaceHolder2.y = 152;
    var nc2:NetConnection = new NetConnection();
    nc2.connect(null);
    var ns2:NetStream = new NetStream(nc2);
    vid2.attachNetStream(ns2);
    var listener2:Object = new Object();
    listener2.onMetaData = function(evt:Object):void {};
    ns2.client = listener2;
    ns2.play("GS-4000.flv");
    this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
    function BtnFadeIn2(event:Event):void
        if (this.currentFrame == 387)
            /*flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            trace('Screen size is changed');*/
            if(count==0)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            count++;
    ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
    function statusChanged2(ns2:NetStatusEvent):void
        trace(ns2.info.code);
        if (ns2.info.code == 'NetStream.Buffer.Empty')
                trace('the video has ended');
                 removeChild(flvPlaceHolder2);
                 //trace('removeChild');
                gotoAndPlay(433);
    flvPlaceHolder2.buttonMode=true;
    flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
    function home2(e:MouseEvent):void
        if(vid2.width==734 && vid2.height==408)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
        else
            flvPlaceHolder2.x = 1059;
            flvPlaceHolder2.y = 152;
            vid2.width=734;
            vid2.height=408;

  • How to control the size of live data in Coherence?

    How to control the size of live data in Coherence?
    See the following statement:
    Pause times increase as the amount of live data in the heap increases. We recommend not exceeding 70% live data in your heap. This includes primary data, backup data, indexes, and application data.
    --Excerpted from http://coherence.oracle.com/display/COH35UG/Best+Practices                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    In any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
    Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded.

  • How could control the scroll events in ALV OO?

    Hello experts!
    I'm programing a report, inside there is a field that need time of processing. I'm using ALV OO.
    I have thought that it could only calculate the field for the lines that visualize.
    How could control the scroll events to calculate the field of the visualized lines?
    I'm using CL_SALV_TABLE class and cl_salv_events_table to control the events, but there aren't any event to control the scroll.
    best regards!

    Hi Sriram,
    I did view the information that you was attaching, but this don't resolve my problem. With methods get_scroll_info_via_id and set_scroll_info_via_id, we can get and put information of selection and view rows in the screen but we don't control when the user click in the scroll for advance or to back down a page.
    I would like to refresh the data in ALV when the user view news rows.
    I want your genial ideas.
    Best regards!

  • How to control the size of SVG images in epub files?

    There is unfortunately no support for SVG files in InDesign.
    Most of my images in jpg convertes nicely, but the small ones do not.
    Therefore I want to use SVG files which I have created in Illustrator.
    But how do I set the size in the epub file? Right now, whatever I do, they come out too big and I don't know how to control the size.
    Is there a program, like Sigil or other, that can place the image for me - I'm no html wizard you see....

    In any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
    Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded.

  • How to control the looping time of the for loop in 10 microseconds in labview?

    I need to create a +/- 9 volt square wave with period of 20us using a D/A card (Not NI card). I can write command to the card using outport provide by Labview. Right now, I can generate square wave with 4ms period which is limited by the resolution of the wait until next ms icon I used inside the for loop. Could anyone tell me how to control the execution time of the for loop to about 10 us? Your help would be much appreciated.

    I'm not sure if this will hep, but this answer seems to answer this question
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000029410000&UCATEGORY_0=_30_%24_12_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=microsecond+resolution+1ms&USEARCHCONTEXT_QUESTION_S=0

Maybe you are looking for