JSF Calendar Component Selection Issue

Hi,
I have design a JSF Page using two calendar components, ie
Start Date
End Date
Both of these dates field allow user input but only one of them are on compulsory basis.
Start Date is a compulsory , whereas End Date is not. What I notice was if the user did not select the End Date , upon clicking submit button, no action would be follow , if the End date was somehow selected , the JSF page perform normally.
My question is how to resolve this issue as sometime it is not practical to preselect an End date in advance especially if a big project is undertaken, the logic here is , upon completion , the user could either input the date manually or via programme auto update.
Could anyone provide any hints and solution please
Thank

Hi,
I have design a JSF Page using two calendar
components, ie
Start Date
End Date
Both of these dates field allow user input but only
one of them are on compulsory basis.
Start Date is a compulsory , whereas End Date is
not. What I notice was if the user did not select
the End Date , upon clicking submit button, no
action would be follow , if the End date was
somehow selected , the JSF page perform normally.
My question is how to resolve this issue as sometime
it is not practical to preselect an End date in
advance especially if a big project is undertaken,
the logic here is , upon completion , the user could
either input the date manually or via programme auto
update.
Could anyone provide any hints and solution please
ThankBy "compulsory" I'm guessing you mean the "required" attribute has been set. I think one problem with the built-in calendar is that there isn't a way to specify the value "no-date-was-selected". Maybe you can simulate it by initially setting the value to the maximum date and telling the user to igore this value. Not a good solution. There is a newer popup calendar that I have been working on that has been checked into the bpcatalog tree on java.net which fixes these problems. Unfortunately, it needs to be packaged up as a complib and downloadable some where. I hope to do this soon.
-Edwin
http://blogs.sun.com/edwingo/

Similar Messages

  • JSF Calendar Component JS error

    Hi everyone,
    I have problem with JSF Calendar component. JSP version is 1.2 so we are using com.sun.rave.web.ui.component.Calendar class.
    When HTML code is generated some id missing. For example:
    JavaScript tries to find subForm:startCalendar:_datePicker:row5, but there is only subForm:startCalendar:_datePicker:row4.
    This cause JS error at line 249 in calendar.js:
    this.lastRow = document.getElementById(rowId);
    this.lastRow.style.display = "none"; //error is here this.lastRow is nullAfter few reloads and manual date change calendar seem to work fine for a while, but it can stop at anytime. There are no errors in Tomcat logs (we are using Tomcat 5.5, but we have same error with Glassfish 2).
    Here is JSP code:
    <ui:calendar binding="#{Index.startCalendar}" dateFormatPattern="dd.MM.yyyy" id="startCalendar" style="position: absolute; left: 120px; top: 96px"/>

    I had observed that the code for UI:Calendar Component looks up defaulttheme.jar file which will be avaialble with Sun studio creator or with UI tag jars ...... for its JS files, Images and style sheets etc .
    I tried seeing the contents in the JS files and there is a JS file specifically for Calendar Component ie calendar.js ... editing the same i came to see this
    // This does not work for August (08) and September (09) but it works
    // for all the other months????
    function ui_Calendar_setCurrentValue() {
        var curDate = this.field.value;
        var matches = true;
    but cant see Feb month there...
    It the problem with the code in teh JS file that they are using to generate the component...
    sooo the only solution would be to get the latest jars fixing that issue (defaulttheme.jar)
    I tried googling out for teh latest jars for the same i coudnt find any such...
    This is my investigation on this issue.Hope only code fix kills the flaw
    If any one gets a solution or workaround pls post ASAP to help us.+
    Edited by: Shivaji. on Feb 3, 2009 4:44 AM

  • Calendar Component Localization issue

    When the calendar component rendered for Italian locale(it), the Week days column headers and close button label text still remains English!!
    |S|M|T|W|T|F|S|
    |close|
    Any solution?

    Thanks for catching this. I have logged bug: 6424679. Sorry for the inconvience.
    Lark
    Creator Team

  • Problem in JSF addRemoveList component selection

    Hi,
    We are using JSF creator studio 2.0. In our project we are using addRemoveList component to display available and selected items.
    We are able to display the selected value from available list to Selected list.
    uisng Add and remove buttons of the AddremoveList component.
    But we are facing the problem is, we are unable to get particular selected or highlighted value from the SelectedList .
    However we are able to get all selected items in bakingBean.
    This is very very important for us to move further in our development. I really appreciate for any sort of help.
    Thanks,
    Ramesh

    Hey Andy,
    I did it that way (JSC 2):
    assuming the add remove component's id is arl and that the components' item-property is bound to a datatable (mysql). The value field is of type Long, the display field is of type String.
    Get selected:
    get an array of selected objects directly from the component, and then do what ever you like to with that array.
    Object[] objSel = (Object[]) arl.getSelected();
    int i;
    int l = objSel.length;
    String str;
    for (i = 0; i < l ; i++) {
    str = objSel.toString();
    Set selected:
    Just create an array of objects holding the selected values and pass it to the component. But, attention, you'll need to make sure you're feeding the object array with the correct types of values. In my sample the value is a Long as described above, so I also need to pass in a Long, else the component just does nothing at all.
    Object[] selObj = new Object[] {new Long(5), new Long(8)};
    arl.setSelected(selObj);
    I found this the most easy option to get and set the add remove list selection.
    An other quite easy option is to bind the selected-property of the component to any session-bean property of type object-array and then set this sessionbean-property to the approrpiate values. But here you need also to make sure the datatype is correct.

  • Leave Calendar employee selection issue

    Hi,
    If we are having two manages in the same department, when i view team calendar it shows the leave applications irrespective of reporting structure. i.e., both the managers are able to view all the employees applications in the department.
    Even though i choose the option in the drop down list as direct reportees the same happens.
    How can i limit the employee selection based on the reporting structure?
    Thanks,
    Uday

    You need to use the table V_ptreq_team for the rule group assigned to the manager, where in you define the evaluation path and indicate how you define the employee selection
    More information here
    https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=190743879

  • JSF Declarative Component

    hi every body
    i am using Oracle Jdeveloper 11g release 2
    i wanted to create a Calendar Component
    for this i used JSF Declarative Component
    i added a RichInputText to page and a Button for opening calendar Dialog
    when for first time i open Calendar Dialog and select a day ,
    value of this day return to RichInputText truly but
    when i wanna to open it for second time that has an error
    error is:
    Error:dateValue is Read only
    i have to tell you dateValue is name of Attribute on JSF Declarative Component
    can anybody help me?

    i found a solution for this problem
    thanks

  • Web-Calendar component in Wiki get lost after Open Directory installation

    if I change my Lion Server to use opendirectory and not work in standalone mode, I lose the ability of the server for web-calendar for example at the wiki-webpage.
    servername/webcal
    The error-message tells me, the service calendar is deaktivated and I should activate it at Server App.
    But at Server App:
    a) iCal Service IS ACTIVE
    b) I find NO OPTION for activating the Web-Calender function under iCal like at the Mail-Service (one above) -> activate Webmail
    So, HOW I can BRING the web calendar component BACK TO MY WIKI?
    I wanted to use it in company, but now I not touch this "open directory activation" anymore, because I will lose. Without opendirectory the webcalendar working!
    I tried to find that function with Server - Admin, but this programm is much limited to what it was at the Snow Leopard Server and there I cannot select the iCal Service anymore. It's same with the new Airport Utility 6.0. Terrible reduced and I just installed back 5.6 and this is good working for my needs.

    I found the solution: Like with the PPTP-VPN problem it depends on the certificate. If you BUY an official public certificate (yes spend money for your Server more than the server price!), at once the Webcalender and the PPTP-VPN working!
    If in other way you fight through your selfsigned certificate problems and rebuild it, at once you will get all your problems again. So, not wonder why Apple at once mention in the help-line, that you need to buy a certificate. This, they mean true! You should support the certificate system of the new IPv6 and vanishing IPv4 world (I mean the IBM VeriSystem) for the new TRANSACTION orientated usage-fee-world. And not forget in this new Internet 2 world: E-Mail will become a service that get paid per transaction and 19% VAT tax (Germany) on top of it and 1 Cent communication tax (like the energy cent we pay today for each unit of energy source) for the EU. This, they realy plan to realize next years. So, why we wonder about this strange certificate issue it such transactions need be identified unique? In April in greater region Hannover-Braunschweig they will change the bankingcards for the new cashfree-system (GiroGo). And who wonders: cash-transfers will get transaction fees. They tell: Only 1 Cent / 5 Euro, only 2 Cent for 10 Euro, only 15 cent for 15 Euro. So, you understand what this new transaction and veriSigned world in real means? It is a change from a pocessing-free-world into a usage-fee-world. And you realy think that 2013 we still will speak from a banking crisis under such new conditions? They will get billions each day cash-transaction-fees. With NFC-iPhone 5 no problem (NCF -> look at Near field communications). The people will say: Oh, it's only 1, 2, 3 Cent but so practical not change money coins anymore. You will see how good this transaction usage-fee money-machine will work. And the EU will get billions transaction-communication-tax each day from the emails, there will be no discussion about Greek, Irland, Portugal, Spain (PIGS) ... economic-crisis anymore. You will see, such will happen! No banking crisis with Internet 2, no economic crisis with Internet 2. All will be solved by us, the people. Oh, our Merkel, when she come back from a G20 meeting already said: "We decided that each economic member and part need be 100% in focus in future and not uncontrolled anymore."
    If somebody more interested at this plan, you can watch this docu movie "one mainframe to rule the world" that describes deeper the issue of certification, identification, verification of people or things. The near world we drive directly into. And this certification system is ruled by whom?
    http://www.youtube.com/watch?v=uXTwS_T-CvM
    When I at least go to the Apple-Center I found the teacher with a Microsoft-T-Shirt of certification and wonderd very much. Than he told me, that the only groupware that is true for a good usage together with Apple is Exchange Server. And the more he told the more I wonder because he is Apple-Highgraded. But I not so much wonder anymore. Understand the game this companies play with us. It's a licence crisis and it can be described as: Microsoft is a the one end of the coordination system with x = price and y = pieces sold. Apple is exaclty at the opposite. Look what MS does, look what Apple does and at the end it's not difficult to see, that they moving to eachother to meet. And the missing 3d coordinate z in this new room is IBM with it's VeriSystem.
    So, a perfect xyz-combination for all giants.
    How Google, Linux ... matches inside this "new computer world order"?
    I will mention that much IT-professionals at the moment going to such new curses and explain that 2013 they will change all hardware to "certified hardware" that NEED BE used in businesses and for example Linux will not be part of this new "certified world".

  • Tutorial - Calendar Component

    Hi,
    I'm trying to add the Calendar component to a Page fragment but I 'm getting the following error:
    java.lang.IllegalStateException: Not nested inside a form
    So, I added the h:form as in the following sample:
    <?xml version="1.0" encoding="UTF-8"?>
    <div style="-rave-layout: grid" xmlns:a="http://www.sun.com/creator/addons" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
    <p>Included Content Here</p>
    <h:form>
    <a:calendar binding="#{expense$final$incidentArea.calendar1}" id="calendar1" style="left: 48px; top: 72px; position: absolute"/>
    </h:form>
    </div>
    But now, one of the two things are happing:
    a) I got a "The prefix for element "h" is not bounded
    b) Or, I don't get the above message, but the calendar isn;t reder. In his place, there is a "Red" box.
    Question: Is valid add tags like "h" in a page fragment? If yes, how can one bound the correct xmlns to the prefix since one can't use jsp:root?
    Thanks.

    Thanks for the information. But I have a question on Calendar component . I want the Calendar component to be open when user wants to enter a date. Otherwie it looks akward in a page to keep the component visible all the time. How do I do that? What I am thinking is, i want to make this small and upon clicking it will open the calendar and select date. Thanks for your help in advance.
    About Fileupload
    Do I have to copy any jar file from MyFaces. I am using SUN Studio Creator. Do I have to import anything?

  • Calendar Component and validation errors

    Hi,
    For the first time I am trying to use the Calendar component to insert a date field in my SQL Server db.
    The problem: I can insert a date column only if its of type java.sql.Timestamp.
    As Timestamp extends the date object..
    I tried to bind the selectedDate field as <Timestamp> Object[refractored in my class file] and when i tried to update by DB it throwing a Validation error.
    If I bind it as a Date Object directly I am getting an EvaluvationException
    as date objects cannot be inserted directly
    Am i missing something here or is there a proper way of implementing it.

    Its a fairly direct question about object conversion problem in creator
    Basically the selectedDate parameter of the JSC Calendar component
    needs to be pointed to a Date Object
    If we need to insert that date information to a SQL Server column the equivalent data type should be java.sql.Timestamp which extends Date.
    So if we point the selectedDate parameter as a Timestamp object the creator throws an illegal argument exception.
    Can some one clarify how to resolve this issue?

  • Calendar Component

    HI Guys,
    I have a small query; which relates o the use of Calendar COmponent in xcelsius. I have to use this and filter my data accrding to the selection made. How can this be achieved?
    Selection - 04-Jul-2009
    Data -
    Date                               Column_Name
    01-Jul-2009                   D1
    01-Jul-2009                   D2 
    04-Jul-2009                   D3
    04-Jul-2009                   D4 
    04-Jul-2009                   D5
    Result should be:-
    04-Jul-2009                   D3
    04-Jul-2009                   D4 
    04-Jul-2009                   D5
    Regards,
    Pratik

    Hi Anil
    You can use the filtered summary property of a ComboBox to achieve it.  No index/match formula are needed, just a simple if statement.
    Want me to send the file?
    Regards
    [Charles|http://www.reportex.co.uk/xc_waterfallchart.html]

  • Calendar component in CQ 5.5, "Recursive invocation. Not further handling status 404(No form found)"

    Hi,
    we have upgraded our CQ 5.4 installation to CQ 5.5. After the upgrade, we are facing an error with the Calendar component. The following error is logged when trying to create a new calendar event:
    20.11.2012 11:01:23.139 *ERROR* [10.62.45.10 [1353405682764] POST /content/hm/NewsroomSection/en/NewsRoom/test/_jcr_content/par/calendar_3dd7/calendars/def ault/2012/11/22/.form.create.html/libs/collab/calendar/content/eventform HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver handleError: Recursive invocation. Not further handling status 404(No form found)
    We will try increasing the log level to possibly get a more detailed error message, just checking if anyone has encountered this issue?
    Thanks,
    Joakim

    "No form found" means the form chooser that's used here ("form" selector) to find the form to show/edit the event did not find one under the given path /libs/collab/cale ndar/content/eventform (the suffix). It contains a space, maybe it's just a typo.

  • JSF Calendar/ File Upload

    Can any one of you suggest me any tutorial about Calendar function? How to add the calendar component into Studio Creator? Highly appreciate your help.
    Also, I need help on File upload.

    Thanks for the information. But I have a question on Calendar component . I want the Calendar component to be open when user wants to enter a date. Otherwie it looks akward in a page to keep the component visible all the time. How do I do that? What I am thinking is, i want to make this small and upon clicking it will open the calendar and select date. Thanks for your help in advance.
    About Fileupload
    Do I have to copy any jar file from MyFaces. I am using SUN Studio Creator. Do I have to import anything?

  • Java Studio Creator 2 Update 1 - Problems with Calendar component

    Hello,
    I just made a very simple webapplication, consiting of 2 webpages. Webpage 1 has a button that sends the user to webpage 2. That works fine. When I add a calendar from the components palette, and select a date thats in 2010, I keep getting redirected to page 1 when I press the button that should send me to page 2. I don't even try to access the selected date from the calendar. When I select a date in 2009, it all works fine. I don't see any exception, not on screen, not in the server log. I'm using the Sun Application Server that comes with Studio Creator.
    Kind regards,
    Sven

    Ok, I now know what my foot tastes like. Have personally verified that the calendar component in JSC 2 update 1 accepts dates (at least) 1970 - 4100. With this range you can see that there some work going on in the background but performance is adequate (a second or two delay). Considering that this is a ridiculous range the Calendar component performs well.
    I dug up my old copy of JSC EA 2 and that calendar component seems to have a 9 year range with no settable minDate maxDate.
    I appear to have deleted my copy of JSC EA [1] but I guess this must be where I had a poor experience of the component. I'm fairly sure this had a minDate / maxDate property and if they were set too far apart it caused heap space problems. I guess I made a mental note not to try this again and never have since. Anyway, it's irrelevant because the Calendar Component works right now and that's what counts. My apologies to all concerned.

  • Calendar component not found

    There is no calendar component in the "JSF Standard Component" of Standard tag of Palette.
    How do I display it.
    Best regards
    Bernard

    The calendar component is under the "basic" components.
    -David

  • Calendar component validate and valueChange events in creator 2_1

    Hi, I have a very simple test scenario for calendar component -
    two textfields + one calendar. When value changed (either via manually enter or select date from popup calendar), I want to see if validate and valueChange events get fired.
    ( similar to this post http://developers.sun.com/jscreator/reference/code/samplecomps/2004q2/calendar/calendar_component.pdf)
    So, in page1, I have:
    public void calendar1_validate(FacesContext context, UIComponent component, Object value) {
    // TODO: Replace with your code
    textField2.setValue("validate visit:"+calendar1.getValue());
    public void calendar1_processValueChange(ValueChangeEvent event) {
    // TODO: Replace with your code
    textField1.setValue("valuechange visit:"+calendar1.getValue());
    In the calendar property, I have:
    validate: lengthValidator1.validate()
    valueChange: calendar1_processValueChange
    valueChangeListener: #{Page1.calendar1_processValueChange}
    However, nothing happens when a date, valid or not, was entered or a new date was selected from popup.
    I have a message attached to calendar1 and it shows nothing.
    I set break points in functions above and there is not break.
    Question:
    1. Where can I look for clues of what events get fired?
    2. Any simple thing that I missed using calender? simple property setting...etc.
    System: vista + creator 2_1
    Thanks in advance for your suggestions

    There may be a couple of things going on here.
    First, is the page being submitted?
    Second, I think custom validators have to be registered. Have you registered the validator?

Maybe you are looking for

  • Can't view Photos in large size, Export as Jpeg or to iWeb

    Hello, This has been frustrating me for months and I don't know what to do to resolve this. I have an iPhoto library with about 6,000 images in it. Here are some of the sympyoms I am experiencing: If I double click on an image all I get is a lo res b

  • How to play movies of AVI format in Nokia 5610

    Hey guys!!!! Can any on tell me how to play AVI format videos in Nokia 5610. and which converter do i need to download so as to play the videos and which format videos does this phone support? Thank you Rajat Allen

  • LT06 HELP..........

    Sorry for not being clear.....my brain is confused and hurting trying to figure this WM stuff out. I will try again. Ok... I am trying to move 10,000 kg's of material from the UML-ZONE. Each item weighs 200 kg's. I need to get SU#'s for each item sep

  • Material Disposition After Usage Decision

    Hi Gurus, Im working on a scenario werein I need to change the Defect recording after I need to change the disposition of the material. The process is, the lot will be rejected, and will go to a certain Location. In this location, the user will decid

  • One WLC 5508, Multiple Sites/Networks

    So I'm trying to think this design out in my head.  Here is what I have: Corp Office with a WLC 5508 configured with a management port and a guest WLAN port for guest wireless etc to the corp Layer 3 switch in a wireless VLAN, using 802.1q trunk of c