Build some sort of workflow in JavaFX - javafx-8

I'm trying to build some sort of visual workflow in JavaFX. I want my application to have one main screen with the next and previous buttons, something like an installer. When a user clicks next, all the elements of the next screen appear in the same element. All previous choices of the user have to be saved. So when a user clicks on the previous button that all of his choices are still there.
How would I go on to do this?
I found these links on Google, but they don't seem to help me. Something like this is a bit the direction that I want to go, but the code in this tutorial isnt't really that good for scene's with a lot of elements.

The DataFX Framework provides a Flow API that can be used to define workflows. By doing so you can simply navigate between MVC Groups by only using annotations or configurations. You can find some examples of the API here:
http://www.guigarage.com/2014/06/datafx-tutorial-5/
http://www.guigarage.com/2015/02/quick-overview-datafx-mvc-flow-api/
http://www.guigarage.com/2015/01/datafx-tutorial-6/

I haven't worked with JavaFX in a while, but I'll start by saying I really hope you are using the JavaFX scene builder.
The way I would do it off the top of my head without going back and relearning JavaFX is to create a main window in the scene builder, and have a sort of central content display area, which holds another custom JavaFX container that contains the content you want to display, of which you can then create several of and swap out which one is being displayed programmatically.
Basically, create several smaller components representing each step or screen and display them programmatically in an owning container.

Related

Android - Show Back Button from XML

Before I begin, I want to mention that I've found a million answers showing how to do this from code, which involves setDisplayHomeAsUpEnabled(true) from your Activity. However, what I have not been able to find is a way how to do it from XML. (I would like to hide as much UI code in the XML files as possible).
One article I did find is this, which states
Step 3: Specifying the parent activity name in the AndroidManifest.xml adds the Back-Button arrow
and Click-action. Tapping on the back-arrow takes us to the Parent
Activity i.e Home Screen.
which doesn't work for me (the Back Button doesn't appear). I've followed all the steps in the article.
Does anyone know how to do this via xml? Is it even possible?
Yes, it's possible but still, you have to set the listener in java code. You can create a custom toolbar view and add a button to it. Then create a button in the java file and set the CilckListener.
Or You can use the default toolbar and do setDisplayHomeAsUpEnabled(true) from your Activity.
We usually make a custom toolbar, suppose you need a search bar in the toolbar then what you will do? So try to make an xml then use <include> tag in xml. You can search youtube. Follow the channel CodingInFlow, that guy explains very perfectly. If you don't understand what I am saying then understand the basics first, it will help you learn faster.

How can i make the buttons on my sideabar switch tabs?

I have a UI with 4 buttons on a sidebar I made and I have no clue how I can set it so when you press it, it shows a different screen.
I do not need it to open a new window just so it can change between 4-5 "modes"
I am using Bunifu UI
I just took a quick look at the Buniforms reference docs for their WinForms product (I assume you are using their WinForms product) and it look like you want to use the "Transitions" component
https://devtools.bunifu.co.ke/bunifu-ui-winforms-docs/#bunifu-transition
"Bunifu Transition is a special component, that allows us to have transitions in our Windows Forms apps. This is an amazing feature of Bunifu Framework, because it makes our User Interfaces more interactive and improves massively the User Experience. Let’s see how!"
"Bunifu Transition allows us to apply transitions to other controls."

Web-site with two Composite per page. Due to bad design?

I'm creating a web-site using GWT for the first time. The aplication has two Composite class, one of them is a menu and the other one is where I show de info about the specific menu that has been clicked. I'm using MVP, the class History and the interface ChangeValueHandler to switch among different pages.
I have one pair presenter-view for each Composite. The app begins well creating the menu and the section info. When you click in the menu it works fine showing the information and the token browser is changed. The thing is that if you load a page(eg: myapp.com#register) without loading the home page, it doesn't show you the menu. It loads the Composite section info, but not the Composite menu (the Composite menu is load with myapp.com#home).
I think it's because of a bad design of the application, but I don't know how to do that in other way. If the app only had one Composite it wouldn't be a problem, but when there are 2 or more Composite per page I don't know how to manage the whole thing to work properly.
It's difficult to tell what exactly is wrong, because of the lack of code. So I'm guessing. You should design to act on the PlaceChangeEvent instead of the ValueChangeEvent. That means a menu click should fire the place change and then the application will handle this event. That way you unbind the menu actions from your content pages. And think more of each page as a separate entity. Also take a look at the GWT Activity mechanism and how it helps having a main page that is always the same and on that main page a content area that changes depending on the page actually shown.
You should include your menu in each page instead of creating it once in the home page and then keeping it on screen. I assume you create the menu and add it to the DOM via
RootPanel.get().add(myMenuWidget);
If you are using UIBinder it should be pretty straightforward to include the menu in each page, just a matter of adding the corresponding tag in each .ui.xml file of your pages.

Predefined Add Dialog not working as expected in Lightswitch 2012

I've created a query to use in an AutoCompleteBox and it works as expected when the user select the AutoCompleteBox in the grid as shown in the picture below
However if the user click the plus button to add a new record using the predefined Add Dialog then the query and the AutoCompleteBox's format doesn't work as shown in the picture below
Why is this happening and how I can fix that?
Thanks
I haven't yet found a way to edit the default Add New dialog.
Instead, make a new screen, select the "New Data Screen" template, and link it to your entity data. You can customize the screen to fit your needs, even make it a Modal Window by changing the Control Type in the screen properties. Once you have the screen set up the way you want, go back to your grid screen, and double click on the Add... command in the Command Bar of your grid, to edit the AddAndEditNew_Execute code. In that method, call your custom screen.
So, as I got to thinking about this some more, I came back to the thought I had when I tried to do this a few months ago. There has to be a better way, so I Googled it again.
This time, I found something. He's using an old version of Lightswitch, but I've successfully applied his technique in my application built in Lightswitch 2012.
http://www.c-sharpcorner.com/UploadFile/051e29/modal-window-in-editable-grid-screen-in-lightswitch-2011/

How to get the present object in an Eclipse RCP view?

I'm starting with the coding of an Eclipse RCP and be relatively new to the RCP-World.
Currently i have one perspective with two views. One is a list with a tableViewer which shows a few names of workers.
The second view is a "single view" with a few textboxes. I use the ISelectionListener to notify when i have selected another entry in the list, so i can set the text boxes in the "single view" wiht the current selected worker objetc.
I didn't wrote the code on my own, and i used this page (Vogella) to learn all the stuff behind RCP.
My question is: How can i get the current Object showed by the active view? I mean, i have it
because of the SelectionListener, but i want to click on my own "save"
button to update changes to the object.
I want the object in the single view, so do i need another change listener, or is the object stored in the view and can i get it with the ISelection Interface?
Can someone tell me in one or two sentences how it works? Or is it
just too simple, because i couldn't find anything elsewhere.
This can be done, but is not very easy, because the behaviour is not very standard. You are treating the two views as one usually deals with linked controls of a dialog or window. That's not necessarily wrong, but i smells bad (I cannot recall an example in the Eclipse IDE). Are you sure you are not confusing the roles of Views and Viewers? A View, in Eclipse, is a "Part" of a Workbench (you have basically Views and Editors), each view shows information and/or performs actions, but they are typically quite decoupled, you should be able open and close freely and independently each View, they rarely interact with each other directly (they typically display information or modify objects in the workspace). Further, you should not have a "Save" button in a View (again, look at the Eclipse IDE as an example), changes done throught a view should be direct.
It is very doubtful for me that your design here in sound, perhaps you should instead use a single View, or a dialog. I suggest you to read more about Views.