Use '.Recycle' first off!

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Noone
Sent: Monday, 1 December 2008 10:57 AM
To: listserver@ozMOSS.com
Subject: RE: [OzMOSS] VS Project type for feature - a few questions

 

Many thanks for all the advice so far. I'm hoping it'll just keep coming! J

 

I've successfully deployed my solution and activated the feature for my site 
collection.

 

All my libraries now have the Delete All action (security trimmed) and "Copy 
Item" ECB command. Nice!

 

The Delete All Items action works great. In fact it works too well! I was 
expecting some kind of confirmation, or at least to find the deleted items in 
the user recycle bin. But it seems the item is completely removed and not 
retrievable. K

 

I fear my code is far too simplistic/brutal and possibly quite dangerous in its 
current state. Ideally I'd like to add a confirmation dialog (at least) that 
perhaps includes a checkbox to Permanently Delete All Items, or default to 
moving them to end-user or admin recycle bin.

 

Can the following source be easily modified to accommodate this?

 

à SOURCE - DeleteAllListAction.aspx

 

<%

        SPWeb oWeb = SPContext.Current.Web; 

 

        SPList oList = oWeb.Lists[new Guid(Context.Request["List"])];

 

        oWeb.AllowUnsafeUpdates = true;

    

        for (int c = oList.Items.Count - 1; c >= 0; c--)

            oList.Items[c].Delete();

    

        Context.Response.Redirect(oWeb.Url + "/" + oList.RootFolder.Url);   

%>

 

All advice much appreciated.

 

Am also having some trouble with the Copy Item command but am changning all 
this so it's handled by a cookie and will allow pasting to a different location.

 

Regards,

Paul

 

From: Paul Noone [mailto:[EMAIL PROTECTED] 
Sent: Friday, 28 November 2008 2:40 PM
To: Clayton James
Subject: RE: [OzMOSS] VS Project type for feature - a few questions

 

Thanks again. Was just doing so. J

 

Regards,

Paul

Online Developer, ICT
CEO Sydney

From: Clayton James [mailto:[EMAIL PROTECTED] 
Sent: Friday, 28 November 2008 3:37 PM
To: Paul Noone
Subject: RE: [OzMOSS] VS Project type for feature - a few questions

 

MS have release a user guide on using VSeWSS so make sure you download and have 
a look.

 

Lots of nice examples to get you started.

http://www.microsoft.com/downloads/details.aspx?FamilyId=A8A4E775-074D-4451-BE39-459921F79787&displaylang=en

 

cheers

 

CJ

________________________________

From: Paul Noone [mailto:[EMAIL PROTECTED]
Sent: Fri 28/11/2008 3:29 PM
To: Clayton James
Subject: RE: [OzMOSS] VS Project type for feature - a few questions

Cheers mate. Much more user-friendly than AC's article which I'd already given 
myself a headache over.

 

The lack of offical documentation for this sort of stuff is really quite 
aggravating.

 

Cheers,

 

Paul

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clayton James
Sent: Friday, 28 November 2008 2:53 PM
To: listserver@ozMOSS.com
Subject: RE: [OzMOSS] VS Project type for feature - a few questions

 

Hi Paul

 

VSeWSS doesn't have an exact template for Custom Actions.

 

You first create a Empty sharepoint project and then add a new Module template.

 

I have an example here. This example creates a custom action for a code behind 
page in sharepoint.

http://claytonj.wordpress.com/2008/04/13/sharepoint-code-behind-demo-using-vsewss11/

 

HTH

 

CJ

________________________________

From: [EMAIL PROTECTED] on behalf of Paul Noone
Sent: Fri 28/11/2008 11:43 AM
To: listserver@ozMOSS.com
Subject: [OzMOSS] VS Project type for feature - a few questions

Hi all,

 

I finally have some developer questions! This is my first foray into creating a 
feature for MOSS so please be gentle. J

 

I have created a custom list action and a 'copy item' command for the ECB and 
would now like to deploy them with a single feature.

 

I now have the following files and folder structure:

 

CopyDeleteAll.ListActions\12\TEMPLATE\FEATURES\CEOCopyDeleteAllListAction\feature.xml

CopyDeleteAll.ListActions\12\TEMPLATE\FEATURES\CEOCopyDeleteAllListAction\actions.xml

 

CEO.CopyDeleteAll.ListActions\12\TEMPLATE\LAYOUTS\myCustomPages\CopyListItemECB.aspx

CEO.CopyDeleteAll.ListActions\12\TEMPLATE\LAYOUTS\myCustomPages\DeleteAllListAction.aspx

 

So far so good.

 

I would now like to wrap everything up in a solution but WSPBuilder Extensions 
expects a project file.

 

So...

 

Questions:

-      What type of  project file should I start with for something like this? 
I have the VSeWSS for VS 2008 installed.

-      Do I install on the application server or (one of) the web front ends?

-      Can I set the scope to Site?

-      Is there anything preventing me from just copying the files to their 
destination manually?

-      Does this require an IIS reset?

-      Is there anything else I should know?

Thanks in advance,


Paul

 

------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.
Powered by mailenable.com 

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.11/1816 - Release Date: 27/11/2008 
07:53 PM

------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.
Powered by mailenable.com 




------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.

Powered by mailenable.com

Reply via email to