Vaadin navigation through views or UI? - vaadin

I'm new in Vaadin. I did vaadin example http://demo.vaadin.com/addressbook/. My question is how I can also create another views and menu which will navigate user. Can I do it with MenuBar? Please explain me right way to do this.

I think everything you need is Navigator.
You can instantiate a navigator and attach it to your current page.
Then you attach views to it, with names.
And when you want to change view, you can simply call Page.getCurrent().getNavigator.navigate(String viewName)
See documentation for more informations.

Related

Umbraco - Reading the nodes

I have a umbraco solution, which has a below piece of code in my view,
var home = Model.AncestorOrSelf(1);
var primaryNav = home.GetPropertyValue<IEnumerable<IPublishedContent>>("primaryNav").Where(n => n.GetPropertyValue<bool>("hideFromNavigation") == false);
From my Umbraco back office, can someone please tell me how can i find the nodes which satisfy the above piece of code.
I'm trying to a new node to the existing navigation bar, but it is not coming up. What could i be missing here?
Please let me know, i'm new to umbraco.
My Umbraco version is 7.2.1
Also, what could be the meaning of "primaryNav", here home.GetPropertyValue<IEnumerable<IPublishedContent>>("primaryNav")
Go to the root page of the website in the back office content tree. On that page there should be a content picker called something like "Primary Nav".
That should show up all of the selected items that should appear. It's also checking for a hide from navigation property, which you'd have to check individually on each of the selected nodes.
How are you trying to add the node to the menu? If it's via the picker, then it SHOULD work, unless the page has the hide from navigation checkbox checked. Also make sure you publish the root page once you've added the page to the picker rather than just saving.
The only other thing that might be causing it to not show up would be if the Partial that renders the navigation is being cached. Look in the view and see if it's using CachedPartial, and if so, that may be your culprit.

"Add view" context menu option missing, why/how do I get it?

I am new to ASP.NET Mvc, recently I started worked on a MVC application. I am unable to find the Add View option when you right click on Controller Action method.
I tried to add it by using Tools>Customize>Commands>Project.../folder/Menus. I am unable to find it. I tried right click on Views>Add>Add View. Then nothing turned up.
Please tell me how to add it? Here how it looks like when I right click on action method.
You can also add in view folder. Right click on view folder then click on add and select view. Please give the name of view same as action name. So you no need to explicitly use the name of view in action method.
In between make sure your application not in running/debug mode. So stop before trying to add view.
When right-clicking on a controller action name, I get the Add View option. However, you can also simply right-click on the Views folder and add a new View.
If it doesn't show, you probably didn't setup the controller correctly. Check the following
Is the name of the controller something like "XXXXscontroller", e.g. "ArticlesController"
Is there a view folder, e.g. "View/Articles"? Make sure the name is identical to the name of the controller without the "controller", i.e. ArticlesController --> Articles
Rebuild the project

How can you tell a field name on a view of an MVC application?

I'm new to web programming. I have an MVC application that I want to edit a field on the view. I understand the layout of the URL is {'ClassName' minus Controller keyword/'MethodName'} I don't get how to find the view that I'm looking at though. F12 dev tools don't work worth anything for this either. Please help.
It uses a conventions based approach for view location. By default it should be in the views folder. For example if your controller name is HomeController and your action name is Index then the corresponding view is ~/Views/Home/Index.cshtml.
Right click in the controller Action method, in the options listed you can choose 'Go To View'. This will take you to the view code of the Action of respective controller

navigation with login page

I implemented simple application according of example simple login view. Where we have login-view and main-view. But now, how I can implement on main-view MenuBar where every Items when clicked open different views. And those views are under MenuBar in same place (center on the page under MenuBar, on sample) in main-view. I tried with additional navigator(which name can be subNavigator) in main-view but we must register navigator in UI(I have got appropriate error). Second solution is that I create UI and in init method ManuBar and under it change every views(login-view, view1, view2 etc). But login-view have ManuBar and it is do not looks good. Is there any other way or are other ways to achieve something similar?
Your question is not at all clear. I suggest re-writing it. Perhaps with a sketch image.
TabSheet
Are you aware of the TabSheet widget? An easy way to switch between panes of content.
See the Book Of Vaadin, the class doc, and the live demo.
Also, look at TabSheet in the Reindeer theme as shown in this demo.

JavaFX - button with hyperlink to another page

I want to make an application in JavaFX-2 based on two pages as "main" page and "extras" page. In the main page, I have added a Hbox function which includes a button named "extras". How do I define a second page and how can I set a hyperlink to the button (onMouseClicked event?), to refer to extras page? I could not find any examples on Mouse events related to this question. Thanks for help!
Take a look at the JFX Flow framework - it seems to have the functionality you are requesting, with back and forward navigation and transitions between scenes.
I created a simple wizard implementation in response to a forum post which helps perform some of this scene to scene style navigation. I also created a small sample of animating sliding panes of in and out of the screen which I also created earlier. The code for the two concepts is not linked together, but the code is pretty simple so, it wouldn't be hard to link it.
There is a large source of Canned animations in the FXExperience project as well as plently of inbuilt Transitions in JavaFX.

Resources