Search Results

Search found 23674 results on 947 pages for 'custom action'.

Page 1/947 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • WiX Action Sequence

    - by Damian Vogel
    I was looking for list of actions and their sequence when running a WiX setup. Somehow the official website doesn't seem to provide any information. The basic problem is that I want to schedule my custom actions correctly. Typically I need to register a DLL with regsvr32.exe, and this can only be done once the files are copied to the harddrive. However the custom action <Custom Action="RegisterShellExt" After="InstallFiles"> failed with the error message "file not found". What I've done then is analizing the log of my MSI with WiX Edit, and I've found that the Action InstallFiles exists more than once. And effectively the files are written only the second time it appears. So I changed my custom action to the following : <Custom Action="RegisterShellExt" Before="InstallFinalize"> Here is the sequence I've extracted from the logs of my MSI: Action start 15:16:49: INSTALL. Action start 15:16:49: PrepareDlg. Action start 15:16:49: AppSearch. Action start 15:16:49: LaunchConditions. Action start 15:16:49: ValidateProductID. Action start 15:16:49: DIRCA_NEWRETARGETABLEPROPERTY1.5D429292039C46FCA3253E37B4DA262A. Action start 15:16:50: CostInitialize. Action start 15:16:50: FileCost. Action start 15:16:50: CostFinalize. Action start 15:16:50: WelcomeDlg. Action 15:16:51: LicenseAgreementDlg. Dialog created Action 15:16:53: CustomizeDlg. Dialog created Action 15:16:55: VerifyReadyDlg. Dialog created Action start 15:16:56: ProgressDlg. Action start 15:16:56: ExecuteAction. Action start 15:16:58: INSTALL. Action start 15:16:58: AppSearch. Action start 15:16:58: LaunchConditions. Action start 15:16:58: ValidateProductID. Action start 15:16:58: CostInitialize. Action start 15:16:59: FileCost. Action start 15:16:59: CostFinalize. Action start 15:16:59: InstallValidate. Action start 15:17:00: InstallInitialize. Action start 15:17:08: ProcessComponents. Action 15:17:09: GenerateScript. Generating script operations for action: Action ended 15:17:09: ProcessComponents. Return value 1. Action start 15:17:09: UnpublishFeatures. Action start 15:17:09: RemoveShortcuts. Action start 15:17:09: RemoveFiles. Action start 15:17:09: InstallFiles. Action start 15:17:10: CreateShortcuts. Action start 15:17:10: RegisterUser. Action start 15:17:10: RegisterProduct. Action start 15:17:10: PublishFeatures. Action start 15:17:10: PublishProduct. Action start 15:17:10: ConfigureInstaller. Action start 15:17:10: InstallFinalize. Action 15:17:10: ProcessComponents. Updating component registration Action 15:17:12: InstallFiles. Copying new files Action 15:17:21: CreateShortcuts. Creating shortcuts Action 15:17:21: RegisterProduct. Registering product Action 15:17:23: ConfigureInstaller. [[note: CustomAction]] Action 15:17:22: PublishFeatures. Publishing Product Features Begin CustomAction 'ConfigureInstaller' Action 15:17:28: RollbackCleanup. Removing backup files Action ended 15:17:28: InstallFinalize. Return value 1. Action start 15:17:28: RegisterShellExt. [[note: CustomAction]] Action ended 15:17:33: INSTALL. Return value 1. Action start 15:17:35: ExitDialog. Does anyone know an official listing?

    Read the article

  • Custom rails route problem with 2.3.8 and Mongrel

    - by CHsurfer
    I have a controller called 'exposures' which I created automatically with the script/generate scaffold call. The scaffold pages work fine. I created a custom action called 'test' in the exposures controller. When I try to call the page (http://127.0.0.1:3000/exposures/test/1) I get a blank, white screen with no text at all in the source. I am using Rails 2.3.8 and mongrel in the development environment. There are no entries in development.log and the console that was used to open mongrel has the following error: You might have expected an instance of Array. The error occurred while evaluating nil.split D:/Rails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/cgi_process.rb:52:in dispatch_cgi' D:/Rails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:101:in dispatch_cgi' D:/Rails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:27:in dispatch' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/rails.rb:76:in process' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/rails.rb:74:in synchronize' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/rails.rb:74:in process' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:159:in process_client' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:158:in each' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:158:in process_client' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:285:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:285:in initialize' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:285:in new' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:285:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:268:in initialize' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:268:in new' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel.rb:268:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/configurator.rb:282:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/configurator.rb:281:in each' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/configurator.rb:281:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/mongrel_rails:128:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/../lib/mongrel/command.rb:212:in run' D:/Rails/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/bin/mongrel_rails:281 D:/Rails/ruby/bin/mongrel_rails:19:in load' D:/Rails/ruby/bin/mongrel_rails:19 Here is the exposures_controller code: class ExposuresController < ApplicationController # GET /exposures # GET /exposures.xml def index @exposures = Exposure.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @exposures } end end #/exposure/graph/1 def graph @exposure = Exposure.find(params[:id]) project_name = @exposure.tender.project.name group_name = @exposure.tender.user.group.name tender_desc = @exposure.tender.description direction = "Cash Out" direction = "Cash In" if @exposure.supply currency_1_and_2 = "#{@exposure.currency_in} = #{@exposure.currency_out}" title = "#{project_name}:#{group_name}:#{tender_desc}/n" title += "#{direction}:#{currency_1_and_2}" factors = Array.new carrieds = Array.new days = Array.new @exposure.rates.each do |r| factors << r.factor carrieds << r.carried days << r.day.to_s end max = (factors+carrieds).max min = (factors+carrieds).min g = Graph.new g.title(title, '{font-size: 12px;}') g.set_data(factors) g.line_hollow(2, 4, '0x80a033', 'Bounces', 10) g.set_x_labels(days) g.set_x_label_style( 10, '#CC3399', 2 ); g.set_y_min(min*0.9) g.set_y_max(max*1.1) g.set_y_label_steps(5) render :text = g.render end def test render :text = "this works" end # GET /exposures/1 # GET /exposures/1.xml def show @exposure = Exposure.find(params[:id]) @graph = open_flash_chart_object(700,250, "/exposures/graph/#{@exposure.id}") #@graph = "/exposures/graph/#{@exposure.id}" respond_to do |format| format.html # show.html.erb format.xml { render :xml => @exposure } end end # GET /exposures/new # GET /exposures/new.xml def new @exposure = Exposure.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @exposure } end end # GET /exposures/1/edit def edit @exposure = Exposure.find(params[:id]) end # POST /exposures # POST /exposures.xml def create @exposure = Exposure.new(params[:exposure]) respond_to do |format| if @exposure.save flash[:notice] = 'Exposure was successfully created.' format.html { redirect_to(@exposure) } format.xml { render :xml => @exposure, :status => :created, :location => @exposure } else format.html { render :action => "new" } format.xml { render :xml => @exposure.errors, :status => :unprocessable_entity } end end end # PUT /exposures/1 # PUT /exposures/1.xml def update @exposure = Exposure.find(params[:id]) respond_to do |format| if @exposure.update_attributes(params[:exposure]) flash[:notice] = 'Exposure was successfully updated.' format.html { redirect_to(@exposure) } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @exposure.errors, :status => :unprocessable_entity } end end end # DELETE /exposures/1 # DELETE /exposures/1.xml def destroy @exposure = Exposure.find(params[:id]) @exposure.destroy respond_to do |format| format.html { redirect_to(exposures_url) } format.xml { head :ok } end end end Clever readers will notice the 'graph' action. This is what I really want to work, but if I can't even get the test action working, then I'm sure I have no chance. Any ideas? I have restarted mongrel a few times with no change. Here is the output of Rake routes (but I don't believe this is the problem. The error would be in the form of and HTML error response). D:\Rails\rails_apps\fxrake routes (in D:/Rails/rails_apps/fx) DEPRECATION WARNING: Rake tasks in vendor/plugins/open_flash_chart/tasks are deprecated. Use lib/tasks instead. (called from D:/ by/gems/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10) rates GET /rates(.:format) {:controller="rates", :action="index"} POST /rates(.:format) {:controller="rates", :action="create"} new_rate GET /rates/new(.:format) {:controller="rates", :action="new"} edit_rate GET /rates/:id/edit(.:format) {:controller="rates", :action="edit"} rate GET /rates/:id(.:format) {:controller="rates", :action="show"} PUT /rates/:id(.:format) {:controller="rates", :action="update"} DELETE /rates/:id(.:format) {:controller="rates", :action="destroy"} tenders GET /tenders(.:format) {:controller="tenders", :action="index"} POST /tenders(.:format) {:controller="tenders", :action="create"} new_tender GET /tenders/new(.:format) {:controller="tenders", :action="new"} edit_tender GET /tenders/:id/edit(.:format) {:controller="tenders", :action="edit"} tender GET /tenders/:id(.:format) {:controller="tenders", :action="show"} PUT /tenders/:id(.:format) {:controller="tenders", :action="update"} DELETE /tenders/:id(.:format) {:controller="tenders", :action="destroy"} exposures GET /exposures(.:format) {:controller="exposures", :action="index"} POST /exposures(.:format) {:controller="exposures", :action="create"} new_exposure GET /exposures/new(.:format) {:controller="exposures", :action="new"} edit_exposure GET /exposures/:id/edit(.:format) {:controller="exposures", :action="edit"} exposure GET /exposures/:id(.:format) {:controller="exposures", :action="show"} PUT /exposures/:id(.:format) {:controller="exposures", :action="update"} DELETE /exposures/:id(.:format) {:controller="exposures", :action="destroy"} currencies GET /currencies(.:format) {:controller="currencies", :action="index"} POST /currencies(.:format) {:controller="currencies", :action="create"} new_currency GET /currencies/new(.:format) {:controller="currencies", :action="new"} edit_currency GET /currencies/:id/edit(.:format) {:controller="currencies", :action="edit"} currency GET /currencies/:id(.:format) {:controller="currencies", :action="show"} PUT /currencies/:id(.:format) {:controller="currencies", :action="update"} DELETE /currencies/:id(.:format) {:controller="currencies", :action="destroy"} projects GET /projects(.:format) {:controller="projects", :action="index"} POST /projects(.:format) {:controller="projects", :action="create"} new_project GET /projects/new(.:format) {:controller="projects", :action="new"} edit_project GET /projects/:id/edit(.:format) {:controller="projects", :action="edit"} project GET /projects/:id(.:format) {:controller="projects", :action="show"} PUT /projects/:id(.:format) {:controller="projects", :action="update"} DELETE /projects/:id(.:format) {:controller="projects", :action="destroy"} groups GET /groups(.:format) {:controller="groups", :action="index"} POST /groups(.:format) {:controller="groups", :action="create"} new_group GET /groups/new(.:format) {:controller="groups", :action="new"} edit_group GET /groups/:id/edit(.:format) {:controller="groups", :action="edit"} group GET /groups/:id(.:format) {:controller="groups", :action="show"} PUT /groups/:id(.:format) {:controller="groups", :action="update"} DELETE /groups/:id(.:format) {:controller="groups", :action="destroy"} users GET /users(.:format) {:controller="users", :action="index"} POST /users(.:format) {:controller="users", :action="create"} new_user GET /users/new(.:format) {:controller="users", :action="new"} edit_user GET /users/:id/edit(.:format) {:controller="users", :action="edit"} user GET /users/:id(.:format) {:controller="users", :action="show"} PUT /users/:id(.:format) {:controller="users", :action="update"} DELETE /users/:id(.:format) {:controller="users", :action="destroy"} /:controller/:action/:id /:controller/:action/:id(.:format) D:\Rails\rails_apps\fxrails -v Rails 2.3.8 Thanks in advance for the help -Jon

    Read the article

  • Custom ASP.Net MVC 2 ModelMetadataProvider for using custom view model attributes

    - by SeanMcAlinden
    There are a number of ways of implementing a pattern for using custom view model attributes, the following is similar to something I’m using at work which works pretty well. The classes I’m going to create are really simple: 1. Abstract base attribute 2. Custom ModelMetadata provider which will derive from the DataAnnotationsModelMetadataProvider   Base Attribute MetadataAttribute using System; using System.Web.Mvc; namespace Mvc2Templates.Attributes {     /// <summary>     /// Base class for custom MetadataAttributes.     /// </summary>     public abstract class MetadataAttribute : Attribute     {         /// <summary>         /// Method for processing custom attribute data.         /// </summary>         /// <param name="modelMetaData">A ModelMetaData instance.</param>         public abstract void Process(ModelMetadata modelMetaData);     } } As you can see, the class simple has one method – Process. Process accepts the ModelMetaData which will allow any derived custom attributes to set properties on the model meta data and add items to its AdditionalValues collection.   Custom Model Metadata Provider For a quick explanation of the Model Metadata and how it fits in to the MVC 2 framework, it is basically a set of properties that are usually set via attributes placed above properties on a view model, for example the ReadOnly and HiddenInput attributes. When EditorForModel, DisplayForModel or any of the other EditorFor/DisplayFor methods are called, the ModelMetadata information is used to determine how to display the properties. All of the information available within the model metadata is also available through ViewData.ModelMetadata. The following class derives from the DataAnnotationsModelMetadataProvider built into the mvc 2 framework. I’ve overridden the CreateMetadata method in order to process any custom attributes that may have been placed above a property in a view model.   CustomModelMetadataProvider using System; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; using Mvc2Templates.Attributes; namespace Mvc2Templates.Providers {     public class CustomModelMetadataProvider : DataAnnotationsModelMetadataProvider     {         protected override ModelMetadata CreateMetadata(             IEnumerable<Attribute> attributes,             Type containerType,             Func<object> modelAccessor,             Type modelType,             string propertyName)         {             var modelMetadata = base.CreateMetadata(attributes, containerType, modelAccessor, modelType, propertyName);               attributes.OfType<MetadataAttribute>().ToList().ForEach(x => x.Process(modelMetadata));               return modelMetadata;         }     } } As you can see, once the model metadata is created through the base method, a check for any attributes deriving from our new abstract base attribute MetadataAttribute is made, the Process method is then called on any existing custom attributes with the model meta data for the property passed in.   Hooking it up The last thing you need to do to hook it up is set the new CustomModelMetadataProvider as the current ModelMetadataProvider, this is done within the Global.asax Application_Start method. Global.asax protected void Application_Start()         {             AreaRegistration.RegisterAllAreas();               RegisterRoutes(RouteTable.Routes);               ModelMetadataProviders.Current = new CustomModelMetadataProvider();         }   In my next post, I’m going to demonstrate a cool custom attribute that turns a textbox into an ajax driven AutoComplete text box. Hope this is useful. Kind Regards, Sean McAlinden.

    Read the article

  • Rails 3 Form For Custom Action

    - by Andrew
    I'm having trouble routing a form to a custom action in Rails 3. Here are my routes: resources :photos do resources :comments collection do get 'update_states' end member do put 'upload' end end Here's the form_for: form_for @photo, :remote => true, :url => { :action => upload_photo_path(@photo) }, :html => { :multipart => :true, :method => 'put' } do |f| And here's the error message: No route matches {:action=>"/photos/42/upload", :controller=>"photos"} ... this is especially frustrating because "photos/:id/upload" is exactly the correct action for this form. What am I missing? EDITS - Here are the original Photo-related routes: photo_comments GET /photos/:photo_id/comments(.:format) {:action=>"index", :controller=>"comments"} POST /photos/:photo_id/comments(.:format) {:action=>"create", :controller=>"comments"} new_photo_comment GET /photos/:photo_id/comments/new(.:format) {:action=>"new", :controller=>"comments"} edit_photo_comment GET /photos/:photo_id/comments/:id/edit(.:format) {:action=>"edit", :controller=>"comments"} photo_comment GET /photos/:photo_id/comments/:id(.:format) {:action=>"show", :controller=>"comments"} PUT /photos/:photo_id/comments/:id(.:format) {:action=>"update", :controller=>"comments"} DELETE /photos/:photo_id/comments/:id(.:format) {:action=>"destroy", :controller=>"comments"} update_states_photos GET /photos/update_states(.:format) {:action=>"update_states", :controller=>"photos"} upload_photo PUT /photos/:id/upload(.:format) {:action=>"upload", :controller=>"photos"} photos GET /photos(.:format) {:action=>"index", :controller=>"photos"} POST /photos(.:format) {:action=>"create", :controller=>"photos"} new_photo GET /photos/new(.:format) {:action=>"new", :controller=>"photos"} edit_photo GET /photos/:id/edit(.:format) {:action=>"edit", :controller=>"photos"} photo GET /photos/:id(.:format) {:action=>"show", :controller=>"photos"} PUT /photos/:id(.:format) {:action=>"update", :controller=>"photos"} DELETE /photos/:id(.:format) {:action=>"destroy", :controller=>"photos"} Here are the relevant routes when I changed the route to match 'upload': photo_comments GET /photos/:photo_id/comments(.:format) {:action=>"index", :controller=>"comments"} POST /photos/:photo_id/comments(.:format) {:action=>"create", :controller=>"comments"} } new_photo_comment GET /photos/:photo_id/comments/new(.:format) {:action=>"new", :controller=>"comments"} edit_photo_comment GET /photos/:photo_id/comments/:id/edit(.:format) {:action=>"edit", :controller=>"comments"} photo_comment GET /photos/:photo_id/comments/:id(.:format) {:action=>"show", :controller=>"comments"} PUT /photos/:photo_id/comments/:id(.:format) {:action=>"update", :controller=>"comments"} DELETE /photos/:photo_id/comments/:id(.:format) {:action=>"destroy", :controller=>"comments"} update_states_photos GET /photos/update_states(.:format) {:action=>"update_states", :controller=>"photos"} upload_photo /photos/:id/upload(.:format) {:action=>"upload", :controller=>"photos"} photos GET /photos(.:format) {:action=>"index", :controller=>"photos"} POST /photos(.:format) {:action=>"create", :controller=>"photos"} new_photo GET /photos/new(.:format) {:action=>"new", :controller=>"photos"} edit_photo GET /photos/:id/edit(.:format) {:action=>"edit", :controller=>"photos"} photo GET /photos/:id(.:format) {:action=>"show", :controller=>"photos"} PUT /photos/:id(.:format) {:action=>"update", :controller=>"photos"} DELETE /photos/:id(.:format) {:action=>"destroy", :controller=>"photos"} Unfortunately 'match' didn't work any better... -- EDIT -- Just to confirm another scenario here... with this in the routes: resources :photos do resources :comments collection do get 'update_states' end member do match 'upload' end end and this in the view: form_for @photo, :remote => true, :url => { :action => 'upload' }, :html => { :multipart => :true, :id => 'photo_upload' } do |f| I still get: No route matches {:action=>"upload", :controller=>"photos"}

    Read the article

  • Action delegate in C#

    - by Jalpesh P. Vadgama
    In last few posts about I have written lots of things about delegates and this post is also part of that series. In this post we are going to learn about Action delegates in C#.  Following is a list of post related to delegates. Delegates in C#. Multicast Delegates in C#. Func Delegates in C#. Action Delegates in c#: As per MSDN action delegates used to pass a method as parameter without explicitly declaring custom delegates. Action Delegates are used to encapsulate method that does not have return value. C# 4.0 Action delegates have following different variants like following. It can take up to 16 parameters. Action – It will be no parameter and does not return any value. Action(T) Action(T1,T2) Action(T1,T2,T3) Action(T1,T2,T3,T4) Action(T1,T2,T3,T4,T5) Action(T1,T2,T3,T4,T5,T6) Action(T1,T2,T3,T4,T5,T6,T7) Action(T1,T2,T3,T4,T5,T6,T7,T8) Action(T1,T2,T3,T4,T5,T6,T7,T8,T9) Action(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10) Action(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11) Action(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12) Action(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13) Action(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) Action(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15) Action(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16) So for this Action delegate you can have up to 16 parameters for Action.  Sound interesting!!… Enough theory now. It’s time to implement real code. Following is a code for that. using System; using System.Collections.Generic; namespace DelegateExample { class Program { static void Main(string[] args) { Action<String> Print = p => Console.WriteLine(p); Action<String,String> PrintAnother = (p1,p2)=> Console.WriteLine(string.Format("{0} {1}",p1,p2)); Print("Hello"); PrintAnother("Hello","World"); } } } In the above code you can see that I have created two Action delegate Print and PrintAnother. Print have one string parameter and its printing that. While PrintAnother have two string parameter and printing both the strings via Console.Writeline. Now it’s time to run example and following is the output as expected. That’s it. Hope you liked it. Stay tuned for more updates!!

    Read the article

  • Lot's of errors by insserv on apt-get operations after trying to install tomcat

    - by yankee
    I wanted to install tomcat on my Debian 6.0.4 machine. I tried apt-get install tomcat6-user which worked fine. But then I changed my mind about the user installation and wanted to install the package tomcat6. This resulted in a bunch of errors (see below). Now whatever I try to do with apt-get or with aptitude (trying to remove tomcat6-user, trying to remove tomcat6, trying to perform an apt-get upgrade,...) just results in the same list of errors. How did I manage that? And how can I fix it? # apt-get install tomcat6 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: authbind Suggested packages: tomcat6-docs tomcat6-admin tomcat6-examples libtcnative-1 The following NEW packages will be installed: authbind tomcat6 0 upgraded, 2 newly installed, 0 to remove and 32 not upgraded. Need to get 56.6 kB of archives. After this operation, 442 kB of additional disk space will be used. Do you want to continue [Y/n]? Get:1 http://mirror.hetzner.de/debian/packages/ squeeze/main authbind amd64 1.2.0 [17.3 kB] Get:2 http://mirror.hetzner.de/debian/security/ squeeze/updates/main tomcat6 all 6.0.35-1+squeeze2 [39.3 kB] Fetched 56.6 kB in 0s (441 kB/s) Preconfiguring packages ... Selecting previously deselected package authbind. (Reading database ... 34717 files and directories currently installed.) Unpacking authbind (from .../authbind_1.2.0_amd64.deb) ... Selecting previously deselected package tomcat6. Unpacking tomcat6 (from .../tomcat6_6.0.35-1+squeeze2_all.deb) ... Processing triggers for man-db ... Setting up authbind (1.2.0) ... Setting up tomcat6 (6.0.35-1+squeeze2) ... Creating config file /etc/default/tomcat6 with new version Adding system user `tomcat6' (UID 108) ... Adding new user `tomcat6' (UID 108) with group `tomcat6' ... Not creating home directory `/usr/share/tomcat6'. insserv: warning: script 'S99iptables-custom' missing LSB tags and overrides insserv: warning: script 'iptables-custom' missing LSB tags and overrides insserv: There is a loop at service iptables-custom if started insserv: There is a loop between service rmnologin and mountnfs if started insserv: loop involving service mountnfs at depth 6 insserv: loop involving service networking at depth 5 insserv: loop involving service kbd at depth 9 insserv: There is a loop between service rmnologin and mountall-bootclean if started insserv: loop involving service mountall-bootclean at depth 5 insserv: loop involving service mountall at depth 4 insserv: There is a loop between service iptables-custom and lvm2 if started insserv: loop involving service lvm2 at depth 2 insserv: loop involving service udev at depth 1 insserv: There is a loop at service rmnologin if started insserv: There is a loop between service iptables-custom and checkroot if started insserv: loop involving service checkroot at depth 2 insserv: loop involving service keyboard-setup at depth 1 insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Max recursions depth 99 reached insserv: loop involving service courier-imap-ssl at depth 1 insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: loop involving service hwclockfirst at depth 2 insserv: loop involving service mountoverflowtmp at depth 9 insserv: loop involving service checkfs at depth 6 insserv: loop involving service mdadm-raid at depth 4 insserv: loop involving service hostname at depth 3 insserv: There is a loop between service iptables-custom and ifupdown-clean if started insserv: loop involving service ifupdown-clean at depth 5 insserv: There is a loop between service rmnologin and mountall if started insserv: There is a loop between service iptables-custom and mountdevsubfs if started insserv: loop involving service mountdevsubfs at depth 1 insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: loop involving service mtab at depth 6 insserv: There is a loop between service rmnologin and mountoverflowtmp if started insserv: Starting iptables-custom depends on rmnologin and therefore on system facility `$all' which can not be true! insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header dpkg: error processing tomcat6 (--configure): subprocess installed post-installation script returned error exit status 1 configured to not write apport reports Errors were encountered while processing: tomcat6 E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • rails: "unknown action" message when action is clearly specified

    - by john
    hi, I had hard time to figure out why I've been getting "unknown action" error message when I was do some editing: Unknown action No action responded to 11. Actions: bin, create, destroy, edit, index, new, observe_new, show, tag, update, and vote you can see that Rails did mention each action in the above list - update. And in my form, I did specify action = "update". I wonder if some friends could kindly help me with the missing links... here is the code: edit.rhtml <h1>Editing tip</h1> <% form_tag :action => 'update', :id => @tip do %> <%= render :partial => 'form' %> <p> <%= submit_tag_or_cancel 'Save Changes' %> </p> <% end %> _form.rhtml <%= error_messages_for :tip %> <p><label>Title<br/> <%= text_field :tip, :title %></label></p> <p><label>Categories<br/> <%= select_tag('categories[]', options_for_select(Category.find(:all).collect {|c| [c.name, c.id] }, @tip.category_ids), :multiple => true ) %></label></p> <p><label>Abstract:<br/> <%= text_field_with_auto_complete :tip, :abstract %></label></p> <p><label>Name: <br/> <%= text_field :tip, :name %></label></p> <p><label>Link: <br/> <%= text_field :tip, :link %></label></p> <p><label>Content<br/> <%= text_area :tip, :content, :rows => 5 %></label></p> <p><label>Tags <span>(space separated)</span><br/> <%= text_field_tag 'tags', @tip.tag_list, :size => 40 %></label></p> class TipsController < ApplicationController before_filter :authenticate, :except => %w(index show) # GET /tips # GET /tips.xml def index @tips = Tip.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @tips } end end # GET /tips/1 # GET /tips/1.xml def show @tip = Tip.find_by_permalink(params[:permalink]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @tip } end end # GET /tips/new # GET /tips/new.xml def new @tip = session[:tip_draft] || current_user.tips.build end def create #tip = current_user.tips.build(params[:tip]) #tipMail=params[:email] #if tipMail # TipMailer.deliver_email_friend(params[:email], params[:name], tip) # flash[:notice] = 'Your friend has been notified about this tip' #end @tip = current_user.tips.build(params[:tip]) @tip.categories << Category.find(params[:categories]) unless params[:categories].blank? @tip.tag_with(params[:tags]) if params[:tags] if @tip.save flash[:notice] = 'Tip was successfully created.' session[:tip_draft] = nil redirect_to :action => 'index' else render :action => 'new' end end def edit @tip = Tip.find(params[:id]) end def update @tip = Tip.find(params[:id]) respond_to do |format| if @tip.update_attributes(params[:tip]) flash[:notice] = 'Tip was successfully updated.' format.html { redirect_to(@tip) } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @tip.errors, :status => :unprocessable_entity } end end end def destroy @tip = Tip.find(params[:id]) @tip.destroy respond_to do |format| format.html { redirect_to(tips_url) } format.xml { head :ok } end end def observe_new session[:tip_draft] = current_user.tips.build(params[:tip]) render :nothing => true end end

    Read the article

  • Magento My Account Layout XML Problem

    - by Remy
    Hi there, I'm having issues getting the customer.xml layout file to work properly for the customer's "my account" pages. The navigation links and the previously ordered items that are usually on the left hand side of the page won't show up on the page, but if I change the reference name to "content" in the xml file, it shows up (except it's obviously then on the right hand side). I've checked the template it's referencing (2columns-left.phtml), and the getChildHtml('left') is there in the correct position. The block that's causing the problem: <customer_account> <!-- Mage_Customer --> <reference name="root"> <action method="setTemplate"><template>page/2columns-left.phtml</template></action> </reference> <reference name="left"> <action method="unsetChild"><name>catalog.navigation.all</name></action> <action method="unsetChild"><name>callout.sendcard</name></action> <action method="unsetChild"><name>callout.specialorder</name></action> <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action> <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action> <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action> </block> <block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/> <remove name="tags_popular"/> </reference> </customer_account> This was basically copied straight over from another one of our sites where this works 100%. I've tried everything I can think of (changing the name of the reference in both the template and the layout xml, for example) to no avail. The templates that the layout is referencing are obviously working because they do show up when put into the "content" area. This installation of magento is version 1.3.1.1. I appreciate any advice you have to give me... *Update: I tried changing the reference to "global_messages", and it doesn't show there either. It only seems to work in the "content" section.* Update 2: These are the results of using the "showLayout=page" query string on the page when used with Alan Storm's very handy debugging module (which you'll find in his answer below). <?xml version="1.0"?> <layout><block type="page/html" name="root" output="toHtml" template="page/3columns.phtml"> <block type="page/html_head" name="head" as="head"> <action method="addJs"> <script>prototype/prototype.js</script> </action> <action method="addJs"> <script>prototype/validation.js</script> </action> <action method="addJs"> <script>paypoint/validation.js</script> </action> <action method="addJs"> <script>scriptaculous/builder.js</script> </action> <action method="addJs"> <script>scriptaculous/effects.js</script> </action> <action method="addJs"> <script>scriptaculous/dragdrop.js</script> </action> <action method="addJs"> <script>scriptaculous/controls.js</script> </action> <action method="addJs"> <script>scriptaculous/slider.js</script> </action> <action method="addJs"> <script>varien/js.js</script> </action> <action method="addJs"> <script>varien/form.js</script> </action> <action method="addJs"> <script>varien/menu.js</script> </action> <action method="addJs"> <script>mage/translate.js</script> </action> <action method="addJs"> <script>mage/cookies.js</script> </action> <action method="addCss"> <stylesheet>css/reset.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/boxes.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/clears.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/menu.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/calendar-blue.css</stylesheet> </action> <action method="addCss"> <stylesheet>css/styles.css</stylesheet> </action> <action method="addItem"> <type>skin_css</type> <name>css/iestyles.css</name> <params/> <if>IE</if> </action> <action method="addItem"> <type>skin_css</type> <name>css/ie7.css</name> <params/> <if>IE 7</if> </action> <action method="addItem"> <type>skin_css</type> <name>css/ie7minus.css</name> <params/> <if>lt IE 7</if> </action> <action method="addItem"> <type>js</type> <name>lib/ds-sleight.js</name> <params/> <if>lt IE 7</if> </action> <action method="addItem"> <type>js</type> <name>varien/iehover-fix.js</name> <params/> <if>lt IE 7</if> </action> <action method="addCss"> <stylesheet>css/print.css</stylesheet> <params>media="print"</params> </action> </block> <block type="page/html_header" name="header" as="header"> <block type="page/template_links" name="top.links" as="topLinks"/> <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/> <block type="core/template" name="top.nav" template="page/html/top.nav.phtml"/> </block> <block type="core/messages" name="global_messages" as="global_messages"/> <block type="core/messages" name="messages" as="messages"/> <block type="core/text_list" name="content" as="content"/> <block type="core/text_list" name="right" as="right"/> <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"/> <block type="core/text_list" name="before_body_end" as="before_body_end"/> </block> <block type="core/profiler" output="toHtml"/> <reference name="top.links"> <action method="addLink" translate="label title" module="customer"> <label>My Account</label> <url helper="customer/getAccountUrl"/> <title>My Account</title> <prepare/> <urlParams/> <position>10</position> </action> </reference> <reference name="root"> <action method="setTemplate"> <template>page/2columns-left.phtml</template> </action> </reference> <reference name="top.menu"> <block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/> </reference> <reference name="footer_links"> <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"> <label>Site Map</label> <url helper="catalog/map/getCategoryUrl"/> <title>Site Map</title> </action> </reference> <reference name="footer_links"> <action method="addLink" translate="label title" module="catalogsearch" ifconfig="catalog/seo/search_terms"> <label>Search Terms</label> <url helper="catalogsearch/getSearchTermUrl"/> <title>Search Terms</title> </action> <action method="addLink" translate="label title" module="catalogsearch"> <label>Advanced Search</label> <url helper="catalogsearch/getAdvancedSearchUrl"/> <title>Advanced Search</title> </action> </reference> <reference name="top.links"> <block type="checkout/links" name="checkout_cart_link"> <action method="addCartLink"/> <action method="addCheckoutLink"/> </block> </reference> <reference name="footer"> <block type="cms/block" name="cms_footer_links" before="footer_links"> <action method="setBlockId"> <block_id>footer_links</block_id> </action> </block> </reference> <reference name="left"> <block type="tag/popular" name="tags_popular" template="tag/popular.phtm" ignore="1"> <action method="setTemplate"> <template>tag/popular.phtml</template> </action> </block> </reference> <reference name="left"> </reference> <reference name="before_body_end"> <block type="googleanalytics/ga" name="google_analytics" as="google_analytics"/> </reference> <reference name="footer_links"> <action method="addLink" translate="label title" module="contacts" ifconfig="contacts/contacts/enabled"> <label>Contact Us</label> <url>contact-us</url> <title>Contact Us</title> <prepare>true</prepare> </action> </reference> <reference name="footer_links"> <action method="addLink" translate="label title" module="rss" ifconfig="rss/config/active"> <label>RSS</label> <url>rss</url> <title>RSS testing</title> <prepare>true</prepare> <urlParams/> <position/> <li/> <a>class="link-feed"</a> </action> </reference> <reference name="wishlist_sidebar"> <action method="addPriceBlockType"> <type>bundle</type> <block>bundle/catalog_product_price</block> <template>bundle/catalog/product/price.phtml</template> </action> </reference> <reference name="cart_sidebar"> <action method="addItemRender"> <type>bundle</type> <block>bundle/checkout_cart_item_renderer</block> <template>checkout/cart/sidebar/default.phtml</template> </action> </reference> <reference name="root"> <action method="setTemplate"> <template>page/2columns-left.phtml</template> </action> </reference> <reference name="left"> <action method="unsetChild"> <name>catalog.navigation.all</name> </action> <action method="unsetChild"> <name>callout.sendcard</name> </action> <action method="unsetChild"> <name>callout.specialorder</name> </action> <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml"> <action method="addLink" translate="label" module="customer"> <name>account</name> <path>customer/account/</path> <label>Account Dashboard</label> </action> <action method="addLink" translate="label" module="customer"> <name>account_edit</name> <path>customer/account/edit/</path> <label>Account Information</label> </action> <action method="addLink" translate="label" module="customer"> <name>address_book</name> <path>customer/address/</path> <label>Address Book</label> </action> </block> <block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/> <remove name="tags_popular"/> </reference> <reference name="customer_account_navigation"> <action method="addLink" translate="label" module="sales"> <name>orders</name> <path>sales/order/history/</path> <label>My Orders</label> </action> </reference> <reference name="customer_account_navigation"> <action method="addLink" translate="label" module="tag"> <name>tags</name> <path>tag/customer/</path> <label>My Tags</label> </action> </reference> <reference name="customer_account_navigation"> <action method="addLink" translate="label" module="newsletter"> <name>newsletter</name> <path>newsletter/manage/</path> <label>Newsletter Subscriptions</label> </action> </reference> <reference name="cart_sidebar"> <action method="addItemRender"> <type>bundle</type> <block>bundle/checkout_cart_item_renderer</block> <template>checkout/cart/sidebar/default.phtml</template> </action> </reference> <update handle="customer_account"/> <reference name="content"> <block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml"> <block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/> <block type="core/template" name="customer_account_dashboard_top" as="top"/> <block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/> <block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/> <block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/> <block type="core/template" name="customer_account_dashboard_info1" as="info1"/> <block type="core/template" name="customer_account_dashboard_info2" as="info2"/> </block> </reference> <reference name="right"> <action method="unsetChild"> <name>catalog_compare_sidebar</name> </action> </reference> <reference name="customer_account_dashboard"> <action method="unsetChild"> <name>top</name> </action> <block type="sales/order_recent" name="customer_account_dashboard_top" as="top" template="sales/order/recent.phtml"/> </reference> <reference name="right"> <action method="unsetChild"> <name>right.poll</name> </action> </reference> <reference name="customer_account_dashboard"> <action method="unsetChild"> <name>customer_account_dashboard_info2</name> </action> <block type="tag/customer_recent" name="customer_account_dashboard_info2" as="info2" template="tag/customer/recent.phtml"/> </reference> <reference name="right"> <action method="unsetChild"> <name>right.newsletter</name> </action> </reference> <reference name="top.links"> <action method="addLink" translate="label title" module="customer"> <label>Log Out</label> <url helper="customer/getLogoutUrl"/> <title>Log Out</title> <prepare/> <urlParams/> <position>100</position> </action> </reference></layout>

    Read the article

  • Custom Validation Attribute with Custom Model Binder in MVC 2

    - by griegs
    I apologise for the amount of code I have included. I've tried to keep it to a minimum. I'm trying to have a Custom Validator Attribute on my model as well as a Custom Model binder. The Attribute and the Binder work great seperately but if I have both, then the Validation Attribute no longer works. Here is my code snipped for readability. If I leave out the code in global.asax the custom validation fires but not if I have the custom binder enabled. Validation Attribute; public class IsPhoneNumberAttribute : ValidationAttribute { public override bool IsValid(object value) { //do some checking on 'value' here return true; } } Useage of the attribute in my model; [Required(ErrorMessage = "Please provide a contact number")] [IsPhoneNumberAttribute(ErrorMessage = "Not a valid phone number")] public string Phone { get; set; } Custom Model Binder; public class CustomContactUsBinder : DefaultModelBinder { protected override void OnModelUpdated(ControllerContext controllerContext, ModelBindingContext bindingContext) { ContactFormViewModel contactFormViewModel = bindingContext.Model as ContactFormViewModel; if (!String.IsNullOrEmpty(contactFormViewModel.Phone)) if (contactFormViewModel.Phone.Length > 10) bindingContext.ModelState.AddModelError("Phone", "Phone is too long."); } } Global asax; System.Web.Mvc.ModelBinders.Binders[typeof(ContactFormViewModel)] = new CustomContactUsBinder();

    Read the article

  • Build a custom Ubuntu based distribution

    - by user51447
    I am working on making a custom Ubuntu 11.10 based distro.(64 bit) I am adding non open source packages, replacing packages, changed user interface from Unity to GNOME, and more changes. My system is ready, and I want to create a redistributable image for my distro. When you go to system settings - system info, you see a logo with the Ubuntu name and logo, but I want to change it to the name and logo of my distro. Also, in the boot menu, I want to change the boot entry names, and the GRUB background. And I want to change the name Ubuntu from every possible location. Also, I will be sharing it with people, so I want to make my own software repositories, like linux mint has, or any other distro has, I will purchase server space for that. Also, the I want to customize the wubi installer like linux mint did and if some uses the customized tool to install my distro from Windows, they should see the name of my distro in add or remove programs page. Any help will be appreciated!

    Read the article

  • Design Time Attribute For CSS Class in ASP.net Custom Server Control

    - by Jon P
    Hopefully some Custom Control Designers/Builders can help I'm attempting to build my first custom control that is essential a client detail collection form. There are to be a series of elements to this form that require various styles applied to them. Ideally I'd like the VS 2005/2008 properties interface to be able to apply the CSSClass as it does at the control level, i.e. with a dropdown list of available CSS Clases. Take for example the Class to be applied to the legend tag /// <summary>Css Class for Legend</summary> [Category("Appearance")] [Browsable(true)] [DefaultValue("")] //I am at a loss as to what goes in [Editor] [Editor(System.Web.UI.CssStyleCollection), typeof(System.Drawing.Design.UITypeEditor))] public string LegendCSSClass { get { return _LegendCSSClass; } set { _LegendCSSClass = value; } } I have tried a couple of options, as you can see from above, without much luck. Hopefully there is something simple I am missing. I'd also be happy for references pertaining to the [Editor] attribute

    Read the article

  • European e-government Action Plan all about interoperability

    - by trond-arne.undheim
    Yesterday, the European Commission released its European eGovernment Action Plan for 2011-2015. The plan includes measures on providing deeper user empowerment, enhancing the Internal Market, more efficiency and effectiveness of public administrations, and putting in place pre-conditions for developing e-government. The Good - Defines interoperability very clearly. Calls interoperability "a pre-condition for cross-border eGovernment services" (a very strong formulation) and says interoperability "is supported by open specifications". - Uses the terminology "open specifications" which, let's face it, is pretty close to "open standards" which is the term the rest of the world would use. - Confirms that Member States are fully committed to the political priorities of the Malmö Declaration (which was all about open standards) including the very strong action: by 2013: All Member States will have incorporated the political priorities of the Malmö Declaration in their national strategies. Such tight Action Plan integration between Commission and Member State priorities has seldom been attempted before, particularly not in a field where European legal competence is virtually non-existent. What we see now, is the subtle force of soft power rather than the rough force of regulation. In this case, it is the Member States who want Europe to take the lead. Very refreshing! Some quotes that show the commitment to interoperability and open specifications: "The emergence of innovative technologies such as "service-oriented architectures" (SOA), or "clouds" of services,  together with more open specifications which allow for greater sharing, re-use and interoperability reinforce the ability of ICT to play a key role in this quest for effficiency in the public sector." (p.4) "Interoperability is supported through open specifications" (p.13) 2.4.1. Open Specifications and Interoperability (p.13 has a whole section dedicated to this important topic. Open specifications and interoperability are nearly 100% interrelated): "Interoperability is the ability of systems and machines to exchange, process and correctly interpret information. It is more than just a technical challenge, as it also involves legal, organisational and semantic aspects of handling  data" (p.13) "standards and  open platforms offer opportunities for more cost-effective use of resources and delivery of services" (p.13). The Bad Shies away from defining open standards, or even open specifications, the EU's preferred term for the key enabler of interoperability. Verdict 90/100, a very respectable score.

    Read the article

  • Change a Foreign Action's Display Text

    - by Geertjan
    I want the display text on an Action on a Node to show something about the underlying object. But the Action is registered somewhere in the layer (i.e., in the registry), i.e., I have no control over it. How do I change the display text in this scenario? Here's how. Below I look in the Actions/Events folder, iterate through all the Actions registered there, look for an Action with display text starting with "Edit", change it to display something from the underlying object, wrap a new Action around that Action, build up a new list of Actions, and return those (together with all the other Actions in that folder) from "getActions" on my Node: @Override public Action[] getActions(boolean context) { List<Action> newEventActions = new ArrayList<Action>(); List<? extends Action> eventActions = Utilities.actionsForPath("Actions/Events"); for (final Action action : eventActions) { String value = action.getValue(Action.NAME).toString(); if (value.startsWith("Edit")) { Action editAction = new AbstractAction("Edit " + getLookup().lookup(Event.class).getPlace()) { @Override public void actionPerformed(ActionEvent e) { action.actionPerformed(e); } }; newEventActions.add(editAction); } else { newEventActions.add(action); } } return newEventActions.toArray(new Action[eventActions.size()]); } If someone knows of a better way, please let me know.

    Read the article

  • BizTalk 2009 - Creating a Custom Functoid Library

    - by StuartBrierley
    If you find that you have a need to created multiple Custom Functoids you may also choose to create a Custom Functoid Library - a single project containing many custom functoids.  As previsouly discussed, the Custom Functoid Wizard can be used to create a project with a new custom functoid inside.  But what if you want to extend this project to include more custom functoids and create your Custom Functoid Library?  First create a Custom Functoid Library project and your first Custom Functoid using the Custom Functoid Wizard. When you open your Custom Functoid Library project in Visual Studio you will see that it contains your custom functoid class file along with its resource file.  One of the items this resource file contains is the ID of the the custom functoid.  Each custom functoid needs a unique ID that is over 6000.  When creating a Custom Functoid Library I would first suggest that you delete the ID from this resource file and instead create a _FunctoidIDs class containing constants for each of your custom functoids.  In this way you can easily see which custom functoid IDs are assigned to which custom functoid and which ID is next in the sequence of availability: namespace MyCompany.BizTalk.Functoids.TestFunctoids {     class _FunctoidIDs     {         public const int TestFunctoid                       = 6001;     } } You will then need to update the base() function in your existing functoid class to reference these constant values rather than the current resource file. From:    int functoidID;    // This has to be a number greater than 6000    functoidID = System.Convert.ToInt32(resmgr.GetString("FunctoidId"));    this.ID = functoidID; To: this.ID = _FunctoidIDs.TestFunctoid; To create a new custom functoid you can copy the existing custom functoid, renaming the resultant class file as appropriate.  Once it is renamed you will need to change the Class name, ResourceName reference and Base function name in the class code to those of your new custom functoid.  You will also need to create a new constant value in the _FunctoidIDs class and update the ID reference in your code to match this.  Assuming that you need some different functionalty from your new  customfunctoid you will need to check or amend the following in your functoid class file: Min and Max connections Functoid Category Input and Output connection types The parameters and functionality of the Execute function To change the appearance of you new custom functoid you will need to check or amend the following in the functoid resource file: Name Description Tooltip Exception Icon You can change the String values by double clicking the resource file and amending the value fields in the string table. To amend the functoid icon you will need to create a 16x16 bitmap image.  Once you have saved this you are then ready to import it into the functoid resource file.  In Visual Studio change the resource view to images, right click the icon and choose import from file. You have now completed your new custom functoid and created a Custom Functoid Library.  You can test your new library of functoids by building the project, copying the resultant DLL to C:\Program Files\Microsoft BizTalk Server 2009\Developer Tools\Mapper Extensions and then resetting the toolbox in Visual Studio.

    Read the article

  • Coherence - How to develop a custom push replication publisher

    - by cosmin.tudor(at)oracle.com
    CoherencePushReplicationDB.zipIn the example bellow I'm describing a way of developing a custom push replication publisher that publishes data to a database via JDBC. This example can be easily changed to publish data to other receivers (JMS,...) by performing changes to step 2 and small changes to step 3, steps that are presented bellow. I've used Eclipse as the development tool. To develop a custom push replication publishers we will need to go through 6 steps: Step 1: Create a custom publisher scheme class Step 2: Create a custom publisher class that should define what the publisher is doing. Step 3: Create a class data is performing the actions (publish to JMS, DB, etc ) for the custom publisher. Step 4: Register the new publisher against a ContentHandler. Step 5: Add the new custom publisher in the cache configuration file. Step 6: Add the custom publisher scheme class to the POF configuration file. All these steps are detailed bellow. The coherence project is attached and conclusions are presented at the end. Step 1: In the Coherence Eclipse project create a class called CustomPublisherScheme that should implement com.oracle.coherence.patterns.pushreplication.publishers.AbstractPublisherScheme. In this class define the elements of the custom-publisher-scheme element. For instance for a CustomPublisherScheme that looks like that: <sync:publisher> <sync:publisher-name>Active2-JDBC-Publisher</sync:publisher-name> <sync:publisher-scheme> <sync:custom-publisher-scheme> <sync:jdbc-string>jdbc:oracle:thin:@machine-name:1521:XE</sync:jdbc-string> <sync:username>hr</sync:username> <sync:password>hr</sync:password> </sync:custom-publisher-scheme> </sync:publisher-scheme> </sync:publisher> the code is: package com.oracle.coherence; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import com.oracle.coherence.patterns.pushreplication.Publisher; import com.oracle.coherence.configuration.Configurable; import com.oracle.coherence.configuration.Mandatory; import com.oracle.coherence.configuration.Property; import com.oracle.coherence.configuration.parameters.ParameterScope; import com.oracle.coherence.environment.Environment; import com.tangosol.io.pof.PofReader; import com.tangosol.io.pof.PofWriter; import com.tangosol.util.ExternalizableHelper; @Configurable public class CustomPublisherScheme extends com.oracle.coherence.patterns.pushreplication.publishers.AbstractPublisherScheme { /** * */ private static final long serialVersionUID = 1L; private String jdbcString; private String username; private String password; public String getJdbcString() { return this.jdbcString; } @Property("jdbc-string") @Mandatory public void setJdbcString(String jdbcString) { this.jdbcString = jdbcString; } public String getUsername() { return username; } @Property("username") @Mandatory public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } @Property("password") @Mandatory public void setPassword(String password) { this.password = password; } public Publisher realize(Environment environment, ClassLoader classLoader, ParameterScope parameterScope) { return new CustomPublisher(getJdbcString(), getUsername(), getPassword()); } public void readExternal(DataInput in) throws IOException { super.readExternal(in); this.jdbcString = ExternalizableHelper.readSafeUTF(in); this.username = ExternalizableHelper.readSafeUTF(in); this.password = ExternalizableHelper.readSafeUTF(in); } public void writeExternal(DataOutput out) throws IOException { super.writeExternal(out); ExternalizableHelper.writeSafeUTF(out, this.jdbcString); ExternalizableHelper.writeSafeUTF(out, this.username); ExternalizableHelper.writeSafeUTF(out, this.password); } public void readExternal(PofReader reader) throws IOException { super.readExternal(reader); this.jdbcString = reader.readString(100); this.username = reader.readString(101); this.password = reader.readString(102); } public void writeExternal(PofWriter writer) throws IOException { super.writeExternal(writer); writer.writeString(100, this.jdbcString); writer.writeString(101, this.username); writer.writeString(102, this.password); } } Step 2: Define what the CustomPublisher should basically do by creating a new java class called CustomPublisher that implements com.oracle.coherence.patterns.pushreplication.Publisher package com.oracle.coherence; import com.oracle.coherence.patterns.pushreplication.EntryOperation; import com.oracle.coherence.patterns.pushreplication.Publisher; import com.oracle.coherence.patterns.pushreplication.exceptions.PublisherNotReadyException; import java.io.BufferedWriter; import java.util.Iterator; public class CustomPublisher implements Publisher { private String jdbcString; private String username; private String password; private transient BufferedWriter bufferedWriter; public CustomPublisher() { } public CustomPublisher(String jdbcString, String username, String password) { this.jdbcString = jdbcString; this.username = username; this.password = password; this.bufferedWriter = null; } public String getJdbcString() { return this.jdbcString; } public String getUsername() { return username; } public String getPassword() { return password; } public void publishBatch(String cacheName, String publisherName, Iterator<EntryOperation> entryOperations) { DatabasePersistence databasePersistence = new DatabasePersistence( jdbcString, username, password); while (entryOperations.hasNext()) { EntryOperation entryOperation = (EntryOperation) entryOperations .next(); databasePersistence.databasePersist(entryOperation); } } public void start(String cacheName, String publisherName) throws PublisherNotReadyException { System.err .printf("Started: Custom JDBC Publisher for Cache %s with Publisher %s\n", new Object[] { cacheName, publisherName }); } public void stop(String cacheName, String publisherName) { System.err .printf("Stopped: Custom JDBC Publisher for Cache %s with Publisher %s\n", new Object[] { cacheName, publisherName }); } } In the publishBatch method from above we inform the publisher that he is supposed to persist data to a database: DatabasePersistence databasePersistence = new DatabasePersistence( jdbcString, username, password); while (entryOperations.hasNext()) { EntryOperation entryOperation = (EntryOperation) entryOperations .next(); databasePersistence.databasePersist(entryOperation); } Step 3: The class that deals with the persistence is a very basic one that uses JDBC to perform inserts/updates against a database. package com.oracle.coherence; import com.oracle.coherence.patterns.pushreplication.EntryOperation; import java.sql.*; import java.text.SimpleDateFormat; import com.oracle.coherence.Order; public class DatabasePersistence { public static String INSERT_OPERATION = "INSERT"; public static String UPDATE_OPERATION = "UPDATE"; public Connection dbConnection; public DatabasePersistence(String jdbcString, String username, String password) { this.dbConnection = createConnection(jdbcString, username, password); } public Connection createConnection(String jdbcString, String username, String password) { Connection connection = null; System.err.println("Connecting to: " + jdbcString + " Username: " + username + " Password: " + password); try { // Load the JDBC driver String driverName = "oracle.jdbc.driver.OracleDriver"; Class.forName(driverName); // Create a connection to the database connection = DriverManager.getConnection(jdbcString, username, password); System.err.println("Connected to:" + jdbcString + " Username: " + username + " Password: " + password); } catch (ClassNotFoundException e) { e.printStackTrace(); } // driver catch (SQLException e) { e.printStackTrace(); } return connection; } public void databasePersist(EntryOperation entryOperation) { if (entryOperation.getOperation().toString() .equalsIgnoreCase(INSERT_OPERATION)) { insert(((Order) entryOperation.getPublishableEntry().getValue())); } else if (entryOperation.getOperation().toString() .equalsIgnoreCase(UPDATE_OPERATION)) { update(((Order) entryOperation.getPublishableEntry().getValue())); } } public void update(Order order) { String update = "UPDATE Orders set QUANTITY= '" + order.getQuantity() + "', AMOUNT='" + order.getAmount() + "', ORD_DATE= '" + (new SimpleDateFormat("dd-MMM-yyyy")).format(order .getOrdDate()) + "' WHERE SYMBOL='" + order.getSymbol() + "'"; System.err.println("UPDATE = " + update); try { Statement stmt = getDbConnection().createStatement(); stmt.execute(update); stmt.close(); } catch (SQLException ex) { System.err.println("SQLException: " + ex.getMessage()); } } public void insert(Order order) { String insert = "insert into Orders values('" + order.getSymbol() + "'," + order.getQuantity() + "," + order.getAmount() + ",'" + (new SimpleDateFormat("dd-MMM-yyyy")).format(order .getOrdDate()) + "')"; System.err.println("INSERT = " + insert); try { Statement stmt = getDbConnection().createStatement(); stmt.execute(insert); stmt.close(); } catch (SQLException ex) { System.err.println("SQLException: " + ex.getMessage()); } } public Connection getDbConnection() { return dbConnection; } public void setDbConnection(Connection dbConnection) { this.dbConnection = dbConnection; } } Step 4: Now we need to register our publisher against a ContentHandler. In order to achieve that we need to create in our eclipse project a new class called CustomPushReplicationNamespaceContentHandler that should extend the com.oracle.coherence.patterns.pushreplication.configuration.PushReplicationNamespaceContentHandler. In the constructor of the new class we define a new handler for our custom publisher. package com.oracle.coherence; import com.oracle.coherence.configuration.Configurator; import com.oracle.coherence.environment.extensible.ConfigurationContext; import com.oracle.coherence.environment.extensible.ConfigurationException; import com.oracle.coherence.environment.extensible.ElementContentHandler; import com.oracle.coherence.patterns.pushreplication.PublisherScheme; import com.oracle.coherence.environment.extensible.QualifiedName; import com.oracle.coherence.patterns.pushreplication.configuration.PushReplicationNamespaceContentHandler; import com.tangosol.run.xml.XmlElement; public class CustomPushReplicationNamespaceContentHandler extends PushReplicationNamespaceContentHandler { public CustomPushReplicationNamespaceContentHandler() { super(); registerContentHandler("custom-publisher-scheme", new ElementContentHandler() { public Object onElement(ConfigurationContext context, QualifiedName qualifiedName, XmlElement xmlElement) throws ConfigurationException { PublisherScheme publisherScheme = new CustomPublisherScheme(); Configurator.configure(publisherScheme, context, qualifiedName, xmlElement); return publisherScheme; } }); } } Step 5: Now we should define our CustomPublisher in the cache configuration file according to the following documentation. <cache-config xmlns:sync="class:com.oracle.coherence.CustomPushReplicationNamespaceContentHandler" xmlns:cr="class:com.oracle.coherence.environment.extensible.namespaces.InstanceNamespaceContentHandler"> <caching-schemes> <sync:provider pof-enabled="false"> <sync:coherence-provider /> </sync:provider> <caching-scheme-mapping> <cache-mapping> <cache-name>publishing-cache</cache-name> <scheme-name>distributed-scheme-with-publishing-cachestore</scheme-name> <autostart>true</autostart> <sync:publisher> <sync:publisher-name>Active2 Publisher</sync:publisher-name> <sync:publisher-scheme> <sync:remote-cluster-publisher-scheme> <sync:remote-invocation-service-name>remote-site1</sync:remote-invocation-service-name> <sync:remote-publisher-scheme> <sync:local-cache-publisher-scheme> <sync:target-cache-name>publishing-cache</sync:target-cache-name> </sync:local-cache-publisher-scheme> </sync:remote-publisher-scheme> <sync:autostart>true</sync:autostart> </sync:remote-cluster-publisher-scheme> </sync:publisher-scheme> </sync:publisher> <sync:publisher> <sync:publisher-name>Active2-Output-Publisher</sync:publisher-name> <sync:publisher-scheme> <sync:stderr-publisher-scheme> <sync:autostart>true</sync:autostart> <sync:publish-original-value>true</sync:publish-original-value> </sync:stderr-publisher-scheme> </sync:publisher-scheme> </sync:publisher> <sync:publisher> <sync:publisher-name>Active2-JDBC-Publisher</sync:publisher-name> <sync:publisher-scheme> <sync:custom-publisher-scheme> <sync:jdbc-string>jdbc:oracle:thin:@machine_name:1521:XE</sync:jdbc-string> <sync:username>hr</sync:username> <sync:password>hr</sync:password> </sync:custom-publisher-scheme> </sync:publisher-scheme> </sync:publisher> </cache-mapping> </caching-scheme-mapping> <!-- The following scheme is required for each remote-site when using a RemoteInvocationPublisher --> <remote-invocation-scheme> <service-name>remote-site1</service-name> <initiator-config> <tcp-initiator> <remote-addresses> <socket-address> <address>localhost</address> <port>20001</port> </socket-address> </remote-addresses> <connect-timeout>2s</connect-timeout> </tcp-initiator> <outgoing-message-handler> <request-timeout>5s</request-timeout> </outgoing-message-handler> </initiator-config> </remote-invocation-scheme> <!-- END: com.oracle.coherence.patterns.pushreplication --> <proxy-scheme> <service-name>ExtendTcpProxyService</service-name> <acceptor-config> <tcp-acceptor> <local-address> <address>localhost</address> <port>20002</port> </local-address> </tcp-acceptor> </acceptor-config> <autostart>true</autostart> </proxy-scheme> </caching-schemes> </cache-config> As you can see in the red-marked text from above I've:       - set new Namespace Content Handler       - define the new custom publisher that should work together with other publishers like: stderr and remote publishers in our case. Step 6: Add the com.oracle.coherence.CustomPublisherScheme to your custom-pof-config file: <pof-config> <user-type-list> <!-- Built in types --> <include>coherence-pof-config.xml</include> <include>coherence-common-pof-config.xml</include> <include>coherence-messagingpattern-pof-config.xml</include> <include>coherence-pushreplicationpattern-pof-config.xml</include> <!-- Application types --> <user-type> <type-id>1901</type-id> <class-name>com.oracle.coherence.Order</class-name> <serializer> <class-name>com.oracle.coherence.OrderSerializer</class-name> </serializer> </user-type> <user-type> <type-id>1902</type-id> <class-name>com.oracle.coherence.CustomPublisherScheme</class-name> </user-type> </user-type-list> </pof-config> CONCLUSIONSThis approach allows for publishers to publish data to almost any other receiver (database, JMS, MQ, ...). The only thing that needs to be changed is the DatabasePersistence.java class that should be adapted to the chosen receiver. Only minor changes are needed for the rest of the code (to publishBatch method from CustomPublisher class).

    Read the article

  • Detecting if the user selected "All Users" or "Just Me" in a Custom Action

    - by Ben
    Hi, I'm trying to detect if the user has selected the "All Users" or the "Just Me" radio during the install of my program. I have a custom action setup that overrides several methods (OnCommit, OnBeforeInstall, etc.). Right now I'm trying to find out this information during OnCommit. I've read that the property I want to get at is the ALLUSERS property, but I haven't had any luck finding where it would be stored in instance/local data. Does anyone know of a way to get at it? -Ben

    Read the article

  • ASP.Net MVC 2 Auto Complete Textbox With Custom View Model Attribute & EditorTemplate

    - by SeanMcAlinden
    In this post I’m going to show how to create a generic, ajax driven Auto Complete text box using the new MVC 2 Templates and the jQuery UI library. The template will be automatically displayed when a property is decorated with a custom attribute within the view model. The AutoComplete text box in action will look like the following:   The first thing to do is to do is visit my previous blog post to put the custom model metadata provider in place, this is necessary when using custom attributes on the view model. http://weblogs.asp.net/seanmcalinden/archive/2010/06/11/custom-asp-net-mvc-2-modelmetadataprovider-for-using-custom-view-model-attributes.aspx Once this is in place, make sure you visit the jQuery UI and download the latest stable release – in this example I’m using version 1.8.2. You can download it here. Add the jQuery scripts and css theme to your project and add references to them in your master page. Should look something like the following: Site.Master <head runat="server">     <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>     <link href="../../Content/Site.css" rel="stylesheet" type="text/css" />     <link href="../../css/ui-lightness/jquery-ui-1.8.2.custom.css" rel="stylesheet" type="text/css" />     <script src="../../Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>     <script src="../../Scripts/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script> </head> Once this is place we can get started. Creating the AutoComplete Custom Attribute The auto complete attribute will derive from the abstract MetadataAttribute created in my previous post. It will look like the following: AutoCompleteAttribute using System.Collections.Generic; using System.Web.Mvc; using System.Web.Routing; namespace Mvc2Templates.Attributes {     public class AutoCompleteAttribute : MetadataAttribute     {         public RouteValueDictionary RouteValueDictionary;         public AutoCompleteAttribute(string controller, string action, string parameterName)         {             this.RouteValueDictionary = new RouteValueDictionary();             this.RouteValueDictionary.Add("Controller", controller);             this.RouteValueDictionary.Add("Action", action);             this.RouteValueDictionary.Add(parameterName, string.Empty);         }         public override void Process(ModelMetadata modelMetaData)         {             modelMetaData.AdditionalValues.Add("AutoCompleteUrlData", this.RouteValueDictionary);             modelMetaData.TemplateHint = "AutoComplete";         }     } } As you can see, the constructor takes in strings for the controller, action and parameter name. The parameter name will be used for passing the search text within the auto complete text box. The constructor then creates a new RouteValueDictionary which we will use later to construct the url for getting the auto complete results via ajax. The main interesting method is the method override called Process. With the process method, the route value dictionary is added to the modelMetaData AdditionalValues collection. The TemplateHint is also set to AutoComplete, this means that when the view model is parsed for display, the MVC 2 framework will look for a view user control template called AutoComplete, if it finds one, it uses that template to display the property. The View Model To show you how the attribute will look, this is the view model I have used in my example which can be downloaded at the end of this post. View Model using System.ComponentModel; using Mvc2Templates.Attributes; namespace Mvc2Templates.Models {     public class TemplateDemoViewModel     {         [AutoComplete("Home", "AutoCompleteResult", "searchText")]         [DisplayName("European Country Search")]         public string SearchText { get; set; }     } } As you can see, the auto complete attribute is called with the controller name, action name and the name of the action parameter that the search text will be passed into. The AutoComplete Template Now all of this is in place, it’s time to create the AutoComplete template. Create a ViewUserControl called AutoComplete.ascx at the following location within your application – Views/Shared/EditorTemplates/AutoComplete.ascx Add the following code: AutoComplete.ascx <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <%     var propertyName = ViewData.ModelMetadata.PropertyName;     var propertyValue = ViewData.ModelMetadata.Model;     var id = Guid.NewGuid().ToString();     RouteValueDictionary urlData =         (RouteValueDictionary)ViewData.ModelMetadata.AdditionalValues.Where(x => x.Key == "AutoCompleteUrlData").Single().Value;     var url = Mvc2Templates.Views.Shared.Helpers.RouteHelper.GetUrl(this.ViewContext.RequestContext, urlData); %> <input type="text" name="<%= propertyName %>" value="<%= propertyValue %>" id="<%= id %>" class="autoComplete" /> <script type="text/javascript">     $(function () {         $("#<%= id %>").autocomplete({             source: function (request, response) {                 $.ajax({                     url: "<%= url %>" + request.term,                     dataType: "json",                     success: function (data) {                         response(data);                     }                 });             },             minLength: 2         });     }); </script> There is a lot going on in here but when you break it down it’s quite simple. Firstly, the property name and property value are retrieved through the model meta data. These are required to ensure that the text box input has the correct name and data to allow for model binding. If you look at line 14 you can see them being used in the text box input creation. The interesting bit is on line 8 and 9, this is the code to retrieve the route value dictionary we added into the model metada via the custom attribute. Line 11 is used to create the url, in order to do this I created a quick helper class which looks like the code below titled RouteHelper. The last bit of script is the code to initialise the jQuery UI AutoComplete control with the correct url for calling back to our controller action. RouteHelper using System.Web.Mvc; using System.Web.Routing; namespace Mvc2Templates.Views.Shared.Helpers {     public static class RouteHelper     {         const string Controller = "Controller";         const string Action = "Action";         const string ReplaceFormatString = "REPLACE{0}";         public static string GetUrl(RequestContext requestContext, RouteValueDictionary routeValueDictionary)         {             RouteValueDictionary urlData = new RouteValueDictionary();             UrlHelper urlHelper = new UrlHelper(requestContext);                          int i = 0;             foreach(var item in routeValueDictionary)             {                 if (item.Value == string.Empty)                 {                     i++;                     urlData.Add(item.Key, string.Format(ReplaceFormatString, i.ToString()));                 }                 else                 {                     urlData.Add(item.Key, item.Value);                 }             }             var url = urlHelper.RouteUrl(urlData);             for (int index = 1; index <= i; index++)             {                 url = url.Replace(string.Format(ReplaceFormatString, index.ToString()), string.Empty);             }             return url;         }     } } See it in action All you need to do to see it in action is pass a view model from your controller with the new AutoComplete attribute attached and call the following within your view: <%= this.Html.EditorForModel() %> NOTE: The jQuery UI auto complete control expects a JSON string returned from your controller action method… as you can’t use the JsonResult to perform GET requests, use a normal action result, convert your data into json and return it as a string via a ContentResult. If you download the solution it will be very clear how to handle the controller and action for this demo. The full source code for this post can be downloaded here. It has been developed using MVC 2 and Visual Studio 2010. As always, I hope this has been interesting/useful. Kind Regards, Sean McAlinden.

    Read the article

  • Silverlight Custom Control Create Custom Event

    - by PlayKid
    Hi There, How do I create an event that handled a click event of one of my other control from my custom control? Here is the setup of what I've got: a textbox and a button (Custom Control) a silverlight application (uses that above custom control) I would like to expose the click event of the button from the custom control on the main application, how do I do that? Thanks

    Read the article

  • Custom Event - invokation list implementation considerations

    - by M.A. Hanin
    I'm looking for some pointers on implementing Custom Events in VB.NET (Visual Studio 2008, .NET 3.5). I know that "regular" (non-custom) Events are actually Delegates, so I was thinking of using Delegates when implementing a Custom Event. On the other hand, Andrew Troelsen's "Pro VB 2008 and the .NET 3.5 Platform" book uses Collection types in all his Custom Events examples, and Microsoft's sample codes match that line of thought. So my question is: what considerations should I have when choosing one design over the other? What are the pros and cons for each design? Which of these resembles the inner-implementation of "regular" events? Below is a sample code demonstrating the two designs. Public Class SomeClass Private _SomeEventListeners As EventHandler Public Custom Event SomeEvent As EventHandler AddHandler(ByVal value As EventHandler) _SomeEventListeners = [Delegate].Combine(_SomeEventListeners, value) End AddHandler RemoveHandler(ByVal value As EventHandler) _SomeEventListeners = [Delegate].Remove(_SomeEventListeners, value) End RemoveHandler RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs) _SomeEventListeners.Invoke(sender, e) End RaiseEvent End Event Private _OtherEventListeners As New List(Of EventHandler) Public Custom Event OtherEvent As EventHandler AddHandler(ByVal value As EventHandler) _OtherEventListeners.Add(value) End AddHandler RemoveHandler(ByVal value As EventHandler) _OtherEventListeners.Remove(value) End RemoveHandler RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs) For Each handler In _OtherEventListeners handler(sender, e) Next End RaiseEvent End Event End Class

    Read the article

  • Rails routes direct index action to show action

    - by jspooner
    So I created some rspec_scaffold for an Exercise model and added "map.resource :exercises" to my routes file and I was surprised when the "/exercises" url rendered the show action. What the heck? Why doesn't that render the index action? rake routes new_exercises GET /exercises/new(.:format) {:controller=>"exercises", :action=>"new"} edit_exercises GET /exercises/edit(.:format) {:controller=>"exercises", :action=>"edit"} exercises GET /exercises(.:format) {:controller=>"exercises", :action=>"show"} PUT /exercises(.:format) {:controller=>"exercises", :action=>"update"} DELETE /exercises(.:format) {:controller=>"exercises", :action=>"destroy"} POST /exercises(.:format) {:controller=>"exercises", :action=>"create"}

    Read the article

  • MVC ActionLink omits action when action equals default route value

    - by rjygraham
    I have the following routes defined for my application: routes.MapRoute( "Referral", // Route name "{referralCode}", // URL with parameters new { controller = "Home", action = "Index" } // Parameter defaults ); routes.MapRoute( "Default", // Route name "{controller}/{action}", // URL with parameters new { controller = "Home", action = "Index" } // Parameter defaults ); And I'm trying to create an ActionLink to go on the Index action on my AdminController: @Html.ActionLink("admin", "Index", "Admin") However, when the view is executed the ActionLink renders as (Index action value is omitted): <a href="/Admin">admin</a> Normally this would be ok, but it's causing a collision with the "Referral" route. NOTE: If I instead use ActionLink to render a different action like "Default," the ActionLink renders correctly: <a href="/Admin/Default">admin</a> The fact that the "Default" action renders correctly leads me to believe the problem has to do with the default value specified for the route. Is there anyway to force ActionLink to render the "Index" action as well?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >