Search Results

Search found 9916 results on 397 pages for 'entity component'.

Page 255/397 | < Previous Page | 251 252 253 254 255 256 257 258 259 260 261 262  | Next Page >

  • What does a static modifier on a constructor means?

    - by the_drow
    I saw this kind of code at work: class FooPlugin : IPlugin // IPlugin is a Microsoft CRM component, it has something special about it's execution { static FooPlugin() { SomeObject.StaticFunction(); // The guy who wrote it said it's meaningful to this question but he can't remember why. } } Any idea what does a static modifier on a constructor mean and why in this case it is required?

    Read the article

  • Java Swing: Expanding TreeNode

    - by sarav
    Is there any way to get a reference to the JTree component from a DefaultMutableTreeNode? All I need is to expand the given treenode and its child nodes. I am planning to use the JTree.expandPath() but I only have the reference to the treenode. I'm new to Swing and any suggestions to achieve this are welcome.

    Read the article

  • Java-Hibernate-Newbie: How do I acces the values from this list?

    - by Mes
    I have this class mapped @Entity @Table(name = "USERS") public class User { private long id; private String userName; } and I make a query: Query query = session.createQuery("select id, userName, count(userName) from User order by count(userName) desc"); return query.list(); How can I acces the value returned by the query?

    Read the article

  • How to disable the delete button using if condition in Extjs

    - by sample
    How to disable the delete button using if condition in Extjs for ex;i want to disable the button if it satifies the given if condition else remain enabled. if(validAction(entityHash.get('entity.xyz'),actionHash.get('action.delete'))) This is the grid Delete button code. Ext.reg("gridheaderbar-inActive", Ad.GridInActiveButton,{ xtype: 'tbspacer', width: 5 }); Ad.GridCampDeleteButton = Ext.extend(Ext.Toolbar.Button, { //text: 'Delete', cls: 'ad-img-button', width:61, height:40, iconCls: 'ad-btn-icon', icon: '/webapp/resources/images/btn_del.png', handler:function(){ statusChange(this.parentBar.parentGrid, 'Delete') } });

    Read the article

  • ordering by a property on a joined table linq to sql

    - by Gazeth
    I have the following linq query from o in context.Opportunities join i in context.Interactions on o.OpportunityID equals i.OpportunityID into ints from i in ints.DefaultIfEmpty() orderby i.StatusID descending, o.StatusID descending select o Now i want to then do a distinct on the opportunities table but doing so removes my orderby. I know that you can do Distinct().OrderBy but how do i get a reference to the interactions table that was joined when I'm only selecting the opportunity entity?

    Read the article

  • What components have you built that you are reusing over and over again for your desktop application

    - by Jason
    We are building our internal library of components up, and was wondering what everybody has in their library of reusable components for your organization, for desktop applications. Our list currently includes only a couple of components: Logon, Security and User Group functionality System Tray / Service Framework Component for Internet Communications (to handle proxies, security, etc...) Billing What else do you have, that we should add to our list? If you have reusable web components, save your answers... I will open a different question if this one is successful.

    Read the article

  • Oracle database on trigger fail rollback

    - by GigaPr
    Hi I want to create a trigger that execute on update of a table. in particular on update of a table i want to update another table via a trigger but if the trigger fails (REFERENTIAL INTEGRITY-- ENTITY INTEGRITY) i do not want to execute the update anymore. Any suggestion on how to perform this? Is it better to use a trigger or do it anagrammatically via a stored procedure? Thanks

    Read the article

  • Need recommendation for a table structure

    - by yapiskan
    I have an entity which has 4 different types of property that could have only one value for each case which are boolean, decimal, string or text. I don't want to define the table with 4 boolean, decimal, nvarchar and ntext columns. What would you recommend to cover this case?

    Read the article

  • How to create a Link that supplies its own Markup?

    - by Aranian
    I'm trying to create a link that will hide or show a part of my page. The link should be reusable and display one of two images, depending on state. Adding the two subcomponents on every page where I use the link is kind of clunky so I wanted to create a component that behaves like a link while automatically adding its content. This is the Link component: public class ToggleVisibilityLink extends AjaxFallbackLink<Boolean> { public ToggleVisibilityLink(final String id, final IModel<Boolean> model) { super(id, model); setOutputMarkupId(true); add(new Image("collapseImage") { @Override public boolean isVisible() { return !getModelObject(); } }); add(new Image("expandImage") { @Override public boolean isVisible() { return getModelObject(); } }); } @Override public void onClick(final AjaxRequestTarget target) { setModelObject(!getModelObject()); if (target != null) { target.add(this); send(this.getParent(), Broadcast.EXACT, target); } } } And this is how I currently use it in HTML (this is added to the page or panel where I use the link): <a href="#" wicket:id="collapseExpandLink" class="collapseExpandLink"> <wicket:link> <img src="collapse.png" wicket:id="collapseImage" class="collapseExpandImage collapse"> </wicket:link> <wicket:link> <img src="expand.png" wicket:id="expandImage" class="collapseExpandImage expand"> </wicket:link> </a> And the corresponding Java call: add(new ToggleVisibilityLink("collapseExpandLink", new PropertyModel(this, "hidden"))); But I want to be able to skip the body inside the link as one would have to know about the internals of ToggleVisibilityLink. I experimented with IMarkupResourceStreamProvider, using Dynamic markup in Wicket as a starting point. By googling I found another example where the poster was only able to get that to work when using a Panel, and I was able to do that as well. But I'd really like to keep the link and not package it inside a Panel, as I would not be able to style the link in the markup. I'm also open to alternatives to encapsulate the link and its body.

    Read the article

  • customizing item renderer

    - by BretzelPretzel
    i would like the label and message to be on the left of the icon....i would also like the icon to be right-aligned what is the best way to do this? I'm confused by some of the tutorials i'm seeing for custom item renderers since they never explain how to format the renderer mxml, so i haven't figured that out yet although i suspect that's what i need to be doing <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:components="components.*" creationComplete="imagelistings.send()" title="{data.title}"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.events.FlexEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import spark.events.IndexChangeEvent; import valueObjects.imagelistingclass; [Bindable] private var listings:ArrayCollection = new ArrayCollection(); protected function toursService_resultHandler(event:ResultEvent):void { var listingarray:ArrayCollection=event.result.Chapter1.entry; var entry:imagelistingclass; for each(var plate:Object in listingarray) { entry=new imagelistingclass(); entry.image=plate.image; entry.location=plate.location; entry.html=plate.html; listings.addItem(entry); } } ]]> </fx:Script> <fx:Declarations> <s:HTTPService id="imagelistings" result="toursService_resultHandler(event)" url="assets/chapter1info.xml"/> </fx:Declarations> <s:List id="theList" left="0" right="0" top="0" bottom="0" alternatingItemColors="#000000" contentBackgroundColor="#404040" dataProvider="{listings}" horizontalScrollPolicy="off" > <s:itemRenderer> <fx:Component> <s:IconItemRenderer color="#FFFFFF" fontSize="30" iconField="location" labelField="" iconFillMode="scale" iconScaleMode="letterbox" iconHeight="125" messageField="image"> </s:IconItemRenderer> </fx:Component> </s:itemRenderer> </s:List>

    Read the article

  • What is the best way to create derived properties

    - by user342788
    I have a datamodel with to-many to-many relations. Using the example of employee database let say the entity division is related to department which in turn is related to employee. The employee has an attribute salary. How best to have a attribute at the level of division which is derived from the salary attribute. For example average salary or maximum salary. I would need those attributes to sort the list of departments.

    Read the article

  • java swing, simulate JTable terminateEditOnFocusLost behaviour

    - by blow
    Hi all, i'm using putClientProperty("terminateEditOnFocusLost", Boolean); to make jtable end editing and clear current selected rows when it lose focus or when simply click over an other GUI component. This is very useful, but with "terminateEditOnFocusLost" there are some strange behaviours if it is used with editCellAt and changeSelection. There are also some undesiderable TableModelEvents fired for some fake table updates. So, im looking for an hack to simulate "terminateEditOnFocusLost without using it, is this possibile? Thanks all.

    Read the article

  • Adding C++ DLL's to a C# project

    - by WebDevHobo
    I'm trying to use the lame_enc.dll file from LAME in a C# project, but adding the thing seems impossible. I keep getting an error that says that a reference could not be added and to please check if the is accessible, a valid assembly or COM component. I have no C++ experience, though I would like to use the functionality. Right now I'm using Process from the .NET framework to call lame.exe and do stuff, but I'd like to know if there's another way.

    Read the article

  • NHibernate: How to-reconfigure mappings at runtime?

    - by George Mauer
    Let's get this out of the way first: I know that SessionFactory is immutable - I'm trying to change the Configuration at runtime and regenerate ISessionFactory. Specifically, I have a Customer mapped that will have some fields added to its dynamic-component node at runtime. I would like to do something like this var newSessionFactory = previousConfiguration .RemoveClassMapping(typeof(Customer)) .AddXmlString(newMappingForCustomer) .BuildSessionFactory(); However, I don't see any obvious way to remove a mapping, is there anything I can do short of regenerating the entire Configuration?

    Read the article

  • I get an error in FF (NS_ERROR_MALFORMED_URI)

    - by Ingalls
    Just wondering if there is an easy fix for this problem. The full error is: Error: uncaught exception: [Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIURL.spec]" nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)" location: "JS frame :: chrome://fastdial/content/file.js :: anonymous :: line 218" data: no] And line 218 is nsiUrl.spec = url; I give you all of the code from the file if you need it... Thanks Ingalls

    Read the article

  • Is it a good practice to have trim in setter?

    - by zibi
    I'm doing a code review and I noticed such a code: @Entity @Table(name = "SOME_TABLE") public class SomeReportClass { @Column(name = "REPORT_NUMBER", length = 6, nullable = false) private String reportNumber; ..... public String getReportNumber() { return reportNumber; } public void setReportNumber(String reportNumber) { this.reportNumber = StringUtils.trimToNull(reportNumber); } } Every time I see trimming inside of a setter I feel that its not the clearest solution - what is the general practice with that issue?

    Read the article

  • NHibernate BusinessRules

    - by mr0zek
    I need implement business using nhibernate ORM I have two entites Project (Id,Name,Effort) Task (Id,Name,Effort) I need update Effort in Project when Effort in Task changes. How to do it ? I have planed to use event system build in nhibernate but still don't know how to access to Project entity within Task Event

    Read the article

< Previous Page | 251 252 253 254 255 256 257 258 259 260 261 262  | Next Page >