I am using Primefaces 6.0 and the p:repeat component
I have an input component (specifically p:calendar) inside a p:repeat. What I want is this: when I select a date/time on a specific calendar, I need to update every calendar inside the repeat, apart from the one I edited/selected the date.
The reason I want this is because if I update the whole repeat (the panel wrapping it), every time the user selects a date the calendar disappears (understandably since it's re rendered). But because I allow my users to also select hours and minutes, it's bad from a UX perspective to have the need to reopen the calendar every time the user selects any of month/hours/minutes.
As a workaround, is there a way to attach an event to the close button of the calendar, so I can do the processing after the user is done editing the date?
Edit: Actually the close button event wont help because the user can just click outside of the popup.
Related
I need to schedule an appointment at a government office via their website. Since all timeslots are occupied, I need to recheck the site until a timeslot opens. The first screen has a button to press, the second screen: a radio-button to select, a check-box to mark and a button to press, and the third screen is a calendar as so:
Months June-August are open, so I need to iterate through these months in the drop-down. So if a day is colored yellow this means there is an open timeslot.
I need to automate the process of checking for timeslot availability, so if there are open timeslots (a yellow colored day) I will get some notification e.g. by email. My question is what is the best tool for the job & pointers on how to implement my specific scenario using that tool be it an existing app/extension (best) or a program (Python?) I should write. If it's a Python script, I will be happy to get some sample if possible.
Thanks for any suggestions.
I'm developing an app for event calendar in android studio. But I want to mark a random date by taping on the date and then pressing the Mark Button. Again Unmark the date by clicking the Unmark Button.
N.B: I'm currently marking the current date.
Is there any effective solution for my desired criteria?
You will need to maintain your own data structure of which dates are selected. This can be in-memory, persisted via SQLite, etc. There is too little information in your question to give a better answer.
I am trying to make a 2nd djFilteringSelect using a #Dbcolumn depending on the value selected in the 1st djFilteringSelect control. That's a common task, using a partial refresh. However, each of the controls is within a dialog control from the extension library. One dialog pops up, the user selects a value, and automatically the 1st dialog closes and the 2nd opens. YOU CAN'T SEEM TO REFRESH THE FIELD (I'm guessing b/c it's not in the DOM). I've tried writing the first value to to an computed field and/or a text box on the main Xpage using CSJS and then looking for that value for the second lookup. Also, tried with SSJS, etc. I tried do updates and writing to fields on either the onChange or on the click of button. How do I go about using the selected value of the first to do the lookup in the 2nd?
You can use a single dialog control where you hide and show the relevant controls. I am using this approach in several apps.
I have formA where I have "_reviewer" field, which is text/editable. The field is populated when the save button is clicked, the button has the following code:
pick := #Name([CN];#PickList( [Name]));
#SetField("_reviewer"; pick );
#If(#Command([FileSave]);
#Do(
#MailSend(pick;"";"";"Subject";"Body";"";[IncludeDoclink]);
#Command([CloseWindow]);
#StatusBar("Success.")
);
#StatusBar("Fail!"));
I have viewA where document should be shown if the current user is the same as the person in '_reviewer' field, the code in View Selection is:
LCName := #LowerCase(#Name([CN];#UserName));
LCPeople := #LowerCase(_reviewer);
SELECT form = "formA" & (#Contains(LCPeople; LCName))
I have another viewB, where I can see all documents, and one of the columns is '_reviewer'. Now the issue is, even though on viewB I see that John Doe is reviewer for a documentA, the documentA is not shown in viewA when John Doe is logged in as the current user. The tricky part is, documents sometimes show up in viewA, and sometimes they don't, even though I repeat the same steps when creating the document. Having this behavior is unacceptable. Is there some other way to parse the current user and the user picked from #PickList, or some other way to check if the two are the same?
Use an embedded view in a Page like suggested in your last question. This time first categorized column would be #LowerCase(_reviewer) and "Show single category" would have formula #LowerCase(#Name([CN];#UserName)). The view selection is SELECT form = "formA".
You can't use user specific functions like #UserName in public view's selection formula.
Also note, that the user can save the document by pressing Ctrl+S or by closing the window and selecting Yes when prompted. They don't have to use your Save button. If there's really something that must happen before the document is saved, it must be done in the form Querysave event. If it has to happen after the document is saved, it must be in the Postsave event. Kudos for checking the return value of the save command though!
Does anyone have any examples of a calendar popup that can be triggered using a ribbon button on a form?
I'm looking to have a popup where the user can select a date from the calendar which will then pass the value back to the javascript that launched it. I've seen that this can be done from a html popup but my efforts to create this so far haven't really been successful, so was hoping someone could advise me on the best solution.
Thanks
I've managed to find a good calendar that I have used for this solution. It can be found at https://github.com/dbushell/Pikaday
With this I put it into a html popup that had a text box on it (which would store the selected date) and had the javascript on my ribbon button show the popup.
The download includes the js files for the calendar to function and with a little tweaking of these you can make the calendar appear immediately on opening of the popup and not hide when a date is selected. Plus the text box can have its options changed so that it isn't visible to the user.
All put together this creates a rather pleasant looking calendar popup
You can use the date parameter type from html without using javascript
<input type=date >