atom feed7 messages in org.netbeans.scripting.devRe: View for a new action
FromSent OnAttachments
Arun GuptaMay 14, 2007 7:00 pm 
Tor NorbyeMay 14, 2007 7:16 pm 
Arun GuptaMay 14, 2007 9:09 pm 
Tor NorbyeMay 14, 2007 9:22 pm 
Craig McClanahanMay 14, 2007 11:17 pm 
Tor NorbyeMay 21, 2007 1:50 pm 
Craig McClanahanMay 21, 2007 2:26 pm 
Subject:Re: View for a new action
From:Craig McClanahan (Crai@Sun.COM)
Date:May 14, 2007 11:17:30 pm
List:org.netbeans.scripting.dev

Tor Norbye wrote:

On May 14, 2007, at 9:10 PM, Arun Gupta wrote:

I think having a switch (or a checkbox) that generates view automatically would simplify.

I don't understand... You mean in the code generator dialog? The way you add views right there in place is to add them in the second text field... e.g. open the generator, choose create controller, add controller name "foo", and in the second text field, add views - e.g. "edit update delete" (3 views) - will create everything. (Don't use

That resolves part of the problem :)

But what if I add an action to the controller after first create ? I'll have to create view for it explicitly, right ?

Right. You can run the generator again; it will (by default) skip your controller but generate the files that don't exist - in this case, the view file.

But it won't add the action method :-(. It would be nice if we could generate a new view for an existing controller and have it create *both* the new RHTML file and add the action method to an existing controller.

Craig

-- Tor

-Arun

commas - that didn't work properly until a bug fix I integrated today.) -- Tor

generate a View file, you have to run the code generator. Pay particular attention to the skip/overwrite toggles in that dialog when doing it this way. You probably want "skip" when adding a view for an existing controller.

Yes, that's the default as well.

-Arun

(For more discussions of Ruby tooling, switch to either nb-s@sun.com (internal discussions) or de@scripting.netbeans.org (external discussions - most things should be there). -- Tor

-Arun

--Technology Evangelist Web Technologies and Standards Sun Microsystems, Inc. Blog: http://blogs.sun.com/arungupta

--Technology Evangelist Web Technologies and Standards Sun Microsystems, Inc. Blog: http://blogs.sun.com/arungupta

--Technology Evangelist Web Technologies and Standards Sun Microsystems, Inc. Blog: http://blogs.sun.com/arungupta