This is a migrated thread and some comments may be shown as answers.

[Solved] Methode Action() : some of route values are null

1 Answer 60 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
walid
Top achievements
Rank 1
walid asked on 24 Feb 2010, 04:54 PM
Hi,
I'am having a little issue when passing parameters to methode .Action() in MenuBuilderItem,
except the first , they are null when they passed to my Controller's methode.
Here a sample of my code :
View :

<%

MenuBuilder Menu = Html.Telerik().Menu();

 

Menu

.Name(

"Menu")

 

.Orientation(

MenuOrientation.Horizontal)

 

.HighlightPath(

false)

 

.Items(menu =>

{

menu.Add()

.Text(

"Proprits")

 

.Selected(((

PubSelectedTab)ViewData[Keys.PubSelectedTab]) == PubSelectedTab.properties);

 

 

menu.Add()

.Text(

"Primtre")

 

.Selected(((

PubSelectedTab)ViewData[Keys.PubSelectedTab]) == PubSelectedTab.Perimeter);

 

 

menu.Add()

.Text(

"Tags et actions")

 

.Selected(((

PubSelectedTab)ViewData[Keys.PubSelectedTab]) == PubSelectedTab.ActionsAndTags)

 

.Action(

"DisplayTabContent", "Publisher", new { publisherId = 4, tabIndex = 5 });

 

menu.Add()

.Text(

"Audience")

 

.Selected(((

PubSelectedTab)ViewData[Keys.PubSelectedTab]) == PubSelectedTab.Audition);

 

})

.Render();

%>

Controller Methode :

 

 

public ActionResult DisplayTabContent(int? publisherId, int? tabIndex)

 

{

 

       
       //TODO   
         return
View();

 

}

 

tabIndex is always null ?

Would Appreciate any help

Thanks

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 26 Feb 2010, 09:25 AM
Hi walid,

I could not reproduce the depicted issue.
I have created a test project using the latest fixes version of the components, which attached to this message.

All the best,
Georgi Krustev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Menu
Asked by
walid
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or