Search Results

Search found 12126 results on 486 pages for 'property hiding'.

Page 88/486 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • hibernate connection tomcat

    - by willson albert
    I was working in a web site (production) in Tomcat 7, so now I created a copy of this website and change the hibernate.cfg.xml to work with another database ( testing ). <property name="hibernate.connection.url">jdbc:mysql://127.0.0.1:3306/test</property> <property name="hibernate.connection.username">fake</property> <property name="hibernate.connection.password">fake</property> However, when I open the new new site, everything is ok, but, is still working with the production database even when I changed the connection string. Anybody knows if I need to change another thing?. I missing something?. I am quite new in tomcat. Thanks in advance.

    Read the article

  • In NHibernate (Fluent), How do you map a property on referenced object into parent object?

    - by JChristian
    I want to map the Name column from the Child table into the Parent object. How do you do this (using Fluent NHibernate)? public class Parent { public int Key { get; set; } public string ChildName { get; set; } } Tables +--------------+ +------------------+ | Parent | | Child | +--------------+ +------------------+ | Key INT | +--->| Key INT | | ChildKey INT |-----+ | Name VARCHAR(20) | +--------------+ +------------------+

    Read the article

  • Strange DataMapper (0.10.2) error. Please help!

    - by Joel M.
    See the full error here: http://notesapp.heroku.com/ I'm using DataMapper and dm-validations 0.10.2. No matter how much I tweak my models, I get the same error, or another one. Here's how my model looks like: class User include DataMapper::Resource attr_accessor :password, :password_confirmation property :id, Serial, :required => true property :email, String, :required => true, :format => :email_address, :unique => true property :hashed_password, String property :salt, String, :required => true property :created_at, DateTime, :default => Time.now property :permission_level, Integer, :default => 1 validates_present :password_confirmation, :unless => Proc.new { |t| t.hashed_password } validates_present :password, :unless => Proc.new { |t| t.hashed_password } validates_is_confirmed :password

    Read the article

  • Mvc3 IEnumerable<QuestionModel> have a List<QuestionOptionModel> property. When I post, I get null list

    - by user1649439
    There is a example here. I am trying to use this technique in a large form with a list(List) but when I post back, the Viewmodel.Order that should’ve contained list of items and activities return with the lists empty. My QuestionModel.cs like this. public int Id { get; set; } public string QuestionText { get; set; } public System.Nullable<bool> OptionType1 { get; set; } public System.Nullable<bool> OptionType2 { get; set; } public List<QuestionOptionModel> OptionList = new List<QuestionOptionModel>(); When I post back "IEnumerable questions" List OptionList comes null. How can I do this?

    Read the article

  • How to break a list into chunks based on some property?

    - by CurlyFro
    public class InvestorMailing { public string To { get; set; } public IEnumerable<string> Attachments { get; set; } public int AttachmentCount { get; set; } public long AttachmentSize { get; set; } } i have an IList<InvestorMailing> mailingList. if the attachment size is greater than x, then i need to split my list and break it into chunks. is there an easy linq-y way to do this?

    Read the article

  • Should Javascript's "for in" construct iterate the length property?

    - by Eric
    I'm making a bookmarklet, but I've encountered some wierd behaviour in IE8. The code causing the problem is this: var els = document.getElementById("my_id").getElementsByTagName("*"); for(var i in els) { alert(i+","+els[i]) } The first thing that is alerted is "length, n". This isn't the case in chrome: just in IE8. Interestingly, it seems to behave differently depending on whether the code goes in the console/address bar or the page itself. Is this standard behaviour?

    Read the article

  • Is it possible to specify the name of the Index property to use for lists in a fluent nhibernate con

    - by Teevus
    When mapping a HasMany or HasManyToMany in fluent nhibernate, you can specify the column name to use for the list as a parameter to the AsList() method as follows: HasMany(c => c.Customers) .AsList(c => c.Column("PositionIndex")); I would prefer to be able to set this using a Fluent NHibernate convention (either a pre-existing one, or a custom one), especially since the default name appears to be "Index" which is a reserved word in MSSQL. I've tried using a custom convention implementing IHasManyConvention, but the instance parameter does not seem to contain the information about whether its a list, a bag, or a set, and also does not contain the column details for the index column. public void Apply(IOneToManyCollectionInstance instance) { } Any ideas?

    Read the article

  • Why is the Dependency Property not returning its value?

    - by B-Rad
    I have a MyUserControl with the following Xaml: <TextBox Text="{Binding InputValueProperty}" /> In the MyUserControl.xaml.cs I have: public string InputValue { get { return (string)GetValue(InputValueProperty); } set { SetValue(InputValueProperty, value); } } public static readonly DependencyProperty InputValueProperty = DependencyProperty.Register("InputValueProperty", typeof(string), typeof(MyUserControl)); In my MainWindow.xaml I create a user control: <local:MyUserControl InputValue="My Input" /> Later on in my MainWindow.xaml.cs I am trying to access this string. All instances of MyUserControl are contained in a List and I access them with a foreach. string temp = userControl.InputValue; This is always null. In my MainWindow.xaml I can see the "My Input" in the text box of the user control but I can't ever seem to get it out of there.

    Read the article

  • Is it always bad idea to use inline css for used-once property?

    - by user93422
    I have a table, with 10 columns. I want to control the width of each column. Each column is unique, right now I create an external CSS style for each column: div#my-page table#members th.name-col { width: 40px; } I know there is a best practice to avoid inline style. I do approve using external CSS for anything look'n'feel related: fonts, colors, images. But is it really better to use external CSS in this case? It does not incur extra maintenance cost. It is easier to produce. Cons I can think of: If you have separate designers and development team - using inline styles will force designers to modify content-file (aspx in my case). It might use more bandwidth. Anything else I've missed?

    Read the article

  • How do I set a focus property on a TextInput that is built using AddChild?

    - by Huuuze
    I have the following MXML: <mx:State name="myState"> <mx:AddChild relativeTo="{myhbox}" position="after"> <mx:Box verticalAlign="middle" horizontalAlign="center" width="100%" height="100%"> <mx:Form id="myForm" width="479" verticalScrollPolicy="off" horizontalScrollPolicy="off"> <mx:FormItem label="My Label:" fontWeight="bold" id="myLabel" direction="vertical"> <mx:TextInput id="myTextInput" width="282" /> <mx:HBox> <mx:Button label="Go" click="go();" id="goButton" /> </mx:HBox> </mx:FormItem> </mx:Form> </mx:Box> </mx:AddChild> </mx:State> How do I set focus on the TextInput field using <mx:SetProperty/>? I've tried the following, but it only results in the field being highlighted -- the cursor does not appear in the TextInput: <mx:SetProperty target="{stage}" name="focus" value="{myTextInput}"/> Long story short, I want the cursor to appear in the field. UPDATE: I figured it out. See comments for solution.

    Read the article

  • In C# should I reuse a function / property parameter to compute cleaner temporary value or create a

    - by Hamish Grubijan
    The example below may not be problematic as is, but it should be enough to illustrate a point. Imagine that there is a lot more work than trimming going on. public string Thingy { set { // I guess we can throw a null reference exception here on null. value = value.Trim(); // Well, imagine that there is so much processing to do this.thingy = value; // That this.thingy = value.Trim() would not fit on one line ... So, if the assignment has to take two lines, then I either have to abusereuse the parameter, or create a temporary variable. I am not a big fan of temporary variables. On the other hand, I am not a fan of convoluted code. I did not include an example where a function is involved, but I am sure you can imagine it. One concern I have is if a function accepted a string and the parameter was "abused", and then someone changed the signature to ref in both places - this ought to mess things up, but ... who would knowingly make such a change if it already worked without a ref? Seems like it is their responsibility in this case. If I mess with the value of value, am I doing something non-trivial under the hood? If you think that both approaches are acceptable, then which do you prefer and why? Thanks.

    Read the article

  • Localizing validation (error) messages in Grails

    - by John
    Hi, I try to localize error messages from the Domain classes. This is possible with the default error messages, e.g.: default.blank.message=Property [{0}] cannot be blank and localized attribute names, e.g.: customer.address.label=Customer address Where "Customer" is my domain class and address is its attribute. My problem is that I can't localize some attributes because I need specific error messages. E.g: has.to.be.a.number=Property [{0}] has to be a number contingent.size.label=Contingent size. But the message I get is "Property [size] has to be a number" instead of "Property [Contingent size] has to be a number". The messages I cant localize are following: - Property [{0}] has to be a number - Property [{0}] has to be a valid date // I can't use g:datePicker in this context

    Read the article

  • Custom base class for workflow activity , how to declare dependecy property ?

    - by Ajax2020
    Generally we derive custom activity from Activity or CompositeActivity class, i want to have my custom base class for all activities : like public class BusinessActivity : Activity { } then my custom activities will derive from BusinessActivity . The quetions is if i want ErrorMessageProperty and RetryCountProperty as dependency properties then in the BusinessActivity how to declare third param in Register method like public static DependencyProperty RetryCountProperty = DependencyProperty.Register("RetryCount", typeof(int), typeof(**BusinessActivity**)); What will happen if i derive from BusinessActivity class ?

    Read the article

  • Is there a way to catch an attempt to access a non existant property or method?

    - by Tor Valamo
    For instance this code: function stuff() { this.onlyMethod = function () { return something; } } // some error is thrown stuff().nonExistant(); Is there a way to do something like PHP's __call as a fallback from inside the object? function stuff() { this.onlyMethod = function () { return something; } this.__call__ = function (name, params) { alert(name + " can't be called."); } } // would then raise the alert "nonExistant can't be called". stuff().nonExistant();

    Read the article

  • Top and Left property not working! Why?

    - by MonuMan5
    I recently took up learning some css... and I am getting stuck on some very basic hurdles. I can't get the top and left properties to work on this basic page that I was creating. Below is all the code for that page... all the properties work except the top and left. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> #firstdiv {border: 2px solid red; position: absolute; top:15px; left:25px:} #seconddiv {border: 2px solid green; position: absolute; top:65px; left:5px:} </style> </head> <body> <div id="firstdiv">This is my first div </div> <div id="seconddiv">This is my second div</div> </body> </html> Any help on this issue would be greatly appreciated! = D

    Read the article

  • Starting jetty with spring xml as a background process/thread

    - by compass
    My goal is to set up a jetty test server and inject a custom servlet to test some REST classes in my project. I was able to launch the server with spring xml and run tests against that server. The issue I'm having is sometimes after the server started, the process stopped at the point before running the tests. It seems jetty didn't go to background. It works every time on my computer. But when I deployed to my CI server, it doesn't work. It also doesn't work when I'm on VPN. (Strange.) The server should be completed initialized as when the tests stuck, I was able to access the server using a browser. Here is my spring context xml: .... <bean id="servletHolder" class="org.eclipse.jetty.servlet.ServletHolder"> <constructor-arg ref="courseApiServlet"/> </bean> <bean id="servletHandler" class="org.eclipse.jetty.servlet.ServletContextHandler"/> <!-- Adding the servlet holders to the handlers --> <bean id="servletHandlerSetter" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetObject" ref="servletHandler"/> <property name="targetMethod" value="addServlet"/> <property name="arguments"> <list> <ref bean="servletHolder"/> <value>/*</value> </list> </property> </bean> <bean id="httpTestServer" class="org.eclipse.jetty.server.Server" init-method="start" destroy-method="stop" depends-on="servletHandlerSetter"> <property name="connectors"> <list> <bean class="org.eclipse.jetty.server.nio.SelectChannelConnector"> <property name="port" value="#{settings['webservice.server.port']}" /> </bean> </list> </property> <property name="handler"> <ref bean="servletHandler" /> </property> </bean> Running latest Jetty 8.1.8 server and Spring 3.1.3. Any idea?

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >