How to set a default start and/or end date for New Events based on trigger date.

I'm using the CalendarActivityListener to get current row when clicking on an existing event. As per previous posts this listener gives you access to event detail including Start Date, End Date, etc.
However, what I want to do is to default the start (and end) dates for New Events based on the trigger date.
I've tried the CalendarListener and can grab the Trigger Date from it - however, I can't see a way to pass this directly to the popup/dialog I'm using to create the new event.
At present I'm putting the TriggerDate into the ADFContext session scope e.g. ADFContext.getCurrent().getSessionScope().put("TriggerDate",calendarEvent.getTriggerDate());
Then, I've tried multiple approaches to try and "get" the TriggerDate from session scope to drop it into my new Calendar Event basically, I'm trying to default the InputField(s) associated with the Start Date using the value from the session - I've tried
1. setting the default value for the InputField in the jspx using a binding expression i.e. value="#{sessionScope.TriggerDate}" - this actually sets the value appropriately when the jspx is rendered but, when I go to create I get a NPE and I can't debug. I assumed that it might be a Date type issue - it would appear that CalendarListener provides a date of type java.util.Date and that the StartDate attribute of my VO/EO/table is a DATE and therefore requires oracle.jbo.domain.Date so I tried casting it - to no effect
2. Using a Groovy expression *(StartDate==null?adf.context.sessionScope.TriggerDate:StartDate)* in my calendar's EventVO to default the Start Date to the same result
Any thoughts or ideas?

John,
Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
Works just fine. Snippet from the listener follows
BindingContext bindingContext = BindingContext.getCurrent();+
*if ( bindingContext != null )    {*+
DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
Row currentRow = iterator.getCurrentRow();+
if ( currentRow.getAttribute("StartDate") == null)+
currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
if (currentRow.getAttribute("EndDate")==null)+
currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
*}*

Similar Messages

  • How to Set A Default Start Time For New Events In Calendar?

    How to Set A Default Start Time For New Events In Calendar?

    John,
    Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
    Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
    Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
    Works just fine. Snippet from the listener follows
    BindingContext bindingContext = BindingContext.getCurrent();+
    *if ( bindingContext != null )    {*+
    DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
    DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
    Row currentRow = iterator.getCurrentRow();+
    if ( currentRow.getAttribute("StartDate") == null)+
    currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
    if (currentRow.getAttribute("EndDate")==null)+
    currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
    *}*

  • How to set the default start page (login) of apex itself?

    Hi!
    I've successfully upgraded from 3.2 to 4.0! I'm using the pl/sql embedded gateway.
    When I enter the url http://s01:8081/apex I get an error (page cannot be displayed (404)). But when I enter http://s01:8081/apex/f?p=4550:1:1481295403790110 the apex logon page appears and everything works well.
    For testing I turned on debug logging and entered again http://s01:8081/apex
    The trace file contains the following logging entries:
    *** 2010-12-17 14:30:25.825
    *** SERVICE NAME:(SYS$USERS) 2010-12-17 14:30:25.824
    *** SESSION ID:(133.21643) 2010-12-17 14:30:25.824
    Embedded PL/SQL Gateway: (null) HTTP-404 No procedure specified to run
    Embedded PL/SQL Gateway: (wpu.c,626) longjumping back to the beginning
    Embedded PL/SQL Gateway: (wpu.c,488) cleaning up before longjmp
    Embedded PL/SQL Gateway: (wpu.c,513) in init state
    Embedded PL/SQL Gateway: (wpx.c,688) Shutdown has been called
    How can I solve this issue?
    Thanks
    Markus

    Hi!
    Thanks for your reply!
    I'm using apex 4.0 on oracle 10.2.0.4 enterprise edition with the embedded pl/sql gateway. I've to instances on this server (dev and prod). The development instance works without any problems.
    The query returns:
    ORA-24231: Database Access Descriptor (DAD) APEX not found
    ORA-06512: in "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: in "SYS.DBMS_EPG", line 58
    ORA-06512: in "SYS.DBMS_EPG", line 299
    After googling or searching on metalink for the error message I'm redirected to oracle documentation which tells me the reason for the error but nothing about to correct it - that's why I love oracle documentation so much...
    Cause: The specified Database Access Descriptor (DAD) did not exist.
    Action: Make sure the name of the Database Access Descriptor (DAD) is correct and the DAD exists.
    Thanks
    Markus

  • How to get index of cluster and make popup vi for every event

    Hi
    I have problem. the problem is i have to find out the index of cluster.
    I have an event "mouse down" from this cluster  and index should be the value where i put my mouse.
    2nd thing is curently i am just abel to display only 1 popup. but i need each pop up for every every element where i move my mouse
    thanks in advance.
    BR

    altenbach wrote:
    Use a "value change" event on the array and do a "not equal" on the old a new value. Only the changed value will result in a  true. Use search array to find the TRUE in the "not equal" array and the resulting index points to the changed element. You can do basically the same with clusters, by using "cluster to array" at the right time.
    Here's what I had in mind (LabVIEW 8.2)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    DetectElementChange.vi ‏17 KB

  • Send email notification in latest start and latest end

    Hi all,
    My requirement is to send email notification on latest start and latest end. For latest start, a notification needs to be sent to the manager asking him to start processing the Leave request.
    Am not too concerned about the latest end, since the latest end takes the workitem(MODELED ACtion)  to the next manager, where I can insert a email step in the workflow.
    My concern is how can i send an email to the manager if he has not started processing the lave request within say 3 days
    thanks a ton.
    regards

    Hi,
      If you are looking to send notification ASA work item reaches a latest end then follow the below steps.
    1. Open the step for which you have set the latest end and click latest end tab.
    2. Under the same tab you will find a Drop down box you will find two entries 1 Display Text 2 Modeled  choose the 1 option. and define the text in the task description by choosing Latest End description.
    3. Choose the container element you might have populated the email address.
    Now the configuration that you need to make sure to send a mail to external email id is SCOT settings if SMTP node is configured  then this node would be sending mails to the
    Regards
    Pavan

  • How to maintain minimum price limit and maximum price limit for a condition

    Hello Gurus,
    Goodmorning,
    How to set minimum price  limit and maximum price limit for a pricing condition type  where we will do this ?, is it possible to set in VK11 ?
    Note- I   can see  minimum and maximum setting in condition type  pricing - in  SPRO but  not seen anything in VK11 condition record maintaince  . so how to maintain in condition record( VK11-Minimum limit  price and Max limit  price )
    Looking for your inputs 
    Thanks in advance
    Regards
    Venkat

    hi,
    in VK12
    select the condition record - goto blue ladder icon
    there you can maintain scales
    like lower limit and upper limit.
    balajia

  • Imovie keeps getting hung up generating thumbnails for new events.  How do I fix this?

    I imported several movies from my miniDV camera without issue.  Yesterday I tried to import another movie, only about 30 minutes long to a new event, and the "generating thumbnails for new event" has taken 12 hours and is still not complete.  I tried to force quit and reopen the program it just starts the process again upon opening.  I went online and downloaded and installed the imovie updates.... still no luck. I can't even use imovie now because when I open it it just goes back to generating thumbnails.  Any thoughts?  Im new to the Mac, and I just bought this computer 3 days ago and want to love it, but this is frustrating.

    What version of iMovie 2011.  Make sure you have installed all updates.  There has been several updates addressing stability issues.  If you have a newer system there were compatibility issues.  Hopefully this will fix your issues.  I have a new 2012 MBP 13 and works fine.  It did lockup (pinwheel) 2x and has been fine.
    After the updates running Disk Utility and repair permissions as well.  Make sure things are correctly referenced.
    Good luck
    Brian

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • How can I set the default home page in Firefox 4 for all users that login to a PC on a Win 7 PC?

    I work at a community college in upstate NY.
    We use Firefox as the default browser at our institution and we have always set the default homepage to be our homepage for all users that login to the PC. We had a procedure to to that that worked with Windows XP and FF 3 or earlier
    We would do the following:
    1. go to: c:\Documents and Settings\Administrator\Application Data\Mozilla\FireFox\Profiles\<profile_name>\prefs.js
    2. Add the line: user_pref (“browser.startup.homepage”,”http://www.genesee.edu”);
    3. Copy the Folder
    C:\Documents & Settings\Administrator\Application Data\Mozilla
    To
    C:\Documents & Settings\Default User\Application Data\Mozilla
    4. Restart the computer
    We're going to Win 7 and Firefox 4 and things seem to be different in terms of files and file structure. Does anyone know how to accomplish this?
    Thanks in advance.

    Making customisation from the default profile is generally considered poor practice and quite often doesn't work out as planned. (If you're interested in some more information on this, [http://mockbox.net/windows-7/227-customise-windows-7-default-profile.html see here] see here)
    This article should help you with developing and deploying your customised Firefox 4 installation (without touching the Windows 7 default user profile):
    http://mockbox.net/configmgr-sccm/174-install-and-configure-firefox-silently.html

  • How to set a Default Value in the drop down on Account Creation ?

    Hi,
    i have to set a default value in the drop down as soon as a User in a particular business role clicks on New Account. I have written the following code in do_prepare_output method. But this code is executed in the 2nd server round trip after entering some value or pressing enter. so i am not getting as soon as user clicks on the New Account.
    How to set that default value when user clicks on New Account ? and where should i code ?
      IF lv_icwc_profile = 'ZCSALESPRO' or lv_icwc_profile = 'Z_SALESPRO' .
      try.
                  lr_entity ?= me->typed_context->header->collection_wrapper->get_current( ).
                  lv_current = lr_entity->create_related_entity(
                                                  iv_relation_name = 'BuilRolesRel' ).
                                 lv_current->set_property(
                                    iv_attr_name = 'PARTNERROLE'
                                    iv_value     =  'BUP002' ).
                   CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
                   cx_crm_genil_model_error.
                   return.
            ENDTRY.
    Thanks and Regards
    Raman Khurana

    Hi,
    I have some idea abt it, it is also used in account life cycle.
    Please refer SAP note 1097651, Defaulting a life cycle stage.
    Let me know if useful.
    rgds,
    Vinay

  • How to set a default value for particular field in SRM PO Portal

    Dear Gurus,
    Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
    My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
    I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
    Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
    Thanks in advance...
    Regards,
    Sathish

    Dear Laurent,
    Thanks for your response,
    But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
    My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
    Kinly guide me how to get the particular node of field in the Purchase order screen.
    Thanks you in advance,
    Sorry for the inconvenience if any
    Regards,
    sathish

  • "I would like to know how to set the default view for the columns. Somewhere I read it could be done in by music icon under Library.  Can't find it.  Thanks

    "I would like to know how to set the default view for the columns that are shown in iTunes. Every time I open it, I have to either go to the options, or right-click to get the pop-up options, and delete "rating" and add "composer." I'd really like to just do it once and be done with it."  Somewhere I read you could do this by clicking on the Music icon under LIBRARY then arramge the columns.  Trouble is, I can't find a Musi Folder or icon in my user library.
    Any help would be appreiated.  OSX 10.9.2  iTunes version 11.1.5  Thanks!!! CW!

    From the iTunes menu bar try View>Show View Options.  Make sure what you want to see is checked and what you don't is unchecked.  You can do this (may need to do this) for any playlists, your main Library, etc.
    Good luck
    srb

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • How to set my default application...not working

    My company has nearly all adobe applications installed from PageMaker 6.5 through InDesign 5.5. We use them all frequently. I'm trying to set my defaults on the Mac Pros and it is not working.
    Specs if Needed:
    OSX 10.6.8 
    Model Identifier:          MacPro5,1
      Processor Name:          Quad-Core Intel Xeon
      Processor Speed:          2.8 GHz
      Number Of Processors:          1
      Total Number Of Cores:          4
      Memory:          6 GB
      Boot ROM Version:          MP51.007F.B01
    +BootCamp dual boot Windows 7
    We proof out all files in the version that it comes to us. Our customers are on different versions than the most current, and it's driving us crazy that we can't set the defaults for
    each Adobe application. For Instance,
    We want for Defaults:
    Photoshop = CS4
    InDesign = CS4
    Illustrator = CS5
    etc.
    The Finder will not allow us to make the change to open all of a certain file type in the version we want by default. We also use a third party application that allows us to "double
    click" InDesign files and open them in the correct version. This saves valuable navigation time and because of the OS's problem with using the correct icons, it also saves us time
    dealing with the "Untitled" document when we accidentally convert by opening in the wrong application by mistake. We have gone through Onyx utilities and massive permissions
    troubleshooting to no avail. Does anyone know how to set the default for ALL files of a type for Adobe Apps? This has been thoroughly tested and is not working on 10 plus
    machines, and only effects Adobe apps.
    Any Ideas?

    I think you miss understand the question. There is a problem with OSX 10.6 and Adobe Apps. 10.5 ok, not sure about 10.7 because of all of the other Adobe problems we downgraded the test machine that we used for the upgrade. There is no way that I have found to make the files “Double-Clickable” through assigning a default application of files with Adobe extensions. We already have an app. that we use and it worked fine until 10.6. I can’t just approve a division-wide purchase of software for a bug that may be solvable by other means (by the way supposed cost of the licensing Soxy is deceiving at $20. Not for us. For companies it’s $20 per platform & also for each time Adobe updates. When we swap out hardware, we have to pay $40 again . Their pricing is absurd). $40 x a couple hundred machines every 18 months or so, uugh! The ten or so I’m working with are just the ones in my immediate department.
    I know you have good intentions with your reply and I appreciate it, however I’m looking to solve the problem, not put a band-aid on it. If the problem is by design so Rorohiko can hold companies hostage, then I guess we’ll just have to deal with the few extra clicks it takes to figure out which version we’re in need of, and dragging to the launch bar.
    Thanks very much for your reply,
    Seth

  • How to Set Automatic Default Time in Calendar

    Friends,
    When I create new event in calendar (by double clicking on a specific date) for example Group Dinner, the calendar autotatically set the start time at 8PM.
    How to set the default time to 7PM for example.
    Thanks
    Regards,
    akostaman

    Ok It seems not just a problem of 24 hour time appointments that won't sync but all appointments I make on my iphone in calendar won't sync to calendar on my mac?

Maybe you are looking for

  • Error when undate solution manager from 700 to 701(700 enp1)

    Hi all, error when undate solution manager from 700 to 701(700 enp1),error:OCS package SAPKITL428 does not match the current software component vector. My current supportstack is as follows : SAP_ABA 700 0016 SAPKA70016 SAP_BASIS 700 0016 SAPKB70016

  • How to deactivate a message or message class

    Dear Gurus, Can any body tell me is there any way to deactivate a message class/mesage? Thanks Praveen

  • Saving graphic setting to all users

    I am using APO 7.0 and the "chart engine" for graphics.  I want to save my graph user setting at the planning book level so that all users see the same default settings.  I see oss note 980904 that talks about this happening by mistake on a planning

  • Pavucontrol and 5.1 sound

    I have a fresh install of arch64, Xfce4 and pulse audio, and a question about pulse and 5.1 sound. When testing my speakers under windows, I get independent sound from my speakers, and with speaker-test -c 6, I also get independent sound from my spea

  • Logical : paging out memory to disk.

    Hi, We have to reorg the table in production and so I tried to test in test database but everytime I issue move command , logical apply get stopped with error " paging out memory to disk". I tried to increare SGA and allocated more memory for LCR but