tags:

views:

903

answers:

1

I am trying to add a view to a custom list. The target is MOSS 2007, I am using VS2008 w/ VSeWSS 1.3. The feature already has a custom list definition, including a custom view called "Calendar". To get started I thought I'd create another view called NewCalendar that is simply a duplicate of the existing custom view Calendar.

So, I copied Calendar.aspx to NewCalendar.aspx, copied the existing "View" node for the current calendar and pasted a new node, then changed the following attributes of the new node: DisplayName, Url, and DefaultView.

When I refresh WSP View NewCalendar.aspx shows up. When I deploy and go to NewCalendar.aspx i get a 404. Using SharePoint Manager I confirm the page is not present.

How do I add a custom view via a feature so that it shows up in the "View" drop-down?

UPDATE: It works if I create a new instance of my custom list. How do I get the custom view to show up on existing lists?

+2  A: 

Unfortunately features in general are not retroactive. You cannot update a feature and expect all existing items that were created from that feature to be updated. This i assume is by design. If this were possible it could potentially have far reaching (unexpected) consequences.

In these senario's i script out a retrofit script, when publishing the new feature.

Robert Sweeney