We had an idea of let the user choose their own backgroud image (between a set of predefined images) of our GeneXus generated app.
Is it possible to change the "Application" class programatically? It would be cool because we could change the "Application Colors" as well.
Our second option is to create a couple of Table classes with the backgrounds and change in the start event.
But it would be perfect if we could use different "Application" classes.
Is it possible?
Unfortunately there is no way to change the Application class in runtime. The best option is the one you describe: use a Table and change the Table's class.
Related
I would like some samples of code to start using jfxtras calendarpicker, please.
I am writing a JavaFX app scheduler. I need to select multiple dates into an array or list, and would like to keep the calendar open while a user selects and deselects dates. Datepicker closes annoyingly after a selection, and I cannot extend the code to stop it as methods and fields are private :-(
The selections may need to be highlighted in different colors depending on type of selection. The jfxtras calendarpicker looks ideal :-)
I downloaded the jfxtras-icalendarfx-15-r2. jar from https://search.maven.org/search?q=g:org.jfxtras
I have read the javadoc, but would like some simple samples to start.
I don't think there is too much to put in examples; you just create the control add add it to a Pane. If you set
calendarPicker.setMode(CalendarPicker.Mode.MULTIPLE)
then you allow multiple calendars to be selected, which are available in the collection
calendarPicker.calendars()
And that basically is it. As the javadoc describes, you can prevent days from being selected using disabledCalenders, or highlight some using highlightedCalendars, both can be repopulated when the displayed range changes using setCalendarRangeCallback. And that is about it. It does not support different kinds of highlight, but I figure you can use CSS to do something with that. Not sure what your requirements are.
You can take a peek at the tests
https://github.com/JFXtras/jfxtras/blob/11/jfxtras-controls/src/test/java/jfxtras/scene/control/test/CalendarPickerTest.java
I would suggest looking at LocalDatePicker or LocalDateTimePicker instead of Calendar though. Same functionality but using the new DateTime API.
And alternative would be JFXtras agenda.
http://jfxtras.org/overview.html
I'm looking for a way to override the cancel and update buttons on a resource. I'm new'ish to Nova.
I would like to add a class to the container for the cancel and update actions (see image). So far I can't figure out how to do that. There doesn't seem to be any unique class names or data attributes that allow me to target this section.
Is there a way to accomplish this?
Are there any concerns I should have if I do?
As i know, there is no way to add class to these buttons, without modify nova's core. But you can edit styles of existing elements. Check nova's docs about it.
How does one add a picker to the eWam menu, using an application descriptor?
When I attempt to add a picker, I am unable to find the exact method by which to add the picker.
The add a "Picker Bag Manager" entry point to an application descriptor:
navigate in eWAM to the application descriptors list on the run tab.
modify that app desc.
go to the desktop contents tab
Click the Group descriptor (aWFDesktopGroupDescriptor) under which you would like the add the picker.
Click the "Add others EP..." button.
Choose Picker bag manager.
Choose the class you want to pick. Ideally that class has a designated picker already, in which case you don't need to declare it on the PBM. if it is not set on the base class, you should set it on the base class, if this is not possible or you need to use a custom picker, declare it in the PBM entry point.
Remember to set the bitmaps
Remember to add Actions if necessary.
Save and test.
Whatever I do, only theme set in application properties applies. Theme id doesnt work as expected.
For example:
I have two custom controls and each has 5 views. I try to set view title property for all views in first custom control with theme and same with second custom control, but with different theme (and title).
Both custom controls exist on same page.
Problem Im trying to solve is, instead of typing functions for properties for each component of same type I want to do it only in one place. In that case all views in one custom control. Or all views in a panel...
Regarding Themes: afaik we only can define a single theme per application. This theme can inherit from other themes but those need to be installed and registered at the file system level for the entire server.
Regarding your scenario:
If you really want to solve that with themes you could work with separate theme ids. But I really don't see the benefit of using themes here. As far as I understand your task I would solve it using custom properties for your custom controls. The view title would then be computed to reference that property as in
<xp:viewTitle xp:key="viewTitle" id="viewTitle1"
value="#{javascript:compositeData.ccViewTitle}">
</xp:viewTitle>
At design time the containing Xpage or Custom Control would then feed the appropriate view title to the child control:
<xc:ccInner ccViewTitle="View Title for First CC in Page"></xc:ccInner>
<xc:ccInner ccViewTitle="View Title for Second CC in Page"></xc:ccInner>
You also could compute this value, if necessary.
could someone help me with design/understanding the problem: what I need to achieve is page with Panorama/Pivot control, where its items (panos/pivots) will be set via binding, using standard MVVM pattern. Problem is I need to have different content (different user controls) on each pano/pivot, that means If I define a panorama/pivot item template, I doom all of them to be alike, which is not what I want.
I found this question here already asked: Databound windows phone panorama with MVVM design but its still not clear to me. Many thanks.
If you have a dynamic page count on panorama/pivot you could use selector to choose what template is right according to your content.
Implementing DataTemplateSelector
Also, Data Binding Pivot to MVVM may help you too
You could add a dependency property to the user control that you want to use as a data template, a dependency property named "Type" for example and depending on that property you can change the layout of your user control (data template) - for example you could have multiple grids inside your user control and you could show and hide them depending on the type.