question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with primefaces component p:schedule passing from 1.0.0-RC18 to 1.0.0-RC19

See original GitHub issue
Issue Overview

I have a p:schedule component in my page which uses a LazyScheduleModel like this:

@Named
@ViewScoped
public class EventsList implements Serializable {

	private ScheduleModel lazyEventModel;

	@Inject
	LogManager logon;
	
	@Inject
	NightService nightService;

	@Inject
	LocationService locationService;

	private Location selectedLocation;
	private List<Location> locations;

	@PostConstruct
	public void init() {
		locations = locationService.getLocationsFromDatabase(logon.getProvider());

		lazyEventModel = new LazyScheduleModel() {
			@Override
			public void loadEvents(Date start, Date end) {
				DateTime startLdt = CalendarUtils.toDateTime(start);
				DateTime endLdt = CalendarUtils.toDateTime(end);
				List<ScheduleEvent> events = nightService
						.getNightsScheduleEventsByProviderLocationAndDateTimeRange(logon.getProvider(), getSelectedLocation(), startLdt, endLdt);

				for (ScheduleEvent e : events) {
					addEvent(e);
				}
			}
		};
	}
    /* ... */
}

And in my page I have a p:schedule inside a form like this:

<p:schedule id="schedule" value="#{eventsList.lazyEventModel}" draggable="false" resizable="false"/>
Current Behaviour

From 1.0.0-RC19 and above:

  1. the events are not shown on the schedule component and loadEvents is never called.

  2. I get in the Google Chrome console the following error: screenshot 2019-01-12 00 25 58 It is due to the js function showBar() from AdminLTE, the first time that the PF('statusDialog') is called gives me an Uncaught TypeError: Cannot read property 'show' of undefined.

Can’t say if 1. and 2. are correlated.

Additional Information

Testing with 1.0.0-RC18 p:schedule works fine and this problem did not exist. I tried again recompiling my ear with:

  • 1.0.0-RC19
  • 1.0.0-RC20
  • 1.0.0-RC21-SNAPSHOT

And all these 3 have this bug on the p:schedule component.

AdminFaces version: admin-template 1.0.0-RC19+ PrimeFaces version: PF 6.2 JSF implementation: Mojarra 2.2.15

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
danielemaddalunocommented, Jan 17, 2019

Yeah! It works fine with the new 1.0.0-RC21-SNAPSHOT! 🥳 Great job and thank you again @rmpestano

0reactions
rmpestanocommented, Jan 17, 2019

Hi again @danielemaddaluno,

As I suspected the issue was caused by loading dialog position on the template.

Can you try with admin-template 1.0.0-RC21-SNAPSHOT?

Don’t forget to clean browser caches.

Thank you for reporting the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

autocomplete listener problem in custom component
I am trying to use the autocomplete component in order to create a custom jsf component as follows: Code: Select all <?xml version='1.0' ......
Read more >
Primefaces 5.2 captcha component renders API 1.0 captcha
I am using Primefaces 5.2 and when i use the captcha component, it renders the old API 1.0 captcha. If you look at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found