Primefaces SlideMenu- change initial state - primefaces

We are using SlideMenu from primefaces (v3.5). Let's say there is a main menu and 2 sub menus. Is it possible to change the default view of the SlideMenu so that I see the 1st submenu always. Could someone help me on this?

Related

Showing different text on dropdown selection vs dropdown options

I have a requirement where my drop-down values in my select are an expanded div which has 3 lines. For example my options Could be something like below
Honda Accord
19'
Blue
--------------
Honda Civic
17'
Red
This is what my dropdown would look like when expanded. So instead of regular one line option I have a div with more detailed options. The challenge I am facing is when making my selection (I can correctly display the grid as above) my dropdown selection value shows as the context of the whole div. So for example my dropdown after selection would look like this.
[Honda Civic17'Red]
I am using Angular Material for my dropdown. Is anyone aware of a way to set the selection to another value than the option text? For example I would like my dropdown when selected to display [Honda Civic] instead of [Honda Covic17'Red].
Any help would be appreciated.
Thank you.
You can customize the display of the selected item using MatSelectTrigger. An example is provided here: https://material.angular.io/components/select/overview#customizing-the-trigger-label.

Angular mouseover and leave not working MAT-MENU

I have a mat-sidenav and a list of mat-item and mat-menu. Then when I hover over of one of the items I want the menu to display. This part is working. But then when I move off of that menu or item and over a new item I want its menu to display.
https://stackblitz.com/edit/angular-xsscrm
I have included a stackblitz with a demo of the behavior.
What is wrong here I have both on enter and exit, but then when I leave a menu on to a new one, it doesnt open unless I click on it.
Thanks for the help
The issue here is that when a menu opens, it creates an overlay with a backdrop that overlaps all elements. This backdrop is causing the mouse events to not be 'seen' by the listening element until the overlay is dismissed via a mouse click. Luckily, the menu control has a flag to remove the backdrop; setting this to false fixes the issue you're seeing.
Side note: you have an *ngFor on the <mat-list> element, but I think you want to move it to the <mat-list-item> element instead because you want many list items, not many lists. Since you're using the local variable of *ngFor outside of the <mat-list-item>, you can create an <ng-container> element to house your *ngFor. See below stackblitz:
https://stackblitz.com/edit/angular-xsscrm-kx6jyd
Another side note: this behavior is similar to a tooltip. Perhaps that would be a better control for your use-case? https://material.angular.io/components/tooltip/overview

Selecting a specific dropdown value based on how you navigated to a page

I've had a look around but not finding what I'm looking for, or I'm not searching for the right thing.
Language: ASP.NET
Basic idea of my problem:
2 pages - 1st page has 4 buttons, 2nd page has a dropdown box with 4 options.
If I press button 1 I want option 1 in the dropdown to be selected when I navigate, if I was button 2 then I want option 2 in the dropdown to be selected.
I still want to be able to change the value in the dropdown after navigation BUT the initial value should depend on which button I pressed.
Any help or guidance would be appreciated.
You can transmit index of button via ViewBag. And in the 2nd page you set the property "selected" for the item which have the same index with value received from ViewBag.

Joomla - Displaying Submenu OF all pages ON all pages

I have a problem using Joomla 2.5.
I'm displaying my navigation on a different way than usual. My mainMenu and subMenu are positioned separated from each other. (Required by the jQuery animation I've implemented)
There is a need to retain the menuStructure therefor i've created the following menu:
(in this example I only give the first 2 mainMenuItems a subMenu)
mainMenuItem #1 {Alias of subMenuHead #1}
mainMenuItem #2 {Alias of subMenuHead #2}
mainMenuItem #3
mainMenuItem #4
The Submenu's:
in the settings, only the first level of Children are displayed!
subMenuHead #1
subMenuItem #1.1
subMenuItem #1.2
subMenuHead #2
subMenuItem #2.1
subMenuItem #2.2
My Problem?
The subMenus are only being displayed if the user is on the Parent-page or the actual page it self. Even when set they should display on all pages.
So for example: When I navigate to mainMenuItem #3 I am unable to see any subMenus.When I navigate to subMenuItem #1.2 I only see the subMenu of mainMenuItem #1.
When I navigate to subMenuItem #2.1 I only see the subMenu of mainMenuItem #2.
What I want:
All subMenus being displayed, on all pages (Menu Assignment is set like so).
Don't understand? Maybe the direct link may help :) (Dutch-text): http://www.notabilisweb.nl/tenc2012/
Thanks in advance!
I'm assuming that you are using the default Joomla menu module. In the module you are using to display the submenu, you should make sure that the "Show Sub-menu Items" setting is set to Yes.

Make 1 dropdown, change 2 other dropdown values

How to make a dropDown linked to 2 dropdown. ie if i select a value of a dropdown then depending on that value 2 more dropdown values should be changes. am using the following example: http://www.javascriptkit.com/script/script2/triplecombo.shtml. i need the values of dropdown 2 and dropdown 4 to be populated depending on the values selected on dropdown 1.
U can use Ajax if you need to make things without refreshing the page. Here is an answer to your question. hope its suitable. If you know ajax then you can always use this.
DropDown Menu Changing OnChange
What did you try yet? Where are you stuck?
Use javascript, just like in your link...
Other examples:
http://www.9lessons.info/2010/08/dynamic-dependent-select-box-using.html
http://r-ednalan.blogspot.com/2011/03/dynamic-select-box-using-jquery-ajax.html
http://blog.chapagain.com.np/using-jquery-ajax-populate-selection-list/
http://codeassembly.com/Simple-chained-combobox-plugin-for-jQuery/
...