Server Error in '/' Application. Multiple controls with the same ID '_menu' were found. FindControl requires that controls have unique IDs. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Multiple controls with the same ID '_menu' were found. FindControl requires that controls have unique IDs.Not the ideal scenario to start my day with, but hopefully i'll have it fixed soon (otherwise it's going to be a loooooong day).. P. UPDATE: well, i don't really know if it was from lack of sleep or stress or something else, but after moving a few more IDs around it's back to normal again.. 2 days & counting..
Showing posts with label portlets. Show all posts
Showing posts with label portlets. Show all posts
Wednesday, August 16, 2006
Murphy's 1st Law: If anything can go wrong, it will
2 days to deadline i installed a package with some updates to parts that shouldn't affect the solution at all, but now all my portals have stopped loading and instead only gives me the below error message no matter what i do to the IDs all over the place.
Etiketter:
development,
portals,
portlets
Friday, August 11, 2006
Hook, line & sinker
I think the first week of being back from vacation is a pseudo-realistic experience:
you wake up each morning thinking 'damn, i so wanna stay in bed', then you get up, go to work and somehow there's tons of stuff to do that wasn't there when you left. Then, as fast as you thought you'd like a couple of weeks more, the first couple of days go by and you're back in the net: hook, line & sinker.
Right now i'm in the process of finalizing the, by far, biggest sitecore solution i've ever built. 100% XAML/Sheer UI based on a number of portals and -tons- of portlets, custom applications, controls, wizards, events, messages, workflows & pipelines (i won't even try to count the number of templates, masters and items). And you know what? i'm loving it. Working with the sitecore adaptation of xaml is damn cool and at times it's been keeping me up at nights (something i thought nothing anymore could ever get me to). It's built on 5.2, not 5.3, but as soon as 5.3 gets a final release i'd like to port it over 'cause i've noticed a lot of things in there that this solution could benefit from. Once the solution is live (and if i get the 'ok' from the captains) i'll post more on it.
Although i haven't slept much this week, come end of next week i'm damn sure gonna make up for it (if there's still a hint of summer outside the walls that is).
Take care,
P.
Etiketter:
development,
portals,
portlets,
sitecore 5.2
Friday, July 07, 2006
5.3 - Follow Up
Lars Nielsen at Sitecore just made my day (and, seeing that it's friday today it couldn't have been done much better), so, i reckon i'll have to have a beer later in his honor.
My plans for a few days of r&r (some call it vacation, but i think vacation is when you have to much time on your hands to know what to do with) are safe and in no apparent danger.
Quick thing about portlets: if you've ever added a contextmenu to a listview in the xaml itself and then used it, you'll notice it magically vanishes after the list is refreshed. well, there's a work-around for that as well.
Assuming the code looks something like the following:
protected Listview BudgetList; // more nice stuff that you're using.. protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!Sitecore.Context.ClientPage.IsEvent) { // some code here to load it all if you have any.. } }All you'll actually really have to do here, for now (i'm sure it'll be fixed and even improved by the rate they're developing) is to add one line to the OnLoad() event:
protected Listview BudgetList; // more nice stuff that you're using.. protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!Sitecore.Context.ClientPage.IsEvent) { BudgetList.ContextMenu = "show:BudgetContextMenu"; // some code here to load it all if you have any.. } }(sorry for the crappy layout of the text, don't really have the time to edit it properly).
Tuesday, July 04, 2006
Problem with DataTreeview & DataContext in a portlet
If you've ever tried writing a portlet containing a DataTreeview & DataContext with the normal DefaultPortletWindow control you've probably noticed that it doesn't work all that well (surely will be fixed in a later release we hope). The problem is that you when you try to expand a node in the DataTreeview you get an error saying DataContext ”” not found. (Method: Sitecore.Web.UI:HtmlControls.Treeview.Toggle(String id)).
For anyone that has actually been affected by this issue or will be in the future, there are two ways to address this issue, either programmatically or via a work-around.
The programmatical approach for this by issue would be to implement all of the code relating to the DataContext and DataTreeview and, for ex, adding it to a Border control or similar in your C# code. This solution though isn't that friendly to use again in another portlet since it involves you writing all the code for yourself.
The work-around is a lot more user-friendly and a solution you might want to adapt instead of writing the same code over and over again each time. In this case, all you have to do is copy the PortletWindow control, rename the control to something else, like myPortletWindow, and save it with a new name where your custom controls are located. After that, apply the new window control to your portlet xml layout replacing the standard one, and save.
So, step by step:
1 – Open PortletWindow control (located at \sitecore\shell\Controls\Portal\Portlet window.xml)
2 – Change the name of the control to something else (in this case myPortletWindow)
3 – Save it somewhere (in this case I’m saving the controls under \sitecore modules\Shell\Example\Controls)
4 – Apply the new window control to the portlet xml layout that you had trouble with and save it
Once you've done this you can use this window control instead of the default control without further need to manage it programmatically.
Etiketter:
development,
portals,
portlets,
sitecore 5.2,
tutorials
Subscribe to:
Posts (Atom)