You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jurgen Lust (JIRA)" <de...@myfaces.apache.org> on 2006/03/03 21:44:41 UTC

[jira] Commented: (TOMAHAWK-175) schedule component: select available time slots to create new entries

    [ http://issues.apache.org/jira/browse/TOMAHAWK-175?page=comments#action_12368791 ] 

Jurgen Lust commented on TOMAHAWK-175:
--------------------------------------

I think this type of behaviour is very desirable for the schedule component, provided that it respects the readonly flag and that you can turn it off. I have been thinking about how  this could be done as elegantly as possible. Your solution is a nice one I think, but I would like to take it a step further, with some javascript magic :-)
Here are my thoughts:
- As you pointed out in TOMAHAWK-173, the action attribute does nothing at the moment. We could invoke this action method in a non-readonly schedule component, when the user left-clicks on the schedule, outside an entry. The left click would then invoke a javascript method that registers the mouse coordinates in 2 hidden fields, which are then stored in the component at submit time. Using those coordinates, you should then be able to determine the date and hour of day that was clicked. If no action attribute is specified, nothing happens.
- We could also add a second action attribute, for example entryAction, that invokes an action method when clicking on an entry.
- Using the same javascript technique, I would also like to add a context-sensitive menu, with configurable actions. That could be done with a subcomponent of the schedule, for example <s:scheduleMenu> and <s:scheduleEntryMenu>

I'm looking for a good website now where I can brush up on my Javascript skills...

> schedule component: select available time slots to create new entries
> ---------------------------------------------------------------------
>
>          Key: TOMAHAWK-175
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-175
>      Project: MyFaces Tomahawk
>         Type: Improvement
>     Versions: 1.1.2-SNAPSHOT
>     Reporter: Stefan Betermieux
>     Assignee: Jurgen Lust

>
> Hi,
> our group is using the schedule component in a time management application and user evaluation showed that the entry of new appointments is cumbersome. We used to have an "add entry" button next to the week view, where the user had to select the day and time for start and end of the appointment, just like the EntryHandler in the examples do. We opted for a simple solution which adds a lot of usability:
> - if there are no appointments for a single day, put a transparent entry in the schedule, which behaves like a normal appointment (selectable) and which spans the whole day.
> - if there is for example one appointment arround noon, replace the first transparent entry by two transparent entries around the visible appointment.
> - repeat as needed...
> At the end, there is no unselectable space left for a single day, it is either a block representing an appointment or an invisble but selectable block representing available time.
> If a transparent block is selected, put the start and end time in the model.
> Take a look at our modified sandbox example web app, which implements the described behaviour:
> http://sirius.fernuni-hagen.de/myfaces-example-sandbox/schedule/example2.jsf
> (because of TOMAHAWK-173, the creation of new entries has to be triggered by a commandButton on the left side after selecting the time slot)
> The modifications are mostly renderer based, the model had just to be changed to support the start and end dates of the selected available time slot. 
> There are no modifications of existing code bases using the schedule component if AbstractScheduleModel has been extended. If ScheduleModel is implemented, the new methods of the interface to get and set the start and end time should be added.
> I am not yet providing a patch because some questions have to be discussed:
> - would this be a desirable behaviour for general schedule users, or is it just our use case?
> - should this behaviour be optional? (At the moment, it respects the readonly flag, but there may be situations where appointments should be selectable, but the available time slots should not be)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira