• RELEVANCY SCORE 3.98

    DB:3.98:Easy Question On Property Classes md




    How does one associate a property class with an object? I cannot find anything in the property palette, but I'm sure I'm missing something obvious.

    DB:3.98:Easy Question On Property Classes md

    Use the Subclass Information property. In the dialog box that appears, click the Property Class radio button. Then you can choose the Property Class you want from list.

    Regards,
    Robin Zimmermann
    Forms Product Management

  • RELEVANCY SCORE 3.20

    DB:3.20:Determining The Type Of The Value From A Binding kf




    Hey,I have a custom control that I want to behave slightly differently based on the type of the value bound to a particular property.    I handle the control loading and am able to retrieve the binding for the property.My question is: given a binding, is there any easy way to determine the type of the value that results from that binding?  Are there any WPF helper classes exposed that would let me get to the metadata easily (i.e. classes that know how to follow a complex property path)?Thanks

    DB:3.20:Determining The Type Of The Value From A Binding kf

    Hi,
     
    --given a binding, is there any easy way to determine the type of the value that results from that binding?  Are there any WPF helper classes exposed that would let me get to the metadata easily
     
    As far as I know, there is no easy way to determine the type of the binding item object from a given binding. Since binding can accept several kinds of source path, like ElementName, Source, RelativeSource and other implicit source etc. you can not get the source object directly in code. But I recommend that you apply a value converter in the binding, and in the Convert method in the code behind, check the type of the value argument and then return appropriate value for binding. The following is a small example.
     
    XAML code:
    Window x:Class=WpfApplication1.Window2
        xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
        xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
        xmlns:local=clr-namespace:WpfApplication1
        Title=Window2 Height=300 Width=300
        Window.Resources
            local:People x:Key=people /
            local:DataTypeConverter x:Key=converter /
        /Window.Resources
        StackPanel
            ListBox ItemsSource={Binding Source={StaticResource people}} Name=listBox
                ListBox.ItemTemplate
                    DataTemplate
                        TextBlock Text={Binding Path=Name} Name=textBlock  /
                        DataTemplate.Triggers
                            DataTrigger Binding={Binding Converter={StaticResource converter}} Value=Person
                                Setter Property=Foreground TargetName=textBlock Value=Red /
                            /DataTrigger
                            DataTrigger Binding={Binding Converter={StaticResource converter}} Value=Animal
                                Setter Property=Foreground TargetName=textBlock Value=Green /
                            /DataTrigger
                            DataTrigger Binding={Binding Converter={StaticResource converter}} Value=Fruit
                                Setter Property=Foreground TargetName=textBlock Value=Yellow /
                            /DataTrigger
                        /DataTemplate.Triggers
                    /DataTemplate
                /ListBox.ItemTemplate
            /ListBox
        /StackPanel
    /Window
    In the code behind:
    using System;
    using System.Windows;
    using System.Windows.Data;
    using System.Collections.ObjectModel;
    namespace WpfApplication1
    {
        public partial class Window2 : Window
        {
            public Window2()
            {
                InitializeComponent();
            }
        }
        public class People : ObservableCollectionobject
        {
            public People()
            {
                this.Add(new Person() { ID = 1, Name = John });
                this.Add(new Animal() { ID = 2, Name = Cat });
                this.Add(new Fruit() { ID = 3, Name = Apple });
            }
        }
        public class Person
        {
            public string ID { get; set; }
            public string Name { get; set; }
        }
        public class Animal
        {
            public string ID { get; set; }
            public string Name { get; set; }
        }
        public class Fruit
        {
            public string ID { get; set; }
            public string Name { get; set; }
        }
        public class DataTypeConverter : IValueConverter
        {
            #region IValueConverter Members
            public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
            {
                if (value is Person)
                {
                    return Person;
                }
                if (value is Animal)
                {
                    return Animal;
                }
                if (value is Fruit)
                {
                    return Fruit;
                }
                return null;
            }
            public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
            {
                throw new NotImplementedException();
            }
            #endregion
        }
    }
     
    Hope this helps.
    Thanks.Jim Zhou -MSFT

  • RELEVANCY SCORE 3.14

    DB:3.14:Checking Internetreachability From Another Thread dp





    Please check this Stack Overflow question and my answer to similar question build on top of the SO one. It is independent from Unity classes, so can be used on separate thread.


    Using test result, you can update a bool field/property which is visible in the main thread.

    DB:3.14:Checking Internetreachability From Another Thread dp


    Please check this Stack Overflow question and my answer to similar question build on top of the SO one. It is independent from Unity classes, so can be used on separate thread.


    Using test result, you can update a bool field/property which is visible in the main thread.

  • RELEVANCY SCORE 2.91

    DB:2.91:Saving And Loading Control Properties 7f


    Quick question,

    Does anyone know of an "easy" way to save and load pre-defined appearences or "skins" for controls and indicators?

    I had hoped LV 8.0 did this in the property explorer, but having just checked it out, it doesn't seem to.

    I basically want to be able to define the appearance of indicators (XY
    graphs particularly) based on calling up either ini files or otherwise.

    I want to avoid writing a cumbersome cluster-based read and write
    routine for each and every type of control (Split into classes of
    course, but still.....)

    Shane.




    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

    DB:2.91:Saving And Loading Control Properties 7f

    Hopefully this will be included in OpenG (look here).




    ___________________Try to take over the world!

  • RELEVANCY SCORE 2.89

    DB:2.89:Question About Jee Monitoring In Scom 2012 da


    Hello,
    I've deployed JMXExtender in JBoss 5.1 on Windows. Everything gone ok and result is great, but...

    I could not get VERY important data from following Mbeans:
    http://localhost:8080/JMXExtenderMBeans?JMXQuery=java.lang:name=PS Old Gen,type=MemoryPool

    MBeans version=7.1.1010.0
    MBean Name=sun.management.MemoryPoolImpl objectName=java.lang:name=PS Old Gen,type=MemoryPool
    Properties
    Property Name=Name type=java.lang.StringPS Old Gen/Property
    Property Name=Type type=java.lang.StringHEAP/Property
    Property Name=Valid type=java.lang.Booleantrue/Property
    Property Name=PeakUsage type=javax.management.openmbean.CompositeDataSupport
    Property Name=compositeType type=javax.management.openmbean.CompositeType
    Property Name=array type=java.lang.Booleanfalse/Property
    Property Name=className type=java.lang.Stringjavax.management.openmbean.CompositeData/Property
    Property Name=description type=java.lang.Stringjava.lang.management.MemoryUsage/Property
    Property Name=typeName type=java.lang.Stringjava.lang.management.MemoryUsage/Property
    /Property
    /Property
    Property Name=Usage type=javax.management.openmbean.CompositeDataSupport
    Property Name=compositeType type=javax.management.openmbean.CompositeType
    Property Name=array type=java.lang.Booleanfalse/Property
    Property Name=className type=java.lang.Stringjavax.management.openmbean.CompositeData/Property
    Property Name=description type=java.lang.Stringjava.lang.management.MemoryUsage/Property
    Property Name=typeName type=java.lang.Stringjava.lang.management.MemoryUsage/Property
    /Property
    /Property
    /Properties
    /MBean
    /MBeans

    DB:2.89:Question About Jee Monitoring In Scom 2012 da

    Hi Pavel,
    JMXExtender doesn't work in standalone Java applications because it's a servlet and requires a servlet container. So for collecting stats, you will still need a script on the xplat side. However, if the script returns data in xml format, on the
    management server side, you don't have to write a script to process the data in the workflow anymore. There is a new module in SCOM 2012 that takes a xml string and outputs System.Data so you can directly take xml as input and pass it to downstream workflows
    for processing such asxpath query.This should improve scalability on the management server side because there is no more need to spin off processes for the scripts.

  • RELEVANCY SCORE 2.88

    DB:2.88:How To Update/Refresh A Diagram After Changing A Property 3j


    Hi, everybody,
    maybe this is a newbie question, bute it took me several hours now to search through everything I've found but still can't figure it out!
    I created a OrderBy-Property on my ModelRoot to let the user choose the sorting of the Properties of my designed classes (ModelEntity and ModelProperty are both derived from DomainClass and ModelProperty is linked to the Compartmentshape of ModelEntity).
    On the change of the ModelRoot Property I'd like to refresh the diagram so that the alternate sorting takes place immediatly.
    [Edit] I didn't say clearly enough: I already found out how to do the sorting of the Properties. The question is just how to refresh the diagram, because the new sorting at the moment only takes place when I re-open the diagram. [End Edit]
    Thanks for your time in advance!
    Best regards
    Soenke

    DB:2.88:How To Update/Refresh A Diagram After Changing A Property 3j

    Hello Snke
    Normally the redisplay is automatically handled by the DSL runtime when a domain property is associated with a diagram element. I'm surprized that this does not work for you. In you OnPropertyChangedEvent, do you change the items in the collection represented
    in the compartment? if yes to you commit the transaction?
    In case you use a calculated property, you might need to help a bit: for instance the code below is the implementation of a calculated property (Summary) inside a domain class, and because calculated properties do not notify when they are changed, their
    representation on the diagram is not updated.
    stringpreviousSummary=string.Empty; internalstringGetSummaryValue(){stringsummary=GetSummary(); //Does the real work. //Special processing forthedecoratorassociatedwiththeLabeltorefreshcorrectly(Sinceitiscalculated,theValueChangedeventisnotfired!if(!IsDeleting!IsDeleted(previousSummary!=summary)(!Store.InSerializationTransaction)){previousSummary=summary;using(Transactiontransaction=Store.TransactionManager.BeginTransaction(SummaryChanged)){//Notify through the meta-property GetDomainClass().FindDomainProperty(Summary,true).NotifyValueChange(this);transaction.Commit();}} returnsummary;}
    I hope this helps.
    Best regardsJean-Marc

  • RELEVANCY SCORE 2.86

    DB:2.86:Question On Wpf Shared Properties ax


    Hello. I'm new to WPF and currently reading aboutdependency properties in 'Pro WPF in C# 2010'.
    In the section on Shared Properties, the book mentioned that
    if you use a style to set the TextBlock.FontFamily property automatically, your style
    will also affect the Control.FontFamily property because behind the scenes both classes use the same
    dependency property.
    so I created a new WPF application and tested out the following XAML.

    Window x:Class=WpfApplication1.MainWindow
    xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
    xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
    Title=MainWindow Height=350 Width=525
    Window.Resources
    Style TargetType=TextBlock
    Setter Property=FontFamily Value=Elephant/
    /Style
    /Window.Resources
    Grid
    StackPanel HorizontalAlignment=Left
    TextBox Text=Brown Fox /
    TextBlock Text=Brown Fox/
    Button Content=Brown Fox/
    /StackPanel
    /Grid
    /Window

    DB:2.86:Question On Wpf Shared Properties ax

    Hi Seonsoo,
    A typed Style will only automatically apply to that exact type. If you use a resource key to explicitly apply this style to other controls, their FontFamily property will be changed.
    I guess what Matthew want to say is that you can apply a style with a setter for TextBlock.FontFamily property to any control, and it will work.
    If you still have any doubts or concerns about this issue, please feel free to let me know.
    Best regards,
    MinPlease remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • RELEVANCY SCORE 2.86

    DB:2.86:Split Directory Packaging And Deployment Question xd



    Hello Rob Woollen and All,

    I have a question about packaging and deployment with the "split directory structure"
    in WebLogic Server 8.1.

    Specifically, how does one go about deciding which classes to put in myEnterpriseApp/myWebApp/WEB-INF/classes,
    versus myEnterpriseApp/myEjbModule, versus myEnterpriseApp/APP-INF/classes?

    I think the answer to the first part is easy enough: if there are classes depended
    on by, say, the servlets in a web app, but not depended on anywhere else in the
    enterprise app, then those classes should go in WEB-INF/classes.

    It's the other part of the question that gives me trouble. I use local interfaces
    on my session beans. Let's say I have a domain object class returned from a session
    bean method and depended on by the web app. If I put that domain object class
    under myEnterpriseApp/myEjbModule, then the web app can see it by virtue of the
    classloader arrangement.

    But the wlcompile Ant target supposedly compiles stuff to build/APP-INF/classes.
    What stuff? How does it decide? I haven't experimented and empirically observed
    yet, but I couldn't find the answer in the documentation and tutorials. Is it
    looking for java source files under src/myEnterpriseApp but not under myWebApp
    or myEjbModule? In general, does BEA have any recommendations in this area?

    Thanks,
    Randy

    DB:2.86:Split Directory Packaging And Deployment Question xd


    "Randy Stafford" rstafford@iqnavigator.com wrote in message
    news:3f96dfac@newsgroups.bea.com...

    Hi Mark,

    Thanks for the reply. I don't have 8.1 installed yet, so I can'tempirically
    observe the example's behavior. But I downloaded the example andinspected the
    code. It answers some, but not all, of my questions.Where to start.

    In 8.1 we have made optimizations to J2EE packaging. Mostly this is about
    not having to use manifest classpath's to do sharing of of common classes.
    MF Cp's are a pain to configure. You put your classes in one location in
    the ear and then EVERY module has to have a MF CP entry pointing to that
    location, and then you actually have N number of classes loaded per module.
    The mechanism to share classes across all modules is APP-INF/lib and
    APP-INF/classes. The benefit is that APP-INF is shared across all modules.
    So to your question below you could just put it in the EJB module, BUT if
    you have mutliple EJBs that you split into seperate modules your back tot
    the same issue. So APP-INF is just the simplist solution over-all.

    Split-dir is a specified way to lay out disk your src files

    Split-dir

    From code inspection, it looks like the JSP and EJB (therefore the web appmodule
    and EJB module) both depend on the AppUtils class, which is not inAPP-INF, but
    rather in a directory under the enterprise app directory that does notrepresent
    a web app module or EJB module. In the build file's compile target, is itthe
    wlcompile task invocation that causes compilation of AppUtils.java? Or isit
    the ant task invocation (with "build.appStartup" as the value of thetarget attribute)
    that causes compilation of AppUtils.java due to the dependency ofApplicationStartup
    on AppUtils? And what subdirectory of the build directory doesAppUtils.class
    end up in?

    Why not just put AppUtils.java in the EJB module? Both dependent moduleswould
    still be able to see it by virtue of the classloader arrangement. Doesputting
    it in outside of all dependent modules represent a convention that BEArecommends?

    Finally, why not put applicationresource.properties in the same place asits user
    AppUtils.java?

    Thanks,
    Randy

    "Mark Griffith" post_to_newsgroups@bea.com wrote:
    Randy:

    (Rob may post later, but here is my take)

    "Randy Stafford" rstafford@iqnavigator.com wrote in message
    news:3f95ff0a$1@newsgroups.bea.com...
    Hello Rob Woollen and All,

    I have a question about packaging and deployment with the "splitdirectory
    structure"
    in WebLogic Server 8.1.

    Specifically, how does one go about deciding which classes to put inmyEnterpriseApp/myWebApp/WEB-INF/classes,
    versus myEnterpriseApp/myEjbModule, versusmyEnterpriseApp/APP-INF/classes?
    I think the answer to the first part is easy enough: if there areclasses
    depended
    on by, say, the servlets in a web app, but not depended on anywhereelse
    in the
    enterprise app, then those classes should go in WEB-INF/classes.

    It's the other part of the question that gives me trouble. I use localinterfaces
    on my session beans. Let's say I have a domain object class returnedfrom
    a session
    bean method and depended on by the web app. If I put that domainobject
    class
    under myEnterpriseApp/myEjbModule, then the web app can see it byvirtue
    of the
    classloader arrangement.

    But the wlcompile Ant target supposedly compiles stuff tobuild/APP-INF/classes.
    What stuff? How does it decide?wlcompile has a module factory. If a directory is claimed by a module
    factory then it is compiled by that specific module compiler. The rules
    for
    module definition follow the same J2EE formatting rules.

    So:

    /myejb/

    would be identified as a ebj module by:

    */myejb/meta-inf/ejb-jar.xml
    */myejb/myejb.ejb (EJBGen file)

    then src files (*.java) will be compiled to

    $BUILD_DIR/myejb/

    /myweb/

    would be identifid as a web module by:

    */myweb/WEB-INF/web.xml

    Also for webapps

    /myweb/WEB-INF/src/*.java
    will be compiled ot

    $BUILD_DIR/myweb/WEB-INF/classes

    We choose WEB-INF/src following the struts precedence.

    So a plain old module that has noting but .java files in it will go to

    $BUILD_DIR/APP-INF/classes

    If you have a jar of classes that you need to share across the entire
    ear,
    you would check it into your src tree at:

    $SRC_DIR/APP-INF/lib/mycommon.jar

    You can check out an example at:$BEA_HOME/weblogic81/samples/server/examples/src/examples/splitdir/helloWorl
    dEar

    Hope this helps.

    cheers
    mbg

    I haven't experimented and empirically observed
    yet, but I couldn't find the answer in the documentation and tutorials.Is it
    looking for java source files under src/myEnterpriseApp but not undermyWebApp
    or myEjbModule? In general, does BEA have any recommendations in thisarea?
    Thanks,
    Randy

  • RELEVANCY SCORE 2.86

    DB:2.86:Easy Question 3k



    Can we do intervlan routing on a Cisco Catalyst 3500XL ?

    or it requires as minimum a 3550?

    DB:2.86:Easy Question 3k


    Hello Jorge,

    you are exactly right, the 3500XL does not support inter-VLAN routing, you need a 3550 at a minimum. If you think about purchasing a Layer 3 switch, keep in mind though that the 3550 switches are End-of-Life/End-of-Sale, and that Cisco recommends 3560 and 3750 series switches:

    EOS/EOL Announcement Cisco Catalyst 3550 Series Switches

    http://www.cisco.com/en/US/products/hw/switches/ps646/prod_eol_notice0900aecd8029f777.html

    HTH,

    GP

  • RELEVANCY SCORE 2.85

    DB:2.85:Using Javafx.Beans And Javafx.Collections Classes In Non-Graphical Code Library? 87


    Hi,I wonder if it is encouraged to use classes like ObservableList, Binding, Property and so on in non-graphical Java code libraries!?Classes in the javafx.beans and javafx.collections packages.I mean are those classes a replacement for java.util.Observable, java.util.EventListener etc.?

    DB:2.85:Using Javafx.Beans And Javafx.Collections Classes In Non-Graphical Code Library? 87

    If your code library provides hooks into setting the properties (or modifying the collections), then your JavaFX app can invoke those methods on the JavaFX Application Thread. That will allow you to bind to the properties or use the collections in ListViews and TableViews. Whether or not that works depends on the nature of your library.

  • RELEVANCY SCORE 2.83

    DB:2.83:Property Classes c3


    Does someone use in forms Property Classes?
    Any information would be helpful...

    thanks

  • RELEVANCY SCORE 2.82

    DB:2.82:How To Get The Information Of An Element, To Which A Given Attribute Is Applied? pj


    Suppose that I'm writing a custom attribute class called CustomAttribute, which is applicable to classes and properties. What I want is to execute different process depending on the elements applied that attribute. The following codes demonstrate the problem:
    AttributeUsage(AttributeTargets.Class Or AttributeTargets.Property)
    Public Class CustomAttribute
    Inherits Attribute
    Public Sub New()
    Dim classInfo As Reflection.TypeInfo
    Dim propInfo As Reflection.PropertyInfo
    If ... Then 'Predicate whether the element is a class or a property
    classInfo= ... 'Get info of that class
    'Processing that class
    Else
    propInfo= ... 'Get info of that property
    If propInfo.CanWrite Then
    'Processing that writable property
    Else
    'Processing that read-only property
    End If
    End If
    End Sub
    End Class

    Custom
    Public Class SomeClass
    Custom
    Property SomeProp As Integer
    End Class

    The question is, how to function those lines above withcomments?
    PS. SomeClass or other classes, to which Custom attribute is applied to, are unknown and invisible to Custom, hence, please do NOT resolve the problem from the perspectives of these classes.
    Thanks for help!

    DB:2.82:How To Get The Information Of An Element, To Which A Given Attribute Is Applied? pj

    Thank you, the discussions in the thread you recommended is really helpful.

  • RELEVANCY SCORE 2.82

    DB:2.82:Re: Architecture Question kd


    I'm with BDLH on this one. Give the domain objects some love. Why have a bunch of classes each representing a Widget to some particular object. Why does your UI "expose" the class's property names?

    DB:2.82:Re: Architecture Question kd

    HTML from stored procedures??? And I thought my scenario was bad!The things I've seen in database business "logic" would make a grown developer cry.

  • RELEVANCY SCORE 2.81

    DB:2.81:Finding A Class? fk


    Easy question, I have two classes that need to talk to each other. How do I find an instanciated class? By it's thread? By it's object name? By the class loader?

    Thanks!

    I would think the code would look like this:

    Object o = new Object();
    o = someRunningClass("thatClass");

    Then I could operate on the methods of thatClass.

    DB:2.81:Finding A Class? fk

    As jschell said you can't really do this. Suppose you had two instances of class A. Then how would you determine which instance of the class you were modifing? You don't have a reference, so there is no way to know which one you want to modify.

    You could store the objects somewhere in your app where everyone has access to them. You could store everything in JNDI space if you are using J2EE, but for most cases this would be a bad design.

  • RELEVANCY SCORE 2.80

    DB:2.80:Cqwp Multile Lists Caml cd


    Greetings.I am hoping someone can help me out here as I've been banging my head on this for longer than I would like to admit.Here's the big picture:I have two custom lists. One called book reviews the other called movie reviews. Each list has a title and a category. I want to use the CQWB to merge the two lists. I am able to pull the titles, but not the categories.So my first question is this. Is it possible to merge to custom lists using the CQWB. I am finding a lot of information on this out there and all of it is leading me to conclude yes. Can someone confirm that?Here is my .webpart file:webParts  webPart xmlns=http://schemas.microsoft.com/WebPart/v3    metaData      type name=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c /      importErrorMessageCannot import this Web Part./importErrorMessage    /metaData    data      properties        property name=FilterType3 type=string /        property name=PageSize type=int-1/property        property name=SortBy type=string{8c06beca-0777-48f7-91c7-6da68bc07b69}/property        property name=ChromeState type=chromestateNormal/property        property name=AllowZoneChange type=boolTrue/property        property name=ContentTypeBeginsWithId type=string /        property name=ServerTemplate type=string850/property        property name=Height type=string /        property name=FilterField2 type=string /        property name=SystemViewFields type=string /        property name=ParameterBindings type=string /        property name=FeedTitle type=string /        property name=AllowMinimize type=boolTrue/property        property name=ContentTypeName type=string /        property name=TitleUrl type=string /        property name=AllowConnect type=boolTrue/property        property name=DisplayColumns type=int1/property        property name=XslLink type=string null=true /        property name=ExportMode type=exportmodeAll/property        property name=GroupBy type=string /        property name=DataSourcesString type=string /        property name=WebUrl type=string /        property name=AllowHide type=boolTrue/property        property name=AdditionalGroupAndSortFields type=string null=true /        property name=FeedDescription type=string /        property name=WebsOverride type=string /        property name=CommonViewFields type=string /        property name=DisplayName type=string /        property name=ChromeType type=chrometypeTitleOnly/property        property name=AdditionalFilterFields type=string null=true /        property name=NoDefaultStyle type=string /        property name=FilterValue3 type=string /        property name=BaseType type=string /        property name=FireInitialRow type=boolTrue/property        property name=SortByDirection type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cDesc/property        property name=DataFields type=string /        property name=GroupStyle type=stringDefaultHeader/property        property name=DataColumnRenames type=string /        property name=HeaderXslLink type=string /        property name=AllowEdit type=boolTrue/property        property name=MissingAssembly type=stringCannot import this Web Part./property        property name=HelpUrl type=string /        property name=ViewFieldsOverride type=string![CDATA[FieldRef Name=Title Type=Text Nullable=TRUE /FieldRef Name=Book_x0020_Category Type=Choice Nullable=TRUE/FieldRef Name=Movie_x0020_Category Type=Choice Nullable=TRUE /]]/property        property name=FilterField1 type=string /        property name=UseCache type=boolTrue/property        property name=ShowUntargetedItems type=boolTrue/property        property name=HelpMode type=helpmodeModeless/property        property name=DataSourceID type=string /        property name=ListName type=string /        property name=FilterType1 type=string /        property name=Default type=string /        property name=FilterType2 type=string /        property name=FilterOperator1 type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cEq/property        property name=ViewFlag type=string /        property name=FilterOperator3 type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cEq/property        property name=FilterOperator2 type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterFieldQueryOperator, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cEq/property        property name=GroupByFieldType type=string /        property name=UseCopyUtil type=boolFalse/property        property name=Description type=stringUse to display a dynamic view of content from your site on a web page/property        property name=Filter1ChainingOperator type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterChainingOperator, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cAnd/property        property name=ItemLimit type=int15/property        property name=SortByFieldType type=string /        property name=ListGuid type=string /        property name=ViewContentTypeId type=string /        property name=ItemXslLink type=string/sites/tms/tmcomms/XSL/CQWPDemo1.xsl/property        property name=FeedEnabled type=boolFalse/property        property name=MainXslLink type=string /        property name=TitleIconImageUrl type=string /        property name=Filter2ChainingOperator type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+FilterChainingOperator, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cAnd/property        property name=FilterValue1 type=string /        property name=ListsOverride type=string![CDATA[ListsList ID=3718c30e-e276-4a3b-91a7-db979977f5b5 Name=_rjbDemoListBooks/List ID=c48142b7-3a1e-4fde-9008-3828b5e97365 Name=_rjbDemoListMovies//Lists]]/property        property name=GroupByDirection type=Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart+SortDirection, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cAsc/property        property name=Direction type=directionNotSet/property        property name=QueryOverride type=string![CDATA[OrderByFieldRef Name=Title Type=Text Nullable=TRUE /FieldRef Name=Book_x0020_Category Type=Choice Nullable=TRUE /FieldRef Name=Movie_x0020_Category Type=Choice Nullable=TRUE //OrderBy]]/property        property name=UseSQLDataSourcePaging type=boolTrue/property        property name=Width type=string /        property name=FilterByAudience type=boolFalse/property        property name=FilterValue2 type=string /        property name=SampleData type=string null=true /        property name=Xsl type=string null=true /        property name=CacheXslStorage type=boolTrue/property        property name=Hidden type=boolFalse/property        property name=Title type=string..:: Movie and Book Reviews ::../property        property name=ShowWithSampleData type=boolFalse/property        property name=CacheXslTimeOut type=int86400/property        property name=ItemStyle type=stringShowXML/property        property name=AllowClose type=boolTrue/property        property name=FilterField3 type=string /        property name=CatalogIconImageUrl type=string /      /properties    /data  /webPart/webPartsRight now I am getting the This query has returned no items error. Thanks in advanced.

    DB:2.80:Cqwp Multile Lists Caml cd

    Hi, Robert
       It seems that you have got some problems with merge list data using CQWP.
     
       Yes, you can do this with customization, and in your webpart schema, you have already changed the following sections:
     
       --------------------------------------------------------------------------------------------------------------------------------
       property name=ListsOverride type=stringproperty
     
       property name=ViewFieldsOverride type=string /
     
       property name=QueryOverride type=string/property
      --------------------------------------------------------------------------------------------------------------------------------
     
     
    1.    According to your schema, would you please delete ListsOverride ListName property like this:
     
                 property name=ListsOverride type=string
                       ![CDATA[ListsList ID=3718c30e-e276-4a3b-91a7-db979977f5b5/List ID=c48142b7-3a1e-4fde-9008-3828b5e97365 //Lists]]
                 /property
     
    2.    A suggestion, as these parameters is actually used for SPSiteDataQuery, would you please try test the CAML logic in a short code snippet first to check if there is something wrong in your CAML:
     
    -------------------------------------------------------------------------------------------------------------------
              using (SPSite site = new SPSite(site))
                {
                    using (SPWeb web = site.OpenWeb())
                    {
                       SPSiteDataQuery q = new SPSiteDataQuery();
                       q.Lists = ListsList ID='3718c30e-e276-4a3b-91a7-db979977f5b5' /List ID=' c48142b7-3a1e-4fde-9008-3828b5e97365'//Lists;
                       q.Webs = Webs Scope='SiteCollection' /;
                       //q.ViewFields = FieldRef Name='Title' /FieldRef Name='ID' /FieldRef Name='ColA' /;
                       q.RowLimit = 1000;
                       DataTable dt = web.GetSiteData(q);
                    }
                }
    -------------------------------------------------------------------------------------------------------------------
     
    Hope this can be helpful.
     
    Best Regards,
    -Aaron.

  • RELEVANCY SCORE 2.79

    DB:2.79:Programatically Replace Property Type And Get/Set Methods 8j


    hi there,
    i'm after some ideas on how to do this. i have a main CS file with multiple classes and properties which gets generated via 3rd party code. Once it's generated i want to go through the classes in it, find properties with specific types, then replace the
    type of the property to an Enum type, and also replace or update the get/set methods.
    Any easy way to do this (either by using a reliable regex search/replace method or maybe reflection/codedom or something similar)?

    just to make it clear, the main class i want to do the replaces in, say, has 10 classes, each class has 20-30 properties. i need to be able to a specific class and property, then grab the entire text content from the property signature to closing bracket,
    and and also extract the get and set text separately.
    thanks in advance.

    DB:2.79:Programatically Replace Property Type And Get/Set Methods 8j

    Hi,
    regex aren't really good in recognizing nested constructs (even it's possible). Use an appropriate parser instead. For c# there is one on codeplex.http://csparser.codeplex.com/
    Greetings,

    Wolfgang Kluge
    gehirnwindung.de

  • RELEVANCY SCORE 2.79

    DB:2.79:Rmi Of Multiple Classes mf


    Hello I am happy that joined at last this community.

    I am making a 3 tier application in wich there is the server app (runs on the server and connects to database) and the clients (wich run on browsers as applets wich connect to the server and gain data)

    I made a lot of classes wich I need (cause the complicity of the database) and put it on the server.
    And my question is do I have to compile all these classes as stub and skeleton, that is not easy at all if something changes.

    DB:2.79:Rmi Of Multiple Classes mf

    You only need to run rmic on classes that implement a Remote interface. Doing this generates the appropriate _Stub classes. You don't need to redo this step if your internal implementation changes, you only need to do it if the actual Remote interface changes.

    Are you using Ant to build your project? If so you should look at the rmic target, it makes this step a snap.

  • RELEVANCY SCORE 2.76

    DB:2.76:Degree a8



    Who on here is going for their CDA degree? And how easy or hard are the classes and tests?

    DB:2.76:Degree a8


    Who on here is going for their CDA degree? And how easy or hard are the classes and tests?

  • RELEVANCY SCORE 2.76

    DB:2.76:Drools Rules Based On Esb Message Property jc



    Hi all,

    After much consternation and fruitless tail-chasing I am hoping to find a clear-cut, to-the-point example of writing Drools rules based on a property of a ESB message.

    Here is the snippet from my jboss-esb.xml that defines the CBR action:

    !-- Route to different service based on message property --

    action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter"

    property name="ruleSet" value="META-INF/MyCBRRules.drl"/

    property name="ruleReload" value="true"/

    property name="destinations"

    route-to destination-name="service1" service-category="Cat1" service-name="Svc1"/

    route-to destination-name="service2" service-category="Cat2" service-name="Svc2"/

    route-to destination-name="service3" service-category="Cat3" service-name="Svc3"/

    /property

    property name="object-paths"

    object-path esb="properties.DestService" /

    /property

    /action

    It is my understanding that using the object-paths in this way would present the 'DestService' property of my ESB message to the rules set.

    So... My question is what exactly is the syntax to be used in the .drl file to allow for rule matching on the value of the ESB property?

    Sample .drl file below:

    #===================================================

    # Routing rules for ESB messages.

    #===================================================

    package com.jboss.soa.esb.routing.cbr

    #list any import classes here.

    import org.jboss.soa.esb.message.Message;

    #declare any global variables here

    global java.util.List destinations;

    rule "Service 1 Routing Rule"

    when

    ???? Syntax here to match against ESB property value ????

    then

    System.out.println("Routing to Service 1");

    destinations.add("service1");

    end

    rule "Service 2 Routing Rule"

    when

    ???? Syntax here to match against ESB property value ????

    then

    System.out.println("Routing to Service 2");

    destinations.add("service2");

    end

    rule "Service 3 Routing Rule"

    when

    ???? Syntax here to match against ESB property value ????

    then

    System.out.println("Routing to Service 3");

    destinations.add("service3");

    end

    Thanks!

    -Dennis

    DB:2.76:Drools Rules Based On Esb Message Property jc


    Tom,

    Thanks! That was it...

    I had failed to import the Properties object. I had assumed (I know...) that it was inherent with the Message object.

    My ultimate goal was to have this method work with message Context objects as well... which it does!

    Thanks again!

    -Dennis

  • RELEVANCY SCORE 2.75

    DB:2.75:Treenode Private Properties Visable To Non Members? z8


    Hello, I think this may be an easy question, but I cannot seem to figure it out. If you look at the classes TreeView, TreeNode and TreeNodeCollection you see that there are a few read only properties on a TreeNode that are also not accessible via any methods or constructors, yet they somehow get set when a node is added to a Nodes collection of a TreeView or a TreeNode. Those properties are Parent and TreeView. I am assuming there is some form of Friend class, or Namespace level private variable declaration but I cannot find any real reference to it. How do you write a class that has private member variables yet allow them to be accessed by a few 'friend' classes that do not inherit from those classes?

    DB:2.75:Treenode Private Properties Visable To Non Members? z8

    Thank you very much, I had been looking in the wrong places for that. It will be very helpfull!
    Isaac

  • RELEVANCY SCORE 2.75

    DB:2.75:Moving Application From Forms To Jdeveloper - Structure Of Application 1p


    In forms the structure of our application is very easy.

    We have a main form (main.fmb) which contains a menu (main.mmb). From this menu we have 400 forms. On press on the button we open the form you selected.

    We have about 10 modules in our application (sales, invoicing, delivery, planning etc which are simply menu items containing multiple forms that do various things like add sales order, amend sales order, customer database, part database etc)

    If we want to amend something or build a new form its simply a new form within the menu.mmb.

    Versioning is very easy as each form is simply locked when a developer is using it, and then unlocked with a history of changes once developer has finished with it.

    We have property classes, and inherited items on the forms based on a template form containing all the property classes, visual attributes etc.

    What were struggling to work out is how this fits into Jdeveloper.

    As now were working with applications,projects, entities and views. I dont understand how to best practice the structure of your application. Ie. is the entire application contained within one project in jdeveloper or many projects that can interact. I am struggling to find documentation on this so any docs/advice anyone can point me too is much appreciated.

    thanks

    DB:2.75:Moving Application From Forms To Jdeveloper - Structure Of Application 1p

    Ngac,

    I have been through the same process with my company. Three tips I would suggest is:

    A) use a modern source control system (we have migrated from PVCS to Subversion)
    B) make use of an integration server to continuesly build your software. You will find that Forms developers will find deployment a pain so this helps to bridge that (we make use of Hudson)
    C) Sometimes you need to forget how things are done in Forms, and think about what your trying to achieve.

    We had an application with over 1000 forms which were each individually deployed to customers. We have moved to a model where we deliver one .ear file.

    Our application consits of one model project, around 10 application modules and one view project.

    I wouldnt treat one form as one JSPX page, as you should make use of features such as Task Flows, Templates etc.

    If you have any specific questions then post them up and I will try and respond (i can appreciate your pain!)

    We also got an Oracle consultant in at the start of our project (for 3 days) - At the time I found this useful, but now I think there is enough activity on these forums to get better answers.

    Edited by: mehrdad.montakhab on Dec 10, 2010 4:45 AM

  • RELEVANCY SCORE 2.74

    DB:2.74:Ejb Client Giving Error fa


    Hi All,
    I am new to EJB programming. I am trying to use EJB3 and Weblogic12c.

    and would like to know why I am getting this error:
    run:
    [echo] Executing client class
    [java] java.lang.NoClassDefFoundError: com/saurabh/demo/HelloWorldClient
    [java] Caused by: java.lang.ClassNotFoundException: com.saurabh.demo.HelloW
    orldClient
    [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    [java] at java.security.AccessController.doPrivileged(Native Method)
    [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    [java] Could not find the main class: com.saurabh.demo.HelloWorldClient. P
    rogram will exit.
    [java] Exception in thread "main"
    [java] Java Result: 1

    I am posting my code so that its more easy to debug...

    1. HelloWorld.java -

    package com.saurabh.demo;
    import javax.ejb.Remote;
    @Remote
    public interface HelloWorld
    {
    public void sayHello(String name);
    }

    2. HelloWorldBean.java

    package com.saurabh.demo;
    import javax.ejb.Stateless;
    @Stateless(mappedName="HelloWorld")
    public class HelloWorldBean implements HelloWorld
    {
    public void sayHello(String name)
    {
    System.out.println("Hello "+name+ " Its Working");
    }

    3.
    package com.saurabh.demo;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class HelloWorldClient{

    private static HelloWorld helloworld;
    public static void main(String[] args)
    {
    try{
    HashtableString, String env = new HashtableString,String();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL,"username of my weblogic");
    env.put(Context.SECURITY_CREDENTIALS,"password of my weblogic");
    env.put(Context.PROVIDER_URL,"t3://localhost:7001");
    Context ctx=new InitialContext(env);
    System.out.println("Initial Context created");
    helloworld =(HelloWorld)ctx.lookup("HelloWorld#com.saurabh.demo.HelloWorld");
    System.out.println("lookup Successful");
    System.out.println("Calling EJB method...");
    helloworld.sayHello("Saurabh");
    System.out.println("Output will be in Managed Server Console");
    }
    catch(Exception e)
    {
    e.printStackTrace();
    }
    }
    }
    }

    4. build.xml
    ?xml version="1.0" encoding="iso-8859-1"?
    project name="Ejb_HelloWorld" basedir="." default="buildEar"

    property file="${basedir}/developer.properties"/
    property name="jarname" value="HelloWorld-ejb"/

    property name="appname" value="HelloWorld"/

    property name="src" value="${basedir}/src"/
    property name="build" value="${basedir}/build"/
    property name="dist" value="${basedir}/dist"/
    property name="lib" value="${basedir}/lib"/

    property name="src.server" value="${src}/server"/
    property name="src.client" value="${src}/client"/
    property name="build.server" value="${build}/server"/
    property name="build.client" value="${build}/client"/
    property name="dist.server" value="${dist}/server"/
    property name="dist.client" value="${dist}/client"/

    path id="dependencies"
    pathelement location="${lib}/javax.ejb_3.1.0.jar"/
    pathelement location="${lib}/weblogic.jar"/
    /path

    target name="clean"
    echo"Cleaning the directories"/echo
    delete dir="${build}"/
    delete dir="${dist}"/
    /target

    target name="compile" depends="clean"
    echo"Compiling EJB"/echo
    echo message="BEA_HOME:${BEA_HOME}"/
    echo message="WLS_HOME:${WLS_HOME}"/
    mkdir dir="${build}/server/classes"/
    echo message="Source directory : ${src.server}"/
    javac includeantruntime="false" srcdir="${src.server}" destdir="${build.server}/classes" debug="on"
    classpath refid="dependencies"/
    /javac
    /target

    target name="compileClient"
    echo"Compiling Client class"/echo
    mkdir dir="${build.client}/classes"/
    javac includeantruntime="false" srcdir="${src.client}" destdir="${build.client}/classes" debug="on"
    classpath refid="dependencies"/
    classpath location="${build.server}/classes"/
    /javac
    /target

    target name="buildEar" depends="compile"
    echo"Building EJB EAR"/echo
    mkdir dir="${dist.server}"/
    jar jarfile="${dist.server}/${jarname}.jar" basedir="${build}/server/classes"/
    jar jarfile="${dist.server}/${appname}.ear" basedir="${dist.server}"/
    /target

    target name="run" depends="compileClient"
    echo message="Executing client class"/echo
    java classname="com.saurabh.demo.HelloWorldClient" fork="yes"
    classpath
    pathelement location="{build.client}/classes"/
    pathelement location="{dist.server}/HelloWorld-ejb.jar"/
    pathelement location="{lib}/wlfullclient.jar"/
    /classpath
    /java
    /target
    /project

    5. developer.properties- This property file is being used to set the needed paths.
    BEA_HOME=C:\SG_Installs\wls1211_dev
    JAVA_HOME=C:\SG_Installs\Java
    WLS_HOME=C:\SG_Installs\wls1211_dev\wlserver
    project.home=C:\Saurabh Data\WebDev\EJB-HelloWorld
    wls.domain.path=C:\SG_Installs\BEA_Domain\BEA_Domain
    wls.application.path=C:\SG_Installs\BEA_Domain\BEA_Domain\applications

    There is no deployment descriptors since there is no need for that in EJB3 as I know.
    I have been trying to resolve this issue but with no luck... Please help....

    Edited by: 919201 on Mar 6, 2012 4:31 PM

    Edited by: 919201 on Mar 6, 2012 5:54 PM

    Edited by: Passionate on Mar 8, 2012 9:35 PM

    DB:2.74:Ejb Client Giving Error fa

    java.lang.NoClassDefFoundError: com/saurabh/demo/HelloWorldClient
    +[java] Caused by: java.lang.ClassNotFoundException: com.saurabh.demo.HelloW+
    orldClient

    Does {build.client}/classes include the com/saurabh/demo/HelloWorldClient class?

  • RELEVANCY SCORE 2.73

    DB:2.73:Property Scanwars Causes Deploymentexception On Admin-Consol pj



    Hello Everyone,In order to deploy EJB classes inside my WAR application (folder WEB-INF/classes) I changed the property "scanWars" insidethe file "deployers/ejb3.deployer/META-INF/ejb3-deployers-jboss-beans.xml"

    !-- Should war deployments be scanned for annotated ejbs --
    property name="scanWars"true/property

    DB:2.73:Property Scanwars Causes Deploymentexception On Admin-Consol pj


    Does anyone know if this is a JBoss Error or I was not supposed to change that file it all?I've only change that property because by default JBoss doesn't search my annotated EJB classes inside WEB-INF/classes.In the current state, the scanWars will not work for deploying EJBs through .war files. So changing that attribute is not recommended. I have created https://jira.jboss.org/jira/browse/EJBTHREE-1933 to track this.

  • RELEVANCY SCORE 2.73

    DB:2.73:Ethical Question md


    I want to ask the following kind of ethical question:I worked in computational molecular biology lab a couple years ago and I helped develop a C++ class library for analyzing protein structure. In that library, we had lots of really convenient C++ classes like for matrices, arrays, vectors, and things like that. I didn't write myself any of these convenient C++ classes, I just used them. So, now I am no longer in the lab but I have the entire class library on my laptop. I have some CS projects for school that I want to use some of those convenient classes in. So, my question is: do I need to get the permission of my lab director to use these classes or can I just go ahead and use them and of course put in a reference to where they came from? The professor that assigned the projects already told me it was a okay to use wrapper classes that I didn't write myself as long as I cited their source. So, the only problem is that I am not sure whether I would be stealing intellectual property or something. I will probably e-mail the director of my lab and ask him directly but I want to know whether he has even like a right to say no.In any case, are there any such classes freely available on the internet for which there would definitely not be any intellectual property issues with my using them in a project?

    DB:2.73:Ethical Question md

    Thanks. Here is the thread I made:http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/0774145b-cd68-4c15-9dba-be55a49e3f0a

  • RELEVANCY SCORE 2.73

    DB:2.73:Question About Audited Super-Classes ks



    Hi!Scenario:- B is a subclass of A- B has no envers annotation- A has a persistent property called p.Situation:If I mark the property p of as Audited, envers audits subclass B.If mark the whole class A as Audited, envers shows me a NotAuditedException for class B.It's easy to test with org.hibernate.envers.test.integration.superclass.MappedSubclassing test. If you move the @Audited from str property of SuperclassOfEntity and put it as class annotation in SuperclassOfEntity, this test fails.I wonder which behavior is wrong (if any)... But one is inconsistent with the other, I think...Adam, is this correct?Hernan.

    DB:2.73:Question About Audited Super-Classes ks


    Hi!Reported in JIRA as HHH-4646http://opensource.atlassian.com/projects/hibernate/browse/HHH-4646Thanks. Hernan.

  • RELEVANCY SCORE 2.73

    DB:2.73:Why The Thislock Property? xz


    Hi dear forum,I guess that's not the most important question in the world.... but as I've just gone through the InputQueue class and its support classes (QueueReader, QueueWater, etc.) I noticed the property ThisLock on some of the classes - for instance: WaitQueueReader:it has the private field 

    object thisLock = new object();

    DB:2.73:Why The Thislock Property? xz

    Thanks Justin, I guess it really is some kind of convention.... I just noticed that it is implemented differently (as you described) in the Framework's InputQueueT type...I was looking at the code-file from the msdn WCF sample (UDP transport channel) where one can find it as described above.But nonetheless.... it helps a lot to just poke around and more so when you got company and can collect 2cents from someone else ;)Kind regards,Wolfgang

  • RELEVANCY SCORE 2.73

    DB:2.73:Help Please. Jsp Resource Bundle Tomcat 4.1.18 Http 500 39


    Why can't Tomcat 4.1.18 find my resourcebundle? Where should I place the property file? Is there an "easy" way to tell tomcat where the file is located?

    file structure = %catalina_home%\webapps\MySQLAccess\WEBINF\classes\num

    the property file is "SelectResources.properties", this file is currently in my ...classes\num dir with the class file.

    Thanks,
    Lost

    DB:2.73:Help Please. Jsp Resource Bundle Tomcat 4.1.18 Http 500 39

    Some days I'm more lucid than others...the problem was that I had defined the properties file as "myProperties.properties" but forgot about the filestructure. The correct answer was was "module.myProperties.properties".

    file structure is: $catalina_home/webapps/ApplicationName/web-inf/classes/module/...

  • RELEVANCY SCORE 2.72

    DB:2.72:Inner Classes f3


    where can i get a free easy tutorial about java inner classes

    DB:2.72:Inner Classes f3

    A lot of information about this topic can be found by searching this site.

    http://onesearch.sun.com/search/developers/index.jsp?charset=utf-8qt=INNER+class

    http://java.sun.com/developer/Books/certification/certbook.pd

  • RELEVANCY SCORE 2.71

    DB:2.71:Any Way To Avoid Absolute Path Names In Property Files? 8f


    I would like to create property files that only rely on relative positions
    of files. Is there any way to accomplish this? It would be nice if the
    property file values supported property substitution,

    eg. weblogic.ejb.deploy=%weblogic.system.home%/classes/beanManaged.jar

    Or is it safe to simply use relative paths for all file references?

    eg. weblogic.ejb.deploy=classes/beanManaged.jar

    Thank you for any suggestions.

    Marko.
    .

    DB:2.71:Any Way To Avoid Absolute Path Names In Property Files? 8f

    Rob Woollen wrote:

    In what version? I've always deployed beans with relative paths. It's
    always worked for me.I went back and took a closer look at weblogic.log when deploying a bean via
    weblogic.properties
    with a relative path. From the stack trace for DeploymentException I gathered that
    I was wrong to say
    "it doesn't work" -- a bean can indeed be deployed with a path relative...to
    current directory where "current"
    is the directory you're in when you start WebLogic. This doesn't quite work out to
    a relative path --
    weblogic.system.home or weblogic.system.home + weblogic.system.name should be
    used rather than a
    current (floating) directory or am I missing something?

    This is in 5.1 sp3

    Thanks,

    Alex

  • RELEVANCY SCORE 2.71

    DB:2.71:How To Get User Friendly Display Strings For Property Name And Value In Propertygrid (Localized, More Than One Word)? 7f


    Hi all,
    i am using property grid in my app. I created data classes, added those attributes to properties I want to have in the grid - all nice and easy...
    Last thing: I would like to haveuser friendlystrings forproperty names and values.Those retrieved by PropertyGrid using reflection are too technical (Fine for programers but not for average users) not to mention localization. Now
    property names are the name of the member in my code. Also e.g. boolean property values are displayed like true instead of e.g. Ja (German: yes).
    I found information on how to customize value editors and overridedisplay of values (TypeConverter, UiTypeEditor). Is this really the way to achieve this?
    I guess thats a common problem and some of you guys may have already solved this.
    Thanks for answers!
    Holger Zimmermann

    DB:2.71:How To Get User Friendly Display Strings For Property Name And Value In Propertygrid (Localized, More Than One Word)? 7f

    Thanks for sharing your answer. I believe others who will meet this kind of question will benefit from your solution.
    Have a nice day. :)Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • RELEVANCY SCORE 2.70

    DB:2.70:Easy Question, I Hope ac



    How do I open specific ports on my 515E version 6.3(3)?

    DB:2.70:Easy Question, I Hope ac


    Ben,

    You don’t specify if the ports you want opening are inbound or outbound. If you want clients connecting from the outside to say port 25 (SMTP) for email, what you’ll need is an outside interface ACL and a static translation rule.

    Ex:

    access-list permit tcp any host eq smtp

    access-group in interface outside

    static (inside,outside) tcp smtp smtp netmask 255.255.255.255 0 0

    By default the pix will allow all outbound connectivity, i.e. higher interface to lower interface.

    But if you want to filter who goes out from your internal network, i.e. say you only wanted specific internal users to access the internet.

    Ex.

    access-list inside permit tcp host any www

    access-list inside deny tcp any any eq www

    access-list inside permit ip any any

    access-group inside in interface inside

    Hope this helps and let me know if you need further assistance. Please rate all post so that it may help others.

    Jay

  • RELEVANCY SCORE 2.70

    DB:2.70:Re: Discussion - Date/Time Pojo Property - String Or Java.Util.Date js


    It's used for everything display, manipultation especially converting date from one timezone to another.Then definitely do not massage Strings everywhere.

    By the way JDK in question is 1.4/1.5The advice applies to all Java versions.

    Do Hibernate and Spring support this joda API?Not out of the box, but Joda-time supports easy conversion back-and-forth with regular JDK's Date.
    However, I don't see how Spring might need to have to "support" Joda-Time classes, do you have a specific question in mind?
    - Stuffing instances of Joda classes as the value of bean properties is probably possible, but probably not very readable in a beans.xml file
    - Using instances of Joda classes in Spring secondary APIs, such as spring-jdbc, requires conversion with JDK Dates

    See the topic I mentioned in reply to PhHein: as you can see there's some controversy around whether the 3rd-party Joda-time library is a better choice, in the long run, than the standard JDK classes (I tend to bend in favor of Joda-time).

    Edited by: jduprez on Dec 8, 2010 1:46 PM

    DB:2.70:Re: Discussion - Date/Time Pojo Property - String Or Java.Util.Date js

    YoungWinston wrote:
    jschell wrote:
    I believe I even reversed that one time as the database didn't have enough precesion with its native format so I used a text type there.Blimey. Which db was that? It'd be good to know because I'd avoid it like the plague.Which database do you know that does? Neither MS SQL Server nor Oracle does.

    Normally it doesn't matter but for that particular app I needed as much precision as possible from Java.

    Even so, I think I might have stored the raw offset in the db in your case; especially if I could give it a type.I believe I had a sorting/query requirement which did not allow that.

  • RELEVANCY SCORE 2.69

    DB:2.69:Using Arguments On A Class Exposed As A Property Of An Activity? f9


    Hi,
    I was trying to have an activity base class, that has a property whose type is a custom class. (Hopefully I get this right, as I tried to simplify and rename classes for this question).
    Let's say the base class looks like this:

    public abstract class BaseActivity : NativeActivity
    {
    CustomClass _myCustomClass;

    public BaseActivity()
    {
    _myCustomClass = new CustomClass();
    }

    public CustomClass MyProperty
    {
    get { return _myCustomClass; }
    set { _myCustomClass = value; }
    }

    public abstract void ExecuteActivity(NativeActivityContext context);

    protected override void Execute(NativeActivityContext context)
    {
    if (MyProperty != null)
    MyProperty.Execute(context, this);
    else
    ExecuteActivity(context);
    }
    }

    DB:2.69:Using Arguments On A Class Exposed As A Property Of An Activity? f9

    Ah, I remembered Tim's great
    blog post and then found this MSDN doc article about
    CacheMetadata.After reviewing Tim's blog post, CacheMetadata seemed like the way to go, but his post didn't demonstrate how to use arguments. That's where the MSDN article helped out, particulary with the call to NativeActivityCacheMetdata.Bind().
    So, I should modify the BaseActivityclass to override the CacheMetadata method, and have this method call a CacheMetadata method on CustomClass. CustomClass's CacheMetadata would look like this:

    internal void CacheMetadata(NativeActivityMetadata metadata)
    {
    RuntimeArgument runtimeArgument = new RuntimeArgument(ActivityException, typeof(Exception), ArgumentDirection.Out);
    metadata.Bind(ActivityException, runtimeArgument);
    metadata.AddArgument(runtimeArgument);
    }

  • RELEVANCY SCORE 2.69

    DB:2.69:Easy Question? mz


    Hello kind forum replier,

    I have written a Java application and want to install it and run it on other pc's, what files do I need to install other than the classes I have written to get it to run?

    Thankyou in advance,

    Nick Hanlon

    nghanlon@hotmail.com

    DB:2.69:Easy Question? mz

    thank you

    here's your 3 doller things (i can't remember what they're called)

  • RELEVANCY SCORE 2.68

    DB:2.68:Simple\Easy Question 3a


    java FX run on web browsers as an applet?

    DB:2.68:Simple\Easy Question 3a

    well i was just interested in fx inside a web browser ,
    i was thinking that it become a pure web
    thank you

  • RELEVANCY SCORE 2.68

    DB:2.68:Moving A Sql Default Constraint To The Datacolumn Defaultvalue Property jd


    Is there an easy way to movea default constraint value defined at the database level to the defaultvalue property of the datacolumn class? If using the information_schema is the only way then what is the purpose of default constraints at the db level if you plan on using the ado classes?

    DB:2.68:Moving A Sql Default Constraint To The Datacolumn Defaultvalue Property jd

    Is there an easy way to movea default constraint value defined at the database level to the defaultvalue property of the datacolumn class? If using the information_schema is the only way then what is the purpose of default constraints at the db level if you plan on using the ado classes?

  • RELEVANCY SCORE 2.68

    DB:2.68:Problem With Build.Xml (Not Compiling) 1z


    Hi
    I am not sure if this is an ANT specific question or a general XML question. DO forgive me for being naive

    I wrote this ant build.xml file for my web applications and I find that it simply refuses to compile any classes. I am sure I am doing something wrong

    -----------------------
    project basedir="." default="PortalMar23"
    target name="PortalMar23"/
    property name="src.dir" value="src"/property
    property name="build.dir" value="${basedir}/build"/property
    property name="build.lib" value="${build.dir}/lib"/property
    property name="dist.dir" value="dist"/property
    property name="classes.dir" value="${build.dir}/classes"/property
    property name="build.etc" value="${src.dir}/etc"/property
    property name="build.resources" value="${src.dir}/resources"/property
    property name="lib.dir" value="lib"/property
    property name="web-inf.dir" value="WEB-INF"/property
    property name="war.name" value="concepts"/property
    property file="../common.properties"/property

    !-- Main Target --


    target name="init"
    mkdir dir="${build.dir}"/mkdir
    mkdir dir="${classes.dir}"/mkdir
    mkdir dir="${dist.dir}"/mkdir
    /target


    target name="compile" depends="init"
    javac classpath="${libs}" compiler="${compiler}" debug="off" deprecation="on" destdir="${classes.dir}" optimize="on" srcdir="${src.dir}"
    include name="org/apache/commons/fileupload/**/*.java"/include
    include name="com/portalbook/portlets/**/*.java"/include
    include name="com/portalbook/portlets/content/**/*.java"/include
    /javac
    /target

    !--
    target depends="init" name="compile"
    javac debug="true" deprecation="true" destdir="${classes.dir}" optimize="false"
    src
    pathelement location="${src.dir}"/pathelement
    /src
    classpath
    fileset dir="${lib.dir}"
    include name="*.jar"
    /include
    /fileset
    /classpath
    /javac
    /target
    --
    target name="buildwar" depends="compile, init"
    war destfile="${dist.dir}/${war.name}.war" webxml="WEB-INF/web.xml"
    classes dir="${classes.dir}"/classes
    lib dir="${lib.dir}"/lib
    webinf dir="${web-inf.dir}"/webinf
    /war
    /target

    !-- create concepts-lib.jar --
    jar jarfile="${build.lib}/concepts-lib.jar"
    fileset dir="${classes.dir}"/fileset
    /jar

    !-- create concepts.war --
    jar jarfile="${build.lib}/concepts.war" manifest="${build.etc}/concepts-war.mf"
    fileset dir="${build.resources}/concepts-war"/fileset
    /jar

    !-- concepts.ear --
    copy todir="${build.resources}/concepts-ear"
    fileset dir="${build.lib}" includes="concepts.war,concepts-lib.jar"
    /fileset
    /copy
    copy todir="${build.resources}/concepts-ear/META-INF"
    fileset dir="${build.resources}/etc" includes="application.xml"
    /fileset
    /copy

    jar jarfile="${build.lib}/concepts.ear"
    fileset dir="${build.resources}/concepts-ear" includes="concepts.war,concepts-lib.jar"
    /fileset
    /jar

    target depends="init, compile, buildwar" name="explode"
    taskdef classname="org.jboss.nukes.common.ant.Explode" classpath="${libs}" name="explode"/taskdef
    explode file="${build.lib}/concepts.ear" name="concepts.ear" todir="${build.lib}/exploded"/explode
    /target

    target name="clean"
    delete dir="${build.dir}"
    /delete
    delete dir="${dist.dir}"
    /delete
    /target

    /project------------------

    Could anybody help me out on this?

    thanks a lot

    DB:2.68:Problem With Build.Xml (Not Compiling) 1z

    Well, it could be because the compile target is a comment..

    Remove the !-- before the compile step and the "--" after it.

    Then, Ant will see the step, and either compile your programs, or give you errors about them.

    Dave Patterson

  • RELEVANCY SCORE 2.67

    DB:2.67:Fpga: Is There A [Easy] Way To See Which Vis/Methods Would Be Compiled Into A Bitfile ? f8



    I am working on a reference design for reusable FPGA-side code – having Host-side objects (by value class instances) talking to their FPGA counterparts also packaged as classes.

    On the Host side, classes (.lvclass) load all their controls and methods into memory. Regular LabVIEW Libraries (.lvlib) only load their nested libraries (.lvlib and .lvclass), which will result in loading controls and methods from all nested classes (and their parent classes), but not controls and VIs from the Library itself and regular nested libraries.

    However, I have no idea which methods/VIs get compiled into a bitfile on FPGA side.

    Question: Is there an easy way to get a list of methods/VIs that would be compiled into a bitfile for a specific Top Level FPGA VI ?







    Solved!
    Go to Solution.

    DB:2.67:Fpga: Is There A [Easy] Way To See Which Vis/Methods Would Be Compiled Into A Bitfile ? f8


    I did not use FPGA-side classes on a real life project before and I don’t know how LabVIEW FPGA Compiler does its magic. I want this list for two reasons:

    Make sure compiler does not include any methods not used by a specific Top Level VI calling other methods of a class
    Have a list of optimization candidate methods/VIs once I start running out of FPGA resources

    LabVIEW FPGA Compiler must already have this info in its internal data structures. I don’t think it should take much effort adding a magic key to LabVIEW.ini and saving such list to a text file once it is enabled …

    Any interest in such a feature in the Community ?

  • RELEVANCY SCORE 2.67

    DB:2.67:Easy Question jx


    Which classes do I need to create a XML file, starting with a variables I have in a class that I have built?

    Thank you

    DB:2.67:Easy Question jx

    check out
    SAX and DOM

    and

    http://www.google.co.uk/search?hl=enq=create+xml+document+in+javameta=

  • RELEVANCY SCORE 2.67

    DB:2.67:Visable Property Node Question f9



    I need to make different controls on my front panel appear and disapper with depending on what is being done is there an easy way to make a lot of different things appear and disappear without creating a property node for each individual one. Its slowing me down a bit during execution and its also making my primary VI huge.







    Solved!
    Go to Solution.

    DB:2.67:Visable Property Node Question f9


    Wow I am really impressed with the amount of feedback I got for this question. Ultimitly I am going to go with creating clusters and the for loop both of which were suggested above;since when all is said and done I have about 10 clusters that I need to make appear and disappear. Thanks for all the help Kudos all around lol.

  • RELEVANCY SCORE 2.66

    DB:2.66:Web Services, Custom Classes And Property Description k1


    Hi all,I have a functional web service that works great. I created custom classes for request and response and the service is consumable, everything is hunky-dory.MY question is on the attributes and properties of my custom classes: The client consuming this web service can access all the objects and their properties, but how can I pass some descriptive information about each field in my custom response and request classes? For example, one of my web methods returns a list of products. Each product is represented in a Product class. One property of the Product class is its Sale Status, which is a one-character code. I want to be able to pass a short description to the client so that when they retrieve this property, they can see some sort of description explaining A = Available, N = No Display, S = Sold Out. I figured I could do this with the extended XML comments (the ones that make Intellisense work in the VS IDE) but that didn't work out. Are there any mechanisms out there I can use to improve the usability and readability of my web service?This is a VB.Net asmx Web Service developed on VS 2005.Thanks,Vince

    DB:2.66:Web Services, Custom Classes And Property Description k1

    Thanks John.You're right: It's not that important after all ;). I'll probably end up building my own document explaining the fields and the nesting of my objects.Thanks for your help.Vince

  • RELEVANCY SCORE 2.66

    DB:2.66:Ejb Classpath Question pm


    Hi,

    I have a burning question regarding EJBs and classpaths.

    Here is my situation:
    - My application uses EJBs, Servlets and JSP pages
    - My EJB remote interfaces and implementation classes extend common,
    abstract base classes
    - My EJB implementation classes use several utility classes, which are
    also used by my servlets.
    - Each EJB is deployed in a separate JAR file

    The question I have is which classes should be included in the EJB JAR
    files.

    I'd like to put just the EJB implementation class in the EJB JAR, and
    put everything else in a common JAR that is placed in my WEB-INF/lib
    folder and shared by the rest of the application. However, if I do
    that, Weblogic won't load the EJBs because it tries to do so before it
    deploys my web app, and hence before it adds the JARs in the
    WEB-INF/lib folder to its classpath.

    I can explicitly add my jar to the Weblogic classpath on the
    commandline (weblogic.class.path property). Now my EJBs load. However,
    my servlets become unable to load any classes from any jar in
    WEB-INF/lib. I read something about it being a bad idea to include a
    jar from WEB-INF/lib in the classpath, so I'm probably seeing that
    problem.

    The third option is to include all the dependent classes in my EJB
    jars themselves, in addition to deploying them in WEB-INF/lib. This
    works, but it bothers me that there are multiple copies of the same
    class files lying around.

    I'm sure I'm not the first developer who's written an EJB that shares
    classes with a servlet or JSP page. What's the proper way to do this?

    Thanks.

    DB:2.66:Ejb Classpath Question pm

    Hi,

    I have a burning question regarding EJBs and classpaths.

    Here is my situation:
    - My application uses EJBs, Servlets and JSP pages
    - My EJB remote interfaces and implementation classes extend common,
    abstract base classes
    - My EJB implementation classes use several utility classes, which are
    also used by my servlets.
    - Each EJB is deployed in a separate JAR file

    The question I have is which classes should be included in the EJB JAR
    files.

    I'd like to put just the EJB implementation class in the EJB JAR, and
    put everything else in a common JAR that is placed in my WEB-INF/lib
    folder and shared by the rest of the application. However, if I do
    that, Weblogic won't load the EJBs because it tries to do so before it
    deploys my web app, and hence before it adds the JARs in the
    WEB-INF/lib folder to its classpath.

    I can explicitly add my jar to the Weblogic classpath on the
    commandline (weblogic.class.path property). Now my EJBs load. However,
    my servlets become unable to load any classes from any jar in
    WEB-INF/lib. I read something about it being a bad idea to include a
    jar from WEB-INF/lib in the classpath, so I'm probably seeing that
    problem.

    The third option is to include all the dependent classes in my EJB
    jars themselves, in addition to deploying them in WEB-INF/lib. This
    works, but it bothers me that there are multiple copies of the same
    class files lying around.

    I'm sure I'm not the first developer who's written an EJB that shares
    classes with a servlet or JSP page. What's the proper way to do this?

    Thanks.

  • RELEVANCY SCORE 2.66

    DB:2.66:Problem With Hibernate Configuration 3f



    hi all, I am new on jboss forum.we are using jbosscache-core 2.1.1.GA with hibernate 3.3.1.GA.we would create a distributed transactional cache with MultiplexedJBossCacheRegionFactory. I have read the tutorial of hibernate and the jboss tutorial about integration of them, and I have produced this hibernate.cfg.xml

    property name="hibernate.connection.driver_class"org.apache.derby.jdbc.EmbeddedDriver/property
    property name="hibernate.connection.url"jdbc:derby:target/test-classes/db-tree-cache;create=true/property
    property name="hibernate.connection.pool_size"10/property
    property name="show_sql"true/property
    property name="dialect"org.hibernate.dialect.DerbyDialect/property
    property name="hibernate.hbm2ddl.auto"update/property

    !-- configuration della cache jboss 2 --
    property name="hibernate.cache.use_second_level_cache"true/property
    property name="hibernate.cache.use_query_cache"true/property

    !-- factory config
    property name="hibernate.cache.region.jbc2.configs"org/hibernate/cache/jbc2/builder/jbc2-configs.xml/property
    property name="hibernate.cache.region.jbc2.cfg.multiplexer.stacks"org/hibernate/cache/jbc2/builder/jgroups-stacks.xml/property
    property name="hibernate.cache.provider_class"org.hibernate.cache.jbc2.JBossCacheRegionFactory/property
    property name="hibernate.cache.region.jbc2.cfg.collection"optimistic-entity/property
    --

    property name="hibernate.cache.region.factory_class"org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory/property
    property name="hibernate.cache.region.jbc2.cfg.entity"optimistic-entity/property

    property name="hibernate.cache.region.jbc2.cfg.ts"timestamps-cache/property
    property name="hibernate.cache.region.jbc2.cfg.query"local-query/property
    property name="hibernate.cache.region_prefix"claudio-laptop/property

    property name="hibernate.transaction.manager_lookup_class"org.hibernate.transaction.JBossTransactionManagerLookup/property
    property name="hibernate.transaction.factory_class"org.hibernate.transaction.JTATransactionFactory/property
    property name="hibernate.current_session_context_class"jta/property
    property name="hibernate.cache.region.jbc2.query.localonly"true/property

    //mapping etcetc

    DB:2.66:Problem With Hibernate Configuration 3f


    hi all, I am new on jboss forum.we are using jbosscache-core 2.1.1.GA with hibernate 3.3.1.GA.we would create a distributed transactional cache with MultiplexedJBossCacheRegionFactory. I have read the tutorial of hibernate and the jboss tutorial about integration of them, and I have produced this hibernate.cfg.xml

    property name="hibernate.connection.driver_class"org.apache.derby.jdbc.EmbeddedDriver/property
    property name="hibernate.connection.url"jdbc:derby:target/test-classes/db-tree-cache;create=true/property
    property name="hibernate.connection.pool_size"10/property
    property name="show_sql"true/property
    property name="dialect"org.hibernate.dialect.DerbyDialect/property
    property name="hibernate.hbm2ddl.auto"update/property

    !-- configuration della cache jboss 2 --
    property name="hibernate.cache.use_second_level_cache"true/property
    property name="hibernate.cache.use_query_cache"true/property

    !-- factory config
    property name="hibernate.cache.region.jbc2.configs"org/hibernate/cache/jbc2/builder/jbc2-configs.xml/property
    property name="hibernate.cache.region.jbc2.cfg.multiplexer.stacks"org/hibernate/cache/jbc2/builder/jgroups-stacks.xml/property
    property name="hibernate.cache.provider_class"org.hibernate.cache.jbc2.JBossCacheRegionFactory/property
    property name="hibernate.cache.region.jbc2.cfg.collection"optimistic-entity/property
    --

    property name="hibernate.cache.region.factory_class"org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory/property
    property name="hibernate.cache.region.jbc2.cfg.entity"optimistic-entity/property

    property name="hibernate.cache.region.jbc2.cfg.ts"timestamps-cache/property
    property name="hibernate.cache.region.jbc2.cfg.query"local-query/property
    property name="hibernate.cache.region_prefix"claudio-laptop/property

    property name="hibernate.transaction.manager_lookup_class"org.hibernate.transaction.JBossTransactionManagerLookup/property
    property name="hibernate.transaction.factory_class"org.hibernate.transaction.JTATransactionFactory/property
    property name="hibernate.current_session_context_class"jta/property
    property name="hibernate.cache.region.jbc2.query.localonly"true/property

    //mapping etcetc

  • RELEVANCY SCORE 2.66

    DB:2.66:Easy Question. 1d


    I looked at help videos (on HelpFlash Help)I think he said -you can add multiple values :to a property in Flash Video cue pointswith or without Actionscript.doesn't matter,can you ?Dave

    DB:2.66:Easy Question. 1d

    yes. how you do that depends on whether you do it in flash and whether you're using as2 or as3.

  • RELEVANCY SCORE 2.66

    DB:2.66:Jar File As Rmi Codebase xd


    Please tell me I'm missing something:

    I have an RMI server that works fine. All I want to do now is package it in a jar file...Sounded easy enough when I got started.

    According to the RMI tutorial, the value of the codebase property can refer to
    1. The URL of a directory in which the classes are organized in package-named sub-directories.
    OR
    2. The URL of a JAR file in which the classes are organized in package-named directories.
    OR
    3. A space-delimited string containing multiple instances of JAR files and/or directories that meet the criteria above.

    Setting the codebase property on the commend line like this:
    -Djava.rmi.server.codebase=file:/my_dir/my_jar_file.jar
    gives an UnmarshalException with a nested ClassNotFoundException indicating that my Stub file is missing.
    However, if I unpack the jar to the directory my_dir/classes and use
    -Djava.rmi.server.codebase=file:/my_dir/classes/
    then everything works fine... so I know there are no files missing from the jar file

    Any ideas?

    Thanks in advance,
    Matt.

    DB:2.66:Jar File As Rmi Codebase xd

    jquattro, thanks for the reply. Only problem is that I'm adding to a pre-existing jar file rather than creating a new one, so I don't want to change it other than adding the extra classes.

    I found that it worked fine on a Windows box, so I tried a different jdk on unix, and found that it works fine if I use the jdk1.3 RMI registry - so it appears it might have been a bug in jdk1.2 on Unix.

  • RELEVANCY SCORE 2.65

    DB:2.65:Generic Interfaces Used As Properties In Abstract Classes Where Derived Classes Implement The Specific Interface 3k


    I haven't found an answer to this, so I will pose the question...
    Assume that I have declared a generic interface such as this.
    interface IStuffT
    {
    void DoStuff(T item);
    T GetStuff();
    }
    Now, I declareone or moreclasses that implement the interface using classes called SomeStuff and SomeOtherStuff like this:
    public class MyStuff: IStuffSomeStuff
    {
    void DoStuff(SomeStuff item) { /*body of method*/ }
    SomeStuff GetStuff() { /*body of method*/ }
    }
    public class MyStuff2: IStuffSomeOtherStuff
    {
    void DoStuff(SomeOtherStuff item) { /*body of method*/ }
    SomeOtherStuff GetStuff() { /*body of method*/ }
    }
    So far, no problems. All of the above compiles with ease. Now comes the tricky part, that I don't know how to handle. I have another class, an abstract class, that contains a property. I want that property to be of type interface IStuff. I want the derived
    classes to implement the typed interfaces IStuffSomeStuff and IStuffSomeOtherStuff similar to the following.
    public abstract class MyParentClass
    {
    public abstract IStuffT myProperty;
    }
    public class MyDerivedClass1:MyParentClass
    {
    public override IStuffSomeStuff myProperty { get; set; }
    }
    public class MyDerivedClass2:MyParentClass
    {
    public overrideIStuffSomeOtherStuff myProperty { get; set; }
    }
    In the property defined above, I want to pass in an instance of the class Mystuff or MyStuff2, depending on the concrete implementation. The compiler doesn't like the abstract class, it says there is no definition of T. So, is there a way for me to acomplish
    what I state? Maybe there is a different way? Thoughts would be great.
    Thanks.

    DB:2.65:Generic Interfaces Used As Properties In Abstract Classes Where Derived Classes Implement The Specific Interface 3k

    I think you're trying to combine too much into a single class. I also think you might be confusing inheritance with generics. The goal isn't to create interfaces and types for all possible combinations. Without a specific example it is
    hard to say the best approach to solving a problem but you can use the existing framework as a guideline. You can google for the various guidelines on interfaces vs classes, composition vs aggregation and other topics. These are core OOP topics
    that are beyond the scope of the fourms.
    If you want to identify some set of functionality but you don't really care about how it is implemented then an interface is appropriate (ie. IValidatableObject). If the functionality requires you to be aware of type information of some sort then a
    generic interface is appropriate. An easy way to identify when a generic interface is appropriate is if you find that you need to pass or return some data from the interface and the only type that seems to fit all cases is object then it is probably
    a candidate for a generic interface (ie. IEnumerableT).
    Abstract classes are used for 2 basic purposes. The most common case is to provide a base implementation of the core functionality of an interface. This simply makes it easier to create interface implementations. If the interface is generic
    then so is the abstract type. Not all interfaces need an abstract class. If the abstract class can provide no real base implementation of any of the functionality then the abstract class doesn't really serve a useful purpose. It is important
    to note that the use of the abstract class should never be mandatory otherwise you're really coding to a class.
    When you need to compose things you should do so by reusing the existing interfaces. This is generally done by creating a class that accepts the parts to be composed as parameters. The class is nothing more than an orchestrator for the composed parts
    to interact. Such a class may be generic if it is composed of generics but you will find that generic constraints eliminate some of these issues.

    A good example is an MVC controller. The controller generally needs access to the data layer and business services. Rather than creating a hierarchy of types simple composition would be easier. A controller would likely just accept a business
    service interface as a constructor parameter. The business service implementation might then require a repository interface as a parameter. The repository implementation might require the database. But the controller only cares about the
    service interface it got. How that interface is implemented doesn't matter. Hence the controller has a single parameter.
    Personally I'd say one or two generic parameters is OK but beyond that you're likely doing something wrong. There are exceptions (ie. tuples) but they are rare. All this is just my personal experience though. I'd start simple with basic
    interfaces and composition and work up toward generics and abstract classes only if they provide useful features. For example I don't bother creating an abstract class for an interface until I implement an interact at least twice and find that I'm writing
    the same code in both places. At that point a base implementation would reduce the code I'm writing.

  • RELEVANCY SCORE 2.65

    DB:2.65:Displayattribute Information Generated As Properties For Easy Binding 3p


    [edited 2009-09-10] Updated the code description examples
    [edited 2009-09-11] Updated the code description examples; fixed a bug wrt computed properties.
    [edited 2009-09-18] Update code description examples; fixed more bugs. Moved the code to CodeProject

    [edited 2009-09-21] Removed from CodeProject and moved to SourceForge.
    The current code is available at http://sourceforge.net/projects/goodiesforria
    [/edited]

    Hi,

    The following code processor for RIA Services was written in order to evaluate if
    some goodies can be generated and actually be used on client side with the RIA Services.

    The example-code consists of a server and client part.
    You'll find the server-side RiaCodeProcessor in the folder RiaCodeProcessor.
    The client-side infrastructure resides in the folder Ria.
    All other code is just an example.

    The processor does the following:

    1) Generates accessor properties for easy access (and binding) to values of DisplayAttribute.

    Example:

    !-- Bind to the Display attribute's ShortName value:
    This assumes an Entity being the context object. --
    TextBlock
    Text={Binding __ED.Email.DisplayShortName, Mode=OneTime} /

    Use the introduced RiaClientEntity attribute on the domain class to enable this behaviour.

    The name of the accessor property to the descriptor (i.e. the __ED in the example above) is
    setable via the RiaCodeProcessor attribute.

    2) Generates an adapter class which acts a ResourceType for DisplayAttribute in order
    to plug in an arbitrary resource string provider (e.g. a database with resource strings).
    Use the RiaClientEntity attribute on the domain class to enable this behaviour.

    Then you can plug in your provider on the client side by setting the static Provider property
    on the genereated adapter class.

    Example:

    // Client initialization code (e.g. in App.xaml.cs).
    EmployeeDisplayProviderAdapter.Provider = new MyDisplayProvider();
    Where MyDisplayProvider implements the introduced IStringResourceProvider interface.

    TODO: I need to change that to GetProvider() and SetProvider(IStringResourceProvider provider),
    since the static property Provider might clash with an equally named generated property.

    2) Allows to generate notification events for dependent (computed) properties.
    This is done using the introduced DependentOnProperty attribute.

    Example:

    // This is a shared class.
    public partial class Employee
    {
    // Whenever LastName or FirstName changes,
    // a PropertyChanged event will be fired for FullName.
    public string FullName
    {
    get { return LastName , FirstName; }
    }
    }

    // This is a metadata buddy class.
    internal sealed class EmployeeMetadata
    {
    [DependentOnProperty(PropertyName = FirstName)]
    [DependentOnProperty(PropertyName = LastName)]
    public string FullName;
    }

    Note that it is irrelevant whether you put the DependentOnProperty attribute in the
    shared class or in the metadata buddy class (although, if duplicate, the attributes
    in shared classes will always override attributes in metadata buddy classes).

    You can use this attribute also in partial entity classes residing *solely* on the client
    side (i.e. not touched by the code generation).

    3) Adjusts metadata buddy class inheritance behaviour for DisplayAttribute.

    (see http://forums.silverlight.net/forums/p/123501/285081.aspx)

    Current resolution of conflicting attributes:

    1) Attributes in shared partial domain classes have the highest priority.
    2) Attributes in metadata buddy classes have a higher priority
    than attributes in domain classes.
    3) Attributes in derived domain classes have a higher priority
    than attributes in inherited domain classes.

    For each overriden attribute a remark is generated on the entity
    in order to provide some transparency of the process

    All previously generated DisplayAttribute(s) are discarded before this adjustment is applied.

    Use the introduced RiaCodeProcessor attribute on the domain service class to switch this behaviour on.

    TODO: Note that this does not honour any DisplayAttribute(s) provided via
    MetadataProviderAttribute - TypeDescriptionProvider (e.g. the XmlMetadataProvider);
    the mechanism works solely on the domain classes and MetadataType(s).

    This was built in order to have minimal impact on the domain class code.
    When moving to T4 Templates only the generator-logic needs to be ported.

    There are still some code snippets in the processor; would be great if
    anyone had time to convert those to CodeDom and post it here.

    Regards,
    Kasimier

    DB:2.65:Displayattribute Information Generated As Properties For Easy Binding 3p

    Oooookay, I have finally found a home for the tiny piece of RiaCodeProcessor code:
    http://sourceforge.net/projects/goodiesforria

    Regards,
    Kasimier

  • RELEVANCY SCORE 2.65

    DB:2.65:Typed Dataset Or Custom Classes d8


    Hey friends,
    I am a VB developer, soon I am going to start a new project. It will be a client application, I will use a SQL server database.
    I am used to use custom classes, I create my onw variables properties, events and methods.
    I amaware of the Typed Data Set and thinking about using it onmy new project.The problem is that I have never used it, Ido not know the minuses and plusses of the Typeddataset. Now, my boss and me on the desicion phase, we want to implement the most efficient and easy maintainable one. If you ask me , I'm quite happy with custom classes :))
    My opinion is that the custom class is better for performance purposses, because I createproperties and methods,only which I need. With the typed dataset there will be many property which I won't need,
    Typed Dataset has a very big plus, it creates everything automaticly,beside that I can create my own tool to create my custom classes, DAL and stored procedures.
    Is there somebody can give me some idea on that?
    When compared the custom classes and typed dataset, which one is better and why ?
    Probably I will have to change my database during the project, maybe adding or removing fields... Therefore I also will have to change my classes, DAL and the stored procedures. It is very irretating to do such things in the midle of the project but it is how it goes :) Could you please consider this issue when aswering my question. Which one is easy to maintain?
    Please give me some good reasons to keep going with custom classes ;)
    Thanks a lot...
    Regards
    Ayhan

    DB:2.65:Typed Dataset Or Custom Classes d8

     James Kovacs wrote:RE: Doing bothIf you mean customize the generated code, I would strongly recommend against it. Modifying generated code is dangerous because you've got no way to regenerate it. You can also run into problems if your tool (such as VS) decides to regenerate it for you.If you mean wrap your own custom code around a typed dataset, that is possible and I've seen it done. You basically use the typed dataset as a dumb data holder. It can get complicated when you have references between objects, especially when the objects do not fit nicely into a strictly relational model. So wrapping typed datasets is not my first choice, but it is possible and preferable to modifying generated code.

  • RELEVANCY SCORE 2.65

    DB:2.65:Java.Version Syntax? fp


    Duh! - you have thought this would have been an easy question to which to find the answer, wouldn't you.

    I think I want to know where to find the definition of the syntax of the value of the "java.version" property.

    Alternatively, I've got an application that needs 1.4.1 or later - it won't run on 1.4.0 because of some of the disastrous networking bugs - so how do I find out whether it's running on "1.4.1 or later"?

    DB:2.65:Java.Version Syntax? fp

    you're dead right - it is easy; google, about two seconds of work yielded this:

    http://java.sun.com/j2se/versioning_naming.html

  • RELEVANCY SCORE 2.65

    DB:2.65:Deleting An Added Server Prop From Dictionary And Servers x7



    Running BL 7.6 on Solaris 10.

    I added a Server Property to the Property Dictionary and inturn

    used the property . Now I no longer want to use the property and want to take the property out of

    the dictionary. When I go to the Property Dictionary to do that, it complains that the "Property" is being used

    so would I like to "deprecate" it.

    Is there an easy way to force the removal of the Property from the Property Dictionary

    AND from all the servers and the same time?

    Thanks,

    Bill

    DB:2.65:Deleting An Added Server Prop From Dictionary And Servers x7


    It is not only a matter of if it is currently in use on servers. It could also be referenced in job runs, etc. All you can do is deprecate, in this case.

  • RELEVANCY SCORE 2.65

    DB:2.65:Getting Through My Classes Fairly Easy sm



    Going through the classes fairly easy, waiting on my math book to get started on it, can't wait. Can we get our books sent sooner, instead of waiting till after the next to last test? Because I have to wait almost two weeks before I get my next books.

    DB:2.65:Getting Through My Classes Fairly Easy sm


    When you complete half of the lesson exams in a particular subject, then the next subject is automatically triggered by the computer for shipment so that it is in the mail while you are completing the last half of the subject. If you get finished sooner, then yes, you will be waiting for the next textbook.

    Also, getting transfer credits effects shipments. If you have a transfer credit, then it is best to telephone Student Care to make sure that next subject is being shipped out.

    Unfortunately, there will always be some logistical setbacks. This is due to the nature of how things work in distance learning. If students pay for everything up front (like in brick and mortar schools where students pay for everything before they even set foot into a classroom), all of the books would be shipped. However, even if this were the case, students would still be waiting initially for the books to arrive before taking the first class.

  • RELEVANCY SCORE 2.64

    DB:2.64:Model Classes In Wpf Mvvm Pattern k7


    Hi,

    I am a bit confused after reading similar threads here in addition to Microsoft Prism guidelines on MVVM section. I do understand the interaction between View and ViewModel classes, but my understanding on the connection between VewModel and Model
    classes are a bit blurred.

    For instance in Prism's MVVM section it states this:
    Typically, the model implements the facilities that make it easy to bind to the view. This usually means it supports property and collection changed notification through the INotifyPropertyChanged and INotifyCollectionChanged interfaces.

    But I thought those Interfaces implemented by ViewModel classes. Also, when I created Data Model through EF in VS it automatically created EF entity classes. I presume these are my model classes to use, but the comments inside say that I shouldn't
    change those generated classes. How then can I implement the above Interfaces ?

    Thank you

    DB:2.64:Model Classes In Wpf Mvvm Pattern k7

    Thank you Reed - I have now managed to create a basic MVVM Light project with some generated entity classes as you suggested.

    Thanks for your help again.

  • RELEVANCY SCORE 2.64

    DB:2.64:Approval Workflow Engine (Awe) For Hcm 9.0" And Have A Question Concerning f1


    I have read the paper "Approval Workflow Engine (AWE) for HCM 9.0" and have a question concerning the Launch Manager. It states that there are two ways of telling the AWE which approval process definition to initiate. The first way is to explicitly pass the Approval Process Definition ID to the API by setting the definition property on the LaunchManager class. The question I have is how do you access these classes in Launch Manager? I fully understand the code construct listed in this document but I need to know specifically where in PSFT could I access these classes and make the changes I need.

    Example 1- Explicitly set the Approval Process Definition ID:

    MyLaunchManager = Create LaunchManager (AprPrcsId, HeaderRecObject, Oprid)

    MyLaunchManager.Definition = MyAprDefnId;

    MyLauchManager.DoSubmit()

    DB:2.64:Approval Workflow Engine (Awe) For Hcm 9.0" And Have A Question Concerning f1

    If you want to explicitly set the Definition ID on the LaunchManager, then you do that for the LaunchManager instance. This is the actual instance, not the LaunchManager class definition. Components usually create instances of the LaunchManager in Component PostBuild and/or Component SavePostChange. The actual location of the code you need to update will vary by component. If you PeopleCode trace your component, then search for Create PTAF_CORE:LaunchManager. If this is an HRMS app, then search for getLaunchManager as well. Some HRMS components use HMAF_AWE:ApprovalsFactory instead of PTAF_CORE.

    The alternative is to use Definition Criteria when configuring the workflow in Set Up xxx Common Definitions Approvals Setup Process Definitions.

  • RELEVANCY SCORE 2.64

    DB:2.64:To Wrap Or Not To Wrap? And A Bonus Question! 8p


    I am using sync framework 4.0 and with it i get a bunch of generated proxy classes that is used by my local component to communicate andpersistthat data, the question is, since those classes implement INotifyPropertyChange and are partial classes (so it
    can be extended with validation or whatever) they make perfect classes to use in binding, can i bind to using this classes or i have to create a wrapperclass to be on good terms with the best practices? (at first glance for me the wrapper classappearto
    give more separation but at the cost of having to recreate all the model having to do copy the data from proxy to wrapper and back when using the repository).
    Also I was thinking that i could bind the search result list box selected Itemto a ActiveCustomer Property on my Search viewmodel, but this ActiveCustomer property would be exposed as an public property of my model that thesearchviewmodel is holding,
    something like model.activeCustomer property on my viewmodel, and on the Customer details viewmodel i bind to that same propertyhencehavingthe effect i want (you select a different customer on thesearch, you see its details) this looks to me as a good
    solution, is itreallythat bad to have that dependency? is this OK?

    DB:2.64:To Wrap Or Not To Wrap? And A Bonus Question! 8p

    I would not wrap, just for the sake of separation, partial classes are ment for this purpose. I think you should go with partial class and no wrap. Concequences will be that you will expose everything which might not be required from the proxy classes, so
    the only benefit that I can see with wrapper class is that you have control over what can be accessed(very important).
    About your second question, I'm not sure whether I got you correctly or not, but here is the situation. You have your search view and Customer Details view on same screen, when user selectany customer from search list you need to show details in the Customer
    details view. If said is the case then you want to communicate between 2 viewmodels. There are many different solution to this problem and you will easily get many

    references for the same. The thing is you need a 3rd class to act as comunicator between 2 viewmodels. You can create generic solution or can do the way you are doing. But the thing to remember is, if you want to do this kind of communication a lot then
    you better have some generic solution which don't harm your code design pattern.
    (If you still have problem then let me know otherwise mark reply as answer)

  • RELEVANCY SCORE 2.64

    DB:2.64:Method Overrides Cannot Add Preconditions. fm


    Hi I've read the thread on the derived classes and have a question I have an abstract class that hasn't some property that I've in the derived class. I want to use Require contract on that property. How do you think to implement this? Examle:
    public abstract class A
    {
    public abstract void MethodA
    }

    public class B : A
    {
    public DatTime IsA{get;set;}
    public override void MethodA()
    {
    Contract.Require(IsA!=null);
    }
    }

    DB:2.64:Method Overrides Cannot Add Preconditions. fm

    To get the dummy implementations, just right-click on the abstract class/interface in the contract class and have the editor implement all the methods. Then you only need to modify the ones where you want to add contracts. It's pretty easy.Cheers,

    -MaF (Manuel Fahndrich)

  • RELEVANCY SCORE 2.64

    DB:2.64:Object Library, Property Class And Visual Attributes Copy sz


    Hi,

    I am working on Oracle forms 10g with database 10g. I am creating couple of new forms-my requirement is these new forms should look like the way older forms look means visual attributes,property classes.
    They are using Object Library which has all visual attributes and property classes defined .

    My question is --I am creating each visual attribute and property class as per my need (same as in older forms).
    Is there any way I can copy all visual attributes and property classes from Object library instead of creating all of them manually one by one.

    Thanks in advance

    Sandy

    DB:2.64:Object Library, Property Class And Visual Attributes Copy sz

    Object Groups are what you want. Put everything in one object group and then that into the olb. Then just drag the object group from the olb into any Form and everything else follows.

    Steve

  • RELEVANCY SCORE 2.63

    DB:2.63:How To Check Interface Property 73


    Hello,I'm trying to figure out how to access a boolean Property on an Interface that is implemented by a number of different classes, each of which sets this property to true or false. Here is what the code looks like for one of these classes:

    public class Class1 : IClassData

    {

    private bool checkCondition = true;

    public bool CheckCondition

    {

    get { return checkCondition; } // read-only property

    }

    }

    DB:2.63:How To Check Interface Property 73

    Thanks, sorry... I thought I posted it as a question, I was wondering why the choice to mark it as an answer didn't show up...I appreciate the timely response.

  • RELEVANCY SCORE 2.63

    DB:2.63:Easy To Answer Question 13


    Here's an easy to answer question: can I run two instances of Audition - the same software on two different machines?

    DB:2.63:Easy To Answer Question 13


    Adobe's licensing contract allows for two activations on separate machines with the caveat that they not be used simultaneously. For example, you could install the application on your work laptop and your desktop at home and as long as both aren't in use at the same time, there would be no license violation.

  • RELEVANCY SCORE 2.63

    DB:2.63:Regular Expression Question z9


    I have a String which I want to validate.

    Lets make it easy so you will see my problem.

    Any String is valid if it contains exactly one character "=".

    This is valid: property=value

    This is NOT valid: =property, property= or property==value

    What would be my pattern?

    DB:2.63:Regular Expression Question z9

    Actually, your expression returns true for property= which you indicated as being invalid. My solution was:

    string.matches("^\\s*[^=\\s]+=[^=\\s]+$");or , if the value can contain whitespace and whitespace can suround the =:

    string.matches("^\\s*[^=\\s]+\\s*=[^=]+$");Graeme

  • RELEVANCY SCORE 2.63

    DB:2.63:Domainrelationship Domain Properties 3j


    Hello,

    i've been designing a Domain Model and designer based on the minimal language
    project template. All is going well, i've implemented a construction that keeps
    source in sync with a parent diagram. It's really cool (i am really proud of it) and matches the way the default Form and Control designer work.

    At the moment i am experiencing a bit of a setback because i need to assign a
    value to a link/connection. For example: I've got two domain classes C1 and C2
    that are represented by shape S1 and S2. Assigning properties and interaction
    between the shapes, classes and templates is no problem. However, there is also
    a reference domain relationship that defines that the classes can reference to
    0..n more classes. This relation is defined in the designer as a connection
    between two shapes.
    To iterate the shapes that are referenced i defined it as a .Target collection
    in the domain model. This works really well, and it is super easy to foreach
    all target classes. The problem i am having is how to access domain properties
    assigned to the domain relation. It has a property that is accessible from
    the connection shape, but i do not know where to access it from within my
    templates...

    Instead of processing my targets in the templates by:

    foreach(Class targetClass in this.Targets)
    {
        targetClass.Name
    }

    i am in search of something like:

    foreach(Connection connection in this.Relations)
    {
        connection.KinkyDomainProperty
        connection.TargetClass        
       // Or some other way to relate the domain property to a reference
    target
    }

    Any suggestions on where to search?

    Thanks in advance,

    Peter Vrenken

    DB:2.63:Domainrelationship Domain Properties 3j

    Ahhhh....
     
    static methods... So that's where they have been hiding...
    Gokhan, I've tried your solution and it works like a charm.
    Thank you both for the time and effort.
    Peter Vrenken.
     

  • RELEVANCY SCORE 2.63

    DB:2.63:Code First Poco Validation Question 7j


    I'm still confused about what validation method(s) to use with my POCO classes (in a DDD approach).
    1 - I can use Data Annotations on individual properties
    2 - I can implement the IValidatableObject interface onmy POCOclasses - can this also be used with an individual property?
    3 - Refering to e.g. Julia Lerman book on Entity Framework I can use in every POCO class a Validate() method and in the context classes ValidateBeforeSave() methods that calls the Validate() methods.
    Is the best practice to use the combination of methods 1 and 2 or is it method 3?
    Thanks.

    DB:2.63:Code First Poco Validation Question 7j

    There are several reasons why lazy loading is disabled when validating entities. The first and most important is performance - having lazy loading turned on during validation could mean not only bringing the whole database to the client but also doing
    it in a very ineffective way by sending a lot of queries to the database. After bringing new entities to the context should these be validated as well - if yes, again we would bring even moreentities (again lazy loading) and would have to validate these.
    If not, references to the original entities would have to be stored somewhere to know if they should be validated or not. In both cases you are looking at using more memory and doing more work. Another reason for disabling lazy loading is single responsibility
    priniciple - validation is supposed to validate entities and not doing bunch of other things. At the moment it's very clear -enities tracked (and - by default - not marked as deleted)are validated and nothing else. If lazy loading was turned on
    it's hard to tell what will be validated and what will not. Finally, if the entity is in the database it must have been valid when being saved. Since you don't have it in the context there are no changes to this entity so does it need to be validated at all?
    I assume that scenario here is a bit more complicated and you want to cross check some data from an entity that has changed with an entity that is in the database. You don't need to have lazy loading for this. You can either load the entities before saving
    changes or you can try loading them manually when you need them (I have not tried it though so no guarantees).

  • RELEVANCY SCORE 2.63

    DB:2.63:Override Property Getter For Nulls 39


    I am using the DbContext generator with ef an exisiting sql server ce database (eventually I would like the same code to be runtime swichablerun againstsql server).
    I would like to have the getter methodss on the nullable string properties to return an emty string when the db contains null.It seems easy enough to write a getter that tests for null and returns a blank if null.If I change the code in
    the generated class, it will be overridden if I regenerate the classes. How can I do this?

    DB:2.63:Override Property Getter For Nulls 39

    Seehttp://msdn.microsoft.com/en-us/library/dd456821.aspx
    You can change the template that's used to generate the code.

    Jenda----------------------------------
    http://jendaperl.blogspot.com
    A Perl developer in the world of C#

  • RELEVANCY SCORE 2.63

    DB:2.63:Custom Datatemplate And Standard Properties 1m


    I am using a TreeView as an example here because the TreeView does not allow a developer to directly get a TreeViewItem based on its data. E.g. if you have a dataclass called MyData and created an ObservableCollectionMyData which you set as ItemsSource
    on the TreeView then whenever something is selected or you in other ways are handling your data then you connect get the TreeViewItem.
    The mentioned example is not the question.
    TreeView.ItemTemplate
    HierarchicalDataTemplate ItemsSource={Binding Path=SubItems}
    Whatever you like in your Tree/
    /HierarchicalDataTemplate
    /TreeView.ItemTemplate

    TreeView.ItemContainerStyle
    Style TargetType={x:Type TreeViewItem}
    Setter Property=IsExpanded Value={Binding IsExpanded, Mode=TwoWay} /
    /Style
    /TreeView.ItemContainerStyle
    In the code seen above a TreeView has its ItemTemplate setwhich results inMyDatanow being the returned value in e.g. SelectedItem.
    Furthermore IsExpanded is bound to an IsExpanded property in MyData which allows a developer to set IsExpanded on the TreeViewItem through an instance of MyData.
    Is this really the only approach when dealing with controls that have their ItemsSource set?
    Do I have to implement every single property available in an TreeViewItem in the ItemContainerStyleif I want to control them from my data classes?
    There must be something basic I am missing because it seams odd that whenever you use ItemsSource with some custom dataclass of your own then you lose your easy access to editing the basicbehaviour of your control and in some cases also the look of
    the control.

    DB:2.63:Custom Datatemplate And Standard Properties 1m

    Yes I knew the ItemContainerGenerator.ContainerFromItemmethod but often I found myself wondering whether it could really be true that it was so complicated to handle the presentation when ItemsSource was set.
    But now I know so I can stop wondering :-)

  • RELEVANCY SCORE 2.63

    DB:2.63:Ethical Question fp


    I worked
    in computational molecular biology lab a couple years ago and I helped
    develop a C++ class library for analyzing protein structure. In that
    library, we had lots of really convenient C++ classes like for
    matrices, arrays, vectors, and things like that. I didn't write myself
    any of these convenient C++ classes, I just used them. So, now I am no
    longer in the lab but I have the entire class library on my laptop. I
    have some CS projects for school that I want to use some of those
    convenient classes in. So, my question is: do I need to get
    the permission of my lab director to use these classes or can I just go
    ahead and use them and of course put in a reference to where they came
    from? The professor that assigned the projects already told me it was a
    okay to use wrapper classes that I didn't write myself as long as I
    cited their source. So, the only problem is that I am not sure whether
    I would be stealing intellectual property or something. I will probably
    e-mail the director of my lab and ask him directly but I want to know
    whether he has even like a right to say no.In any case, are
    there any such classes freely available on the internet for which there
    would definitely not be any intellectual property issues with my using
    them in a project?

    DB:2.63:Ethical Question fp

    Well I only asked because he said that they gave permission to do what you wish with them for any purpose.

  • RELEVANCY SCORE 2.63

    DB:2.63:Super Easy Tomcat 4.0 Question 79


    I have a bunch of JSPs at d:\rhhshn\ (Tomcat is on the same drive). How can I get them to compile and run? It was like two lines of code in Tomcat 3.2 but 4.0 is literally several dozen and cut-and-paste didn't work.

    My classpath is already set for the classes that the JSPs will need and Tomcat is properly serving its own JSP examples.

    DB:2.63:Super Easy Tomcat 4.0 Question 79

    frustrated sigh Well does anybody know how to do it in Tomcat 3.2?

  • RELEVANCY SCORE 2.63

    DB:2.63:Classes fa


    I'll appreciate further explanations on creating classes.1. What exactly is a ReadOnly property and WriteOnly Property? What is the difference. ( I've seen the explanations in MSDN but need further breakdown on it)2. In the Persons class tutorial in MSDN Help, I noticed that Age was treated as a Property even thought it was calculated:

    ReadOnly Property Age() As String  

        Get  

            Age = My.Computer.Clock.LocalTime.Year - birthYearValue  

        End Get  

    End Property  

     

     

    DB:2.63:Classes fa

    Thanks to everyone. I'll take sometime to digest ur answers. It appears that you've taken things above my level: I'm just a beginning beginner.Thanks all. I'll go thro ur answers.Thanks a bunch.Only performance counts!

  • RELEVANCY SCORE 2.62

    DB:2.62:How To Bind To A Collection That Contains A Property That Is Another Collection 93


     
    I have a generic list of classes.  One property on the class is another generic list of classes.  Is it possible to get the value of the class in the property collection to be displayed in a datagrid when I bind my datagrid to this list of classes?
     

    DB:2.62:How To Bind To A Collection That Contains A Property That Is Another Collection 93

     
    Thanks for your help!  Sorry I didn't respond sooner.  Basically my scenario would look like the following:
     
    Imports System.Collections.Generic
     
    Public Class Form1
     
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
     

    Dim departments As New List(Of Department)
    Dim departmentValue As New Department
    Dim employee As New Employee
     
    departmentValue.Employees = New List(Of Employee)
     
    With employee
    .Name = John Smith
    End With
     
    departmentValue.Employees.Add(employee)
    departments.Add(departmentValue)
    DataGridView1.DataSource = departments
     
    'So basically how would you directly set the DataPropertyName to Name for the employee class.
     
    End Sub
    End Class
     
    Public Class Employee

    Private m_name As String
    Public Property Name() As String
    Get
    Return m_name
    End Get
    Set(ByVal value As String)
    m_name = value
    End Set
    End Property
    End Class
     
    Public Class Department

    Private m_employees As List(Of Employee)
    Public Property Employees() As List(Of Employee)
    Get
    Return m_employees
    End Get
    Set(ByVal value As List(Of Employee))
    m_employees = value
    End Set
    End Property
    End Class
     
     

  • RELEVANCY SCORE 2.62

    DB:2.62:Multiple Deployments On Mixed Glassfish Container Types (Local, Managed, Remote) z7



    Hey there,

    my setup is like described in this question:

    Multiple Deployments on multiple remote glassfish group leads to "Invalid user name or password"

    My environment is the following:

    Glassfishv4 1 (managed) running on localhost.

    Eclipse IDE running on localhost containing source / test code.

    Glassfishv4 2, running on a virtual machine (remote). Reachable over the network.

    I have the following arquillian.xml:

    ?xml version="1.0"?
    arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://jboss.org/schema/arquillian"
    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"

    group qualifier="glassfish_cluster" default="true"
    container qualifier="managed" default="true"
    configuration
    property name="domain"mydomain/property
    property name="adminPort"4848/property
    property name="adminHost"localhost/property
    property name="adminUser"myadmin/property
    property name="adminPassword"myadminpwd/property
    property name="allowConnectingToRunningServer"true/property
    /configuration
    /container

    container qualifier="local"
    configuration
    property name="adminPort"4848/property
    property name="adminHost"localhost/property
    property name="adminHttps"false/property
    property name="adminUser"myadmin/property
    property name="adminPassword"myadminpwd/property
    property name="target"server/property
    /configuration
    /container

    container qualifier="remote"
    configuration
    property name="adminPort"4848/property
    property name="adminHost"myvm015/property
    property name="adminHttps"true/property
    property name="adminUser"myadmin/property
    property name="adminPassword"myadminpwd/property
    property name="target"server/property
    /configuration
    /container
    /group
    /arquillian

    DB:2.62:Multiple Deployments On Mixed Glassfish Container Types (Local, Managed, Remote) z7


    Hey there,

    my setup is like described in this question:

    Multiple Deployments on multiple remote glassfish group leads to "Invalid user name or password"

    My environment is the following:

    Glassfishv4 1 (managed) running on localhost.

    Eclipse IDE running on localhost containing source / test code.

    Glassfishv4 2, running on a virtual machine (remote). Reachable over the network.

    I have the following arquillian.xml:

    ?xml version="1.0"?
    arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://jboss.org/schema/arquillian"
    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"

    group qualifier="glassfish_cluster" default="true"
    container qualifier="managed" default="true"
    configuration
    property name="domain"mydomain/property
    property name="adminPort"4848/property
    property name="adminHost"localhost/property
    property name="adminUser"myadmin/property
    property name="adminPassword"myadminpwd/property
    property name="allowConnectingToRunningServer"true/property
    /configuration
    /container

    container qualifier="local"
    configuration
    property name="adminPort"4848/property
    property name="adminHost"localhost/property
    property name="adminHttps"false/property
    property name="adminUser"myadmin/property
    property name="adminPassword"myadminpwd/property
    property name="target"server/property
    /configuration
    /container

    container qualifier="remote"
    configuration
    property name="adminPort"4848/property
    property name="adminHost"myvm015/property
    property name="adminHttps"true/property
    property name="adminUser"myadmin/property
    property name="adminPassword"myadminpwd/property
    property name="target"server/property
    /configuration
    /container
    /group
    /arquillian

  • RELEVANCY SCORE 2.62

    DB:2.62:Dependency Injection/Inversion Of Control Question... zk


    Using the principals in the subject, am I correct in believing that all classes should use Interfaces or Abstract Classes when establishing associations between classes?
    If I had a Car class, it'd be proper to have a ListIPart property instead of
    ListPart... and if each part had associations with things like Suppliers, Categories, etc... all those should be Interfaces as well?

    Seems like a ton of work.

    DB:2.62:Dependency Injection/Inversion Of Control Question... zk


    Using the principals in the subject, am I correct in believing that all classes should use Interfaces or Abstract Classes when establishing associations between classes?

    Like Reed, I disagree, in practice no class should be abstract nor implement an interface unless there's a value to do so!

    In my opinion and I've seen it in practice, developers tend to over abstract programs because they either work in a top-down approach or they don't really think about the overall structure and abstract everything.
    Working from top to bottom (top-down) means you first define your interfaces (specification) and only then implement them whereas in the opposite approach, you first have a real or concrete implementation in place and then you extract the interface from
    the actual implementation, working up as the application evolve.

    In my experience when you're using top-down you're doing too many assumptions and you have absolutely no idea how everything will play out at the end, however, I guess that it all comes to the way you think as a person about problems and the approach
    you're taking to solve them.

    Seems like you would need to have some awesome foresight to know which classes are less likely to change. In my situation, the Parts class, I would think is more apt to change... and a supplier would be less likely to change, but that's just me stabbing
    in the dark. Is there any logic test engineers use to answer this question?

    You don't need and shouldn't make any assumptions, it's science for a reason, you should
    know where and what is going to change as the application evolve.
    When new dependencies are created you have the chance and choice to either make everything dependent on a certain implementation or extract it to an interface and make the new code dependent on this interface.

    Regards,

    Eyal Shilony

  • RELEVANCY SCORE 2.62

    DB:2.62:Powershell Wmi Class Tree View zm


    I loved the old WMI Browser that you could see the WMI Classes in an inheritance tree view. This made it easy to go up and down the tree finding similar things.
    Can you write a PowerShell script that would list the classes in an inheritance tree?
    Thanks,
    SLDR
    (Stephen L. De Rudder)
    Sorry, I didn't make the question clear (forgot question mark).
    Note: I am looking for something that will create the list of CIM classes in an inheritance tree view like the WMI Browser did. The problem I am having is that I can't seem to find a way to traverse the inheritance tree starting from the top and going down
    (ie: CIM_Chip - CIM_PhysicalMemory - Win32_PhysicalMemory). What I need is a way to get all classes that inherit from a specific class.I can go from the bottom up by getting the superclasswith the __SUPERCLASS property then
    get the superclass of that class repeatedly to finely find the root class.
    I realize I could take each class from Get-CimClass and construct an inheritance tree starting from the bottom and working my way up till class is the root but that it not optimal.

    DB:2.62:Powershell Wmi Class Tree View zm

    Brian the Brain keeps reminding use that he, too, has a great browser.
    Check it out!
    See:
    https://gallery.technet.microsoft.com/PowerShell-Object-Browser-847d62c1

    ¯\_(ツ)_/¯

  • RELEVANCY SCORE 2.61

    DB:2.61:Usibng Longlistselector With Medialibrary Classes 9s


    Hi I am currently in the early stages of developing a media player application for Windows Phone tat exands on the existing functionality of the existing musicvideo app.
    One of my requirements is that I am able to group artists/albums etc. alphabetically using the LongListSelector control from the Windows Phone Toolkit. At the moment, I am able to display the relevent information using he LongLsitSelector in its flatlist
    format. However I have a question in regards to grouping the data.
    Can I use the exising Artist/Album/Songs classes, and more specically the name property to group the data, or will i have to write a custom version of these classes to group them.
    Any help/code examples for this task woudl be greatly appreciated.

    DB:2.61:Usibng Longlistselector With Medialibrary Classes 9s

    You may have already figured this out but for anyone else looking to use the longlistselector I found another tutorial that is more current
    here.

  • RELEVANCY SCORE 2.61

    DB:2.61:Custom Inspector Like New Gui Event Classes ac



    There is a rough property drawer on this question that may help.

    DB:2.61:Custom Inspector Like New Gui Event Classes ac


    There is a rough property drawer on this question that may help.

  • RELEVANCY SCORE 2.61

    DB:2.61:Does Java Have A Class To Encrypt And Decrypt Strings? sa


    Does Java have a class to encrypt and decrypt string?

    I want to store passwords to a remote system in a property file. As property files are simple text file it would be too easy for someone to display this file. I want to make it a little harder on a would-be hacker.

    Does Java classes that could be used to encrypt the password before storing it and decrypt it after it is read (and before it is used)?

    Any suggestions? ( Yes, I did search the forums :) ).

    Thanks all!

    DB:2.61:Does Java Have A Class To Encrypt And Decrypt Strings? sa

    the javax.crypto package offers that functionality, as the previous poster says. The package is documented all right, but it lacks concrete examples, so you may want to look at some examples on the net (should be pretty easy to find, from google or some thing). Basically, you can use the Cipher class and its doFinal method(s) to encrypt/decrypt Strings via some SecretKey.

  • RELEVANCY SCORE 2.61

    DB:2.61:Customize Code Genration Of Wcf Data Service Client (Silverlight) jz


    Hi all,

    I'm wondering if there's any way to customize the code generation of a WCF Data Service client and entities? What I would like to do is add a custom property to my generated entity classes. Is there an easy way to do this, or do I have to do it manually using
    partial classes? I have a couple of hundred generated entity classes, so an automatic way of doing this would be great :)
    Thanks!

    DB:2.61:Customize Code Genration Of Wcf Data Service Client (Silverlight) jz

    Actually - one idea:
    You could compile the file generated for you by code gen into a dll. Then load the dll using reflection, walk all the types in the assembly, find those which have DataServiceKey attribute (all entities will have this) and generate a separate C# file which
    will using partial classes add your property to each of those classes.
    Then you include both the code gen C# file and the one you generated in one assembly, the compiler will combine the partial classes into one and thus add the property you wanted.
    Coding the tool will take some time, but it's not that complicated and it allows you to regenerate the classes any time you need.
    Thanks,Vitek Karas [MSFT]

  • RELEVANCY SCORE 2.61

    DB:2.61:Serializing A Complex Object sa


    Hi, I have a complex object graph and I wanted a quick and easy way to save the graph to a file and then later reconstruct the same graph. My first thought would be to use the [Serializable] attribute on my classes but then I started getting in to some difficult areas. More specifically, there are some properties on my object that are declared as:private string name = string.Empty;public string Name{    get {return this.name;}    protected set {this.name = value;}}Here I wanted a read only property to the user of the object, but accessable to derived classes. When I try to serialize the object is throws an exception because Name is read-only.I have a number of these readonly properties. Do I have to  implement ISerializable or is there a better way?RegardsGraham

    DB:2.61:Serializing A Complex Object sa

    What error are you getting?  How are you serializing/deserializing?When I try to serialize a class like this:

    [Serializable]  

    public class Bar  

    {  

       public Bar()  

       {  

           Data = blah;  

       }  

       public string Data  

       {  

            get;  

            protected set;  

       }  

  • RELEVANCY SCORE 2.61

    DB:2.61:Need Help With A Stupid Question 7p



    Hi, this is probably an easy question for someone who is in the know, but anyway I'm trying to communicate between 2 different classes using a getter in a class, but when I call the getter to get a value I get an error. Heres the code-

    //THE PLAYER CLASS

    public function get _playerX():Number

    {

    return this.x;

    }

    public function get _playerY():Number

    {

    return this.y;

    }

    //ENEMY CLASS

    private function EnemyAi(){

    thePlayerX = Player._playerX;

    thePlayerY = Player._playerY;

    }

    I get this error:

    1119: Access of possibly undefined property _playerX through a reference with static type Class.

  • RELEVANCY SCORE 2.60

    DB:2.60:Servlet Reloading km



    Could someone explain to me how servlet reloading works? I know that I can
    put servlet classes in the servletclasses directory and have the reload based on
    the weblogic.httpd.servlet.reloadCheckSecs property, but I am wondering if
    there is any analogous to this when a webapp is being used.

    Maybe there is a more fundamental question here. Should webapps be used
    during the development phase? What are the alternatives?

    Thank you in advance,
    Chris Morris

    DB:2.60:Servlet Reloading km

    Chris Morris wrote:

    Could someone explain to me how servlet reloading works? I know that I can
    put servlet classes in the servletclasses directory and have the reload based on
    the weblogic.httpd.servlet.reloadCheckSecs property, but I am wondering if
    there is any analogous to this when a webapp is being used.

    Webapps can't be hot deployed (reloaded) in 5.1.

    Maybe there is a more fundamental question here. Should webapps be used
    during the development phase? What are the alternatives?

    That depends on your architecture and your level of comfort with
    WebLogic's classloaders. If you know exactly what you're doing (or your
    app undergoes rigorous testing :) you can package it as
    servlets/JSPs/whatever that can be reloaded per above property in
    development and a webapp (WAR) in production. This will allow you to
    save some time in development by not having to reboot the server in
    order for the changes in the web tier to be seen by your clients.

    Regards,

    --
    Alexander Petrushko
    mailto:apetrushko@yahoo.com
    Consulting Services available

  • RELEVANCY SCORE 2.60

    DB:2.60:Im Getting A The Management Pack Element Is Not Declared Error When Trying To Import Csv Data Into My *Extended* Windowscomputer Class ka


    Background:

    I have a class called SUS_WindowsComputerMP, that is an extension of the Microsoft class, Microsoft.Windows.ComputerI'm trying to import CSV data into this extended class and to the base class as well.
    Question:

    What am I doing wrong? I have a feeling that the Import CSV Format file is different for importing data into *extended* classes like mine, because the XML structure below would work for non-extended classes.

    ...Creating new CSVImporter

    Data Filename: D:\Peter\CMDB II\Exported MPs\TestMPs\SUS_WindowsComputer.csv
    Format Filename: D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml

    Validating against XSD schema...
    The 'ManagementPack' element is not declared.
    Validation completed.

    Format file D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml contains an invalid root element. Expected: root node with name \CSVImportFormat\
    Could not initialize a Management Object Creator from format file D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml. Import thread exiting.

    My import format XML is this:
    CSVImportFormat
    Class Type=ClassExtension_a3ae3e0f_d578_43dc_aa3e_9037a094763c
    Property ID=WindowsServerID /
    Property ID=PrincipalName /
    Property ID=NetbiosComputerName /
    Property ID=IPAddress /
    Property ID=NetbiosDomainName /
    Property ID=DNSName /
    Property ID=OSVersionDisplayName /
    Property ID=SerialNo /
    Property ID=ServerDescription /
    Property ID=AssetTagNo /
    Property ID=ServerNameRow /
    Property ID=ChassisType /
    Property ID=InstallDate /
    Property ID=IsVirtualMachine /
    Property ID=BusinessUnitCustomersEnum /
    Property ID=RegionLocationEnum /
    Property ID=OtherFunctionRoleEnum /
    Property ID=ProductTypeEnum /
    Property ID=ObjectStatus /
    Property ID=AssetStatus /
    Property ID=CriticalityEnum /
    Property ID=EnvironmentEnum /
    Property ID=CostCodeClassEnum /
    Property ID=DataClassificationEnum /
    Property ID=Manufacturer /
    /Class
    /CSVImportFormat

    DB:2.60:Im Getting A The Management Pack Element Is Not Declared Error When Trying To Import Csv Data Into My *Extended* Windowscomputer Class ka

    Background:

    I have a class called SUS_WindowsComputerMP, that is an extension of the Microsoft class, Microsoft.Windows.ComputerI'm trying to import CSV data into this extended class and to the base class as well.
    Question:

    What am I doing wrong? I have a feeling that the Import CSV Format file is different for importing data into *extended* classes like mine, because the XML structure below would work for non-extended classes.

    ...Creating new CSVImporter

    Data Filename: D:\Peter\CMDB II\Exported MPs\TestMPs\SUS_WindowsComputer.csv
    Format Filename: D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml

    Validating against XSD schema...
    The 'ManagementPack' element is not declared.
    Validation completed.

    Format file D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml contains an invalid root element. Expected: root node with name \CSVImportFormat\
    Could not initialize a Management Object Creator from format file D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml. Import thread exiting.

    My import format XML is this:
    CSVImportFormat
    Class Type=ClassExtension_a3ae3e0f_d578_43dc_aa3e_9037a094763c
    Property ID=WindowsServerID /
    Property ID=PrincipalName /
    Property ID=NetbiosComputerName /
    Property ID=IPAddress /
    Property ID=NetbiosDomainName /
    Property ID=DNSName /
    Property ID=OSVersionDisplayName /
    Property ID=SerialNo /
    Property ID=ServerDescription /
    Property ID=AssetTagNo /
    Property ID=ServerNameRow /
    Property ID=ChassisType /
    Property ID=InstallDate /
    Property ID=IsVirtualMachine /
    Property ID=BusinessUnitCustomersEnum /
    Property ID=RegionLocationEnum /
    Property ID=OtherFunctionRoleEnum /
    Property ID=ProductTypeEnum /
    Property ID=ObjectStatus /
    Property ID=AssetStatus /
    Property ID=CriticalityEnum /
    Property ID=EnvironmentEnum /
    Property ID=CostCodeClassEnum /
    Property ID=DataClassificationEnum /
    Property ID=Manufacturer /
    /Class
    /CSVImportFormat

  • RELEVANCY SCORE 2.60

    DB:2.60:Different Question About Communicating Between Classes In As3 8d


    Hello

    I have two classes - Person and Car - both classes are public
    and each
    class has its own .as file.

    public class Person extends Sprite
    and
    public class Car

    The package name on both files are the same, both classes are
    declared
    on the my first frame of my main timeline and they work
    correctly at
    this point.

    I also need to Person to access and use some of the Car
    methods and this
    is where the problem begins, if I try to call some method on
    the Car
    class from the person class I get all kind of errors, when
    using:

    CarInstance.Method();
    Error 1120, Access of undefined property CarInstance.

    Car.CarInstance.Method();
    Error 1119, Access of possibly undefined property
    CarInstance through a
    reference with static type

    I tried the following option with similar results:

    - On the Person.as file:
    import Car;

    - Tried to declare Car on the same file as Person but ouside
    the
    package, using Car as a helping class, but this way I cannot
    use Car
    from the main timeline because is not a public class.

    So, I need to access Car from the Person class and the fla,
    does anybody
    has an idea how to do this? any help will be very
    appreciated!

    Regards,
    Hugo Hiram.

    DB:2.60:Different Question About Communicating Between Classes In As3 8d

    Hi,

    It did work, thanks for helping.

    best regards,
    Hugo Hiram.
    ---

    Marghoob Sulemaan escribi:
    hi hugohiram,
    will this work for you...????

    see this...



    //Person.as
    package {
    public class Person {
    import Car;
    private var currentCar:String;
    private var theLevel:Object;

    function Person () {
    //
    }

    public function useCar(Level:Object, theCar:String):void
    {
    currentCar = theCar;
    theLevel = Level;
    }
    public function currentSpeed():void {
    theLevel[currentCar].displaySpeed(); //?????
    }
    }
    }

    // Car.as
    package {
    public class Car {
    private var speed:int = 0;
    function Car() {
    trace("new car made")
    }
    public function setSpeed(sp:int):void {
    speed = sp;
    }
    public function displaySpeed():void {
    trace("The speed is: "+speed);
    }
    }
    }

    // on stage.
    import Person;
    import Car;

    var newPerson:Person = new Person();
    var car1:Car= new Car();
    var car2:Car= new Car();

    car1.setSpeed(100);
    car2.setSpeed(50);

    newPerson.useCar(this, "car1");
    newPerson.currentSpeed();

  • RELEVANCY SCORE 2.60

    DB:2.60:Doubts About Configurable Classes d9


    Hi everybody,

    I'm a newbie in J2EE, so this question may seems to be quite simple, but I didn't get to solve it consulting the literature.

    I want to use some custom classes that needs some configuration when instatiated. To do that, they must loo for their parameters into some files (property files or XML). Those classes are used by my EJBs, so I guess the best place to put them is in the ejb jar, that is put into my ear file. But where I must put the config files, and how do I access them?

    The other question is. I would like to inform the locatioin of my config files in a no hard coded way. I thought about environment properties, or something like that. How to set these variables usinge J2EE?

    Someone could show me the best practices on this problem?

    Thanks in advance,
    Alexandre

    DB:2.60:Doubts About Configurable Classes d9

    Thanks Dunbar for your help.

    I think what I want to do is to implement the different method you have mentioned, in the case I distribute the jar file and expect an end user to change the config files. Could you describe it to me?

    About to pass the -D option applications server's starter, I guess it's not what I want. I wonder if J2EE don't have a way to set some parameters through the application.xml or the ejb-jar.xml, that could then be used by my classes at runtime.

    Thanks again,
    Alexandre

  • RELEVANCY SCORE 2.60

    DB:2.60:Updating A Property Display Name, Then Reimporting Mp Does Not Change Display Name In Console 8c



    Hello All

    I created a MP with a number of classes etc. I added an extra key property to some of these classes and gave the property a particular display name (the actual value of the key property is found
    via a WMI discovery). All this works as expected no problems.

    I then needed to alter the Display Name for said Key properties, so I go into the authoring console changed the Display Name, increment the version number for the MP and re-import. Made sure
    the new MP had arrived at the agent and the new configuration has become active etc.

    However in discovered inventory the display name for said property is still the original display name. I wait quite a while, flush the cache of the OpsMgr Console, check again still the old
    display name. I then stop the agent on the Servers in question, clear out the Health Service State folder, restart the agent, check relevant MP arrived etc etc, flush my console cache again and check discovered inventory still the old display name.

    The only way I could get it to work was to remove the MP from the management group, wait a while then re-import the MP. Surely this should not be necessary when changing details of a Property
    as above?

    Any suggestions/advice most welcome

    Thanks

    Ernie

  • RELEVANCY SCORE 2.60

    DB:2.60:Property Generation Shortcut? 7x


    I'm starting to get tired of typing in the tedious code for property declerations in my custom classes. It's also very prone to typos. Is there a shortcut in the IDE that will autogenerate a property decleration based on a name I provide, etc.?

    DB:2.60:Property Generation Shortcut? 7x

    Hi..
     
    Just type proptabtab
     
    --
    Regards,
    Daniel Kuppitz

  • RELEVANCY SCORE 2.60

    DB:2.60:Oc4j Startup Class 83


    We have a start up class configured in OC4J which is dependent on other classes.
    Some of the dependent classes read configuration parameters from .properties and .xml files.

    We have used the following to load the property file in our code:-
    Thread.currentThread().
    getContextClassLoader().getResourceAsStream(PropertyFile Name)

    The startup classes and property/xml files are located in the same startup jar.However,when OC4J starts up the classes are being loaded gracefully but it is throwing up a NullPointerException when loading the property file.

    Can anybody suggest what needs to be done for smooth loading of property files/xml files during start up?

    Thanks in advance

    DB:2.60:Oc4j Startup Class 83

    We have a start up class configured in OC4J which is dependent on other classes.
    Some of the dependent classes read configuration parameters from .properties and .xml files.

    We have used the following to load the property file in our code:-
    Thread.currentThread().
    getContextClassLoader().getResourceAsStream(PropertyFile Name)

    The startup classes and property/xml files are located in the same startup jar.However,when OC4J starts up the classes are being loaded gracefully but it is throwing up a NullPointerException when loading the property file.

    Can anybody suggest what needs to be done for smooth loading of property files/xml files during start up?

    Thanks in advance

  • RELEVANCY SCORE 2.60

    DB:2.60:Customizing The Coreresultswebpart Question - Sharepoint 2010 Wit Fast Search Server 9z


    Hello everybody,

    This is my first question to the MSDN Forums, so I hope I'm doing everything in the right way!
    I have a problem in my new Sharepoint Project, for which I have been searching on the forums for some days now, but I can't seem to solve. First of all, I'm working with Sharepoint 2010 with FAST Search Server installed, and am developing the Web Part I
    need for my project in MS Visual Studio 2010.
    I have been following some tutorials from dotnetmafia (by Corey Roth) and some blog posts by Tobias Zimmergren, who seem to be the experts on this specific subject.
    I'm trying to extend the CoreResultsWebPart, by inheriting from it, and overriding some of the main methods, like so:
    (the goal is to set both the fixedquery property and the selected xslt over a couple of dropdownlists in the (also extended) Web Part properties, which are both populated from lists that are maintained in Sharepoint, so far, so good..)
    [ToolboxItemAttribute(false)]
    public class SimpleAnswerWebPart : CoreResultsWebPart
    {

    public SimpleAnswerWebPart()
    : base()
    {

    }

    protected override void OnLoad(EventArgs e)
    {
    base.OnLoad(e);
    SPWebApplication webapp = SPContext.Current.Site.WebApplication;
    base.FixedQuery = (string)webapp.Properties[ChoiceQuery];
    base.Xsl = (string)webapp.Properties[ChoiceXslt];

    }

    public override ToolPart[] GetToolParts()
    {
    ToolPart[] toolparts = new ToolPart[3];
    WebPartToolPart wptp = new WebPartToolPart();
    CustomPropertyToolPart custom = new CustomPropertyToolPart();

    toolparts[0] = custom;
    toolparts[1] = wptp;
    toolparts[2] = new SimpleAnswerProject.CustomToolPart();

    return toolparts;
    }


    }

    plus the code for the class in which I defined the CustomToolPart:

    public class CustomToolPart : ToolPart
    {
    public DropDownList ddlQueries = new DropDownList();
    public DropDownList ddlXslt = new DropDownList();
    public String ChoiceQuery = ;
    public String ChoiceXslt = ;

    public CustomToolPart()//Constructor
    {
    this.Title = Custom CoreResultsWebPart;

    }

    protected override void CreateChildControls()
    {
    //Method to populate a drop down list from an SPList Object
    PopulateList(ddlQueries, Query List, Title, Query);
    PopulateList(ddlXslt, Xslt List, Title, Xslt (body));
    Controls.Add(ddlQueries);
    Controls.Add(ddlXslt);

    }

    public void PopulateList(DropDownList ddlname, String listname, String col1, String col2)
    {
    //left out for post, populates the dropdownlists correctly
    .....

    }

    public override void ApplyChanges()
    {
    //Logic to update the variable value in main webpart class
    //Left out for this post, because this is working!
    }
    }

    Now the funny part is that al of the new functionality is there in the Web Part, so my two new DropDownLists, plus the usual properties for a Web Part (Display, etc.), but the special Core Results section in the properties pane went missing!
    The functionality is perfect, my custom settings are working, but, for example, I cannot specify the Search Location in the properties of the Web Part. Right now I'm providing a .webpart file where the Search Location is set (hardcoded).
    If I don't override the GetToolParts[] method in my main class, this Core Results section of the settings is there, but after overwriting it, and rebuilding the set of ToolParts, I can't seem to get it back!
    What am I missing here? I am obviously missing something!
    To provide all the details of my set-up, here's the .webpart code as well:

    ?xml version=1.0 encoding=utf-8?
    webParts
    webPart xmlns=http://schemas.microsoft.com/WebPart/v3
    metaData
    type name=SimpleAnswerProject.SimpleAnswerWebPart.SimpleAnswerWebPart, $SharePoint.Project.AssemblyFullName$ /
    importErrorMessage$Resources:core,ImportErrorMessage;/importErrorMessage
    /metaData
    data
    properties
    property name=SpellcheckingMode type=Microsoft.Office.Server.Search.Query.SpellcheckMode, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cSuggest/property
    property name=MissingAssembly type=stringCannot import this Web Part./property
    property name=AllowConnect type=boolFalse/property
    property name=HelpMode type=helpmodeModeless/property
    property name=CharactersInUrl type=int90/property
    property name=ShowLangPicker type=boolTrue/property
    property name=DisplayName type=string /
    property name=MoreLinkUrl type=string null=true /
    property name=Title type=stringCustom CoreResultsSearch WebPart/property
    property name=ShowActionLinks type=boolFalse/property
    property name=ViewFlag type=string0/property
    property name=QueryNumber type=Microsoft.Office.Server.Search.WebControls.QueryId, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cQuery4/property
    property name=PreviewWindowSize type=string160/property
    property name=DateFormat type=Microsoft.SharePoint.Utilities.SPDateFormat, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cDateOnly/property
    property name=AllowClose type=boolTrue/property
    property name=SentencesInSummary type=System.Int16, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e0893/property
    property name=HighestResultPage type=System.Int16, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e0891000/property
    property name=CacheXslTimeOut type=int86400/property
    property name=RelevanceView type=boolFalse/property
    property name=MoreLinkLabel type=stringView more results /property
    property name=ManualRefresh type=boolFalse/property
    property name=ListUrl type=string null=true /
    property name=FixedQuery type=string/property
    property name=CacheXslStorage type=boolTrue/property
    property name=ResubmitFlag type=Microsoft.Office.Server.Search.Query.ResubmitFlag, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cNoResubmit/property
    property name=XslLink type=string null=true /
    property name=EnableStemming type=boolFalse/property
    property name=ShowSearchResults type=boolTrue/property
    property name=AllowMinimize type=boolTrue/property
    property name=AllowHide type=boolTrue/property
    property name=ShowMoreLink type=boolFalse/property
    property name=ListDisplayName type=string null=true /
    property name=ChromeType type=chrometypeNone/property
    property name=EnableDocumentPreviewPowerPoint type=boolTrue/property
    property name=DefaultRankingModelID type=string /
    property name=CatalogIconImageUrl type=string /
    property name=Default type=string /
    property name=DisplayRSSLink type=boolFalse/property
    property name=FireInitialRow type=boolTrue/property
    property name=TotalNumberDocumentPreview type=string10/property
    property name=DateView type=boolFalse/property
    property name=ViewFlags type=Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cNone/property
    property name=DisplayAlertMeLink type=boolFalse/property
    property name=DataSourceID type=string /
    property name=HelpUrl type=string /
    property name=DisplayDiscoveredDefinition type=boolTrue/property
    property name=AppendedQuery type=string /
    property name=AsyncRefresh type=boolFalse/property
    property name=IgnoreNoise type=boolTrue/property
    property name=Height type=string /
    property name=PageSize type=int-1/property
    property name=UseSQLDataSourcePaging type=boolTrue/property
    property name=AllowEdit type=boolTrue/property
    property name=ViewContentTypeId type=string /
    property name=Hidden type=boolFalse/property
    property name=DefaultSort type=Microsoft.Office.Server.Search.WebControls.ResultsView, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cRelevance/property
    property name=ExportMode type=exportmodeAll/property
    property name=ConcurrentNumberDocumentPreview type=string10/property
    property name=ListName type=string /
    property name=PropertiesToRetrieve type=string/property
    property name=ParameterBindings type=string null=true /
    property name=DataSourcesString type=string /
    property name=EnablePhonetic type=boolFalse/property
    property name=ListId type=System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08900000000-0000-0000-0000-000000000000/property
    property name=Scope type=string /
    property name=XmlDefinitionLink type=string /
    property name=DataFields type=string /
    property name=ShowMessages type=boolFalse/property
    property name=Width type=string /
    property name=InitialAsyncDataFetch type=boolFalse/property
    property name=QuerySideLanguage type=string-1/property
    property name=MoreResultsLink type=string null=true /
    property name=XmlDefinition type=string /
    property name=ChromeState type=chromestateNormal/property
    property name=PageType type=Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cPAGE_NORMALVIEW/property
    property name=ScopeID type=int1/property
    property name=SelectColumns type=string/property
    property name=SampleData type=string/property
    property name=EnableDocumentPreviewWord type=boolTrue/property
    property name=AutoRefreshInterval type=int60/property
    property name=CharactersInSummary type=int185/property
    property name=TitleUrl type=string /
    property name=RemoveDuplicates type=boolTrue/property
    property name=Xsl type=string /
    property name=View type=Microsoft.Office.Server.Search.WebControls.ResultsView, Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429cRelevance/property
    property name=TitleIconImageUrl type=string /
    property name=EnableSimilarFind type=boolFalse/property
    property name=Direction type=directionNotSet/property
    property name=AllowZoneChange type=boolTrue/property
    property name=ResultsPerPage type=System.Int16, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08910/property
    property name=ShowWithSampleData type=boolFalse/property
    property name=Description type=stringCoreResultsSearch WebPart, fully customized/property
    property name=EnableNicknames type=boolFalse/property
    property name=AutoRefresh type=boolFalse/property
    property name=IsLocationPeople type=boolFalse/property
    property name=Location type=stringFASTSearch/property
    property name=NoDefaultStyle type=string null=true /
    property name=ShowWindowsSearch type=boolTrue/property
    property name=UseLocationVisualization type=boolTrue/property
    property name=MoreResultsText type=stringView more results /property
    /properties
    /data
    /webPart
    /webParts

    Thanks in advance to anyone to at least willing to read this extensive post, let alone help me ;)
    Kind regards,
    Roel

    DB:2.60:Customizing The Coreresultswebpart Question - Sharepoint 2010 Wit Fast Search Server 9z

    Excellent. Probably the best place would be on the blog post itself so that this thread remains relevant to your original question. Thanks.Corey Roth blog: www.dotnetmafia.com twitter:
    @coreyroth

  • RELEVANCY SCORE 2.60

    DB:2.60:About The Delegating Property Resolver Should... dz



    Thomas, it seems you fixed a bug in the Faces delegating property resolver : The delegating property resolver should also check on the super-classes to find attributesYou need to add a corresponding test case. Thanks

  • RELEVANCY SCORE 2.59

    DB:2.59:Complex Type With Extension/Inheritance 7j



    I have an EJB which I am using to support webservice. The EJB has a method which
    has a java bean as its argument (say class A). The java bean has a list based
    property (list of class B). the class B is the base for class C, D.

    How do I write the service in ant target ?
    The reason to post this this question is as follows:
    when I use the generatetype=true, it does not generate the serializer, deserializer
    for the derived classes, neither does it create typemapping for derived classes.

    One of WLS documents mentions to use the generated classes from autotype to
    be used in the EJB, which I don't think is a good idea as it may make EJB deployment
    on other app. servers difficult/impossible.

    Can anybody guide me on this ? Right now I am in a real fix.

    Thanks

    Parag

    DB:2.59:Complex Type With Extension/Inheritance 7j


    After adding the namespace in my schema doc. I could get the EAR for webservice
    ready and could invoke thru the web-service testing web page.

    But now I face another issue which I am less likely in control of. In the WSDL
    file generated by source2wsdd I get the base class with a namespace "lcl0",
    which denies the generation of stubs for client invocation on web service. Following
    is the generated WSDL file

    ?xml version="1.0" encoding="UTF-8"?
    definitions xmlns:tns="http://tempuri.org/"
    xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap12enc="http://www.w3.org/2002/12/soap-encoding"
    xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    targetNamespace="http://tempuri.org/"
    types
    xsd:schema xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:stns="java:com.abc.interactor.ejb"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    elementFormDefault="qualified"
    attributeFormDefault="qualified"
    targetNamespace="java:com.abc.interactor.ejb"
    xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"
    /xsd:import
    xsd:complexType name="ArrayOfPropertyValue"
    xsd:complexContent
    xsd:restriction xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    base="soapenc:Array"
    xsd:attribute xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    ref="soapenc:arrayType"
    wsdl:arrayType="lcl0:PropertyValue[]"
    /xsd:attribute
    /xsd:restriction
    /xsd:complexContent
    /xsd:complexType
    xsd:complexType name="InvocationInfo"
    xsd:sequence
    xsd:element type="xsd:string"
    name="actionMessageName"
    minOccurs="1"
    nillable="true"
    maxOccurs="1"
    /xsd:element
    xsd:element type="xsd:string"
    name="domainName"
    minOccurs="1"
    nillable="true"
    maxOccurs="1"
    /xsd:element
    xsd:element type="stns:ArrayOfPropertyValue"
    name="values"
    minOccurs="1"
    nillable="true"
    maxOccurs="1"
    /xsd:element
    xsd:element type="xsd:int"
    name="version"
    minOccurs="1"
    maxOccurs="1"
    /xsd:element
    /xsd:sequence
    /xsd:complexType
    /xsd:schema
    xs:schema xmlns:tns="http://www.abc.com/InteractorService"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    targetNamespace="http://www.abc.com/InteractorService"
    xs:complexType name="IntegerPropertyValue"
    xs:complexContent
    xs:extension base="tns:PropertyValue"
    xs:sequence
    xs:element type="xs:int"
    name="IntegerValue"
    nillable="true"
    /xs:element
    /xs:sequence
    /xs:extension
    /xs:complexContent
    /xs:complexType
    xs:complexType name="PropertyValue"
    xs:sequence
    xs:element type="xs:string"
    name="PropertyName"
    nillable="false"
    /xs:element
    /xs:sequence
    /xs:complexType
    xs:complexType name="StringPropertyValue"
    xs:complexContent
    xs:extension base="tns:PropertyValue"
    xs:sequence
    xs:element type="xs:string"
    name="StringValue"
    nillable="true"
    /xs:element
    /xs:sequence
    /xs:extension
    /xs:complexContent
    /xs:complexType
    /xs:schema
    /types
    message name="invoke"
    part xmlns:partns="java:com.abc.interactor.ejb"
    type="partns:InvocationInfo"
    name="info"
    /part
    /message
    message name="invokeResponse"
    /message
    portType name="InteractorPort"
    operation name="invoke"
    input message="tns:invoke"
    /input
    output message="tns:invokeResponse"
    /output
    /operation
    /portType
    binding type="tns:InteractorPort"
    name="InteractorPort"
    soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"
    /soap:binding
    operation name="invoke"
    soap:operation style="rpc"
    soapAction=""
    /soap:operation
    input
    soap:body namespace="http://tempuri.org/"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    use="encoded"
    /soap:body
    /input
    output
    soap:body namespace="http://tempuri.org/"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    use="encoded"
    /soap:body
    /output
    /operation
    /binding
    service name="Interactor"
    port name="InteractorPort"
    binding="tns:InteractorPort"
    soap:address location="http://pls.set.the.end.point.address/"
    /soap:address
    /port
    /service
    /definitions

    and the exception thrown by clientgen is
    weblogic.xml.schema.binding.BindingException: schema error - with nested exception:
    [weblogic.xml.schema.model.XSDException: Unable to resolve definition for lcl0:PropertyValue]
    at weblogic.xml.schema.binding.internal.codegen.SchemaInspector.createDescriptors(SchemaInspector.java:148)
    at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:281)
    at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.addTypesInSchemas(XSDTypeMappingBuilder.java:138)
    at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.processSchemaTypes(TypeMappingBuilderBase.java:310)
    at weblogic.webservice.tools.build.internal.Schema2JavaImpl.doTypeMapping(Schema2JavaImpl.java:297)
    at weblogic.webservice.tools.build.internal.Schema2JavaImpl.run(Schema2JavaImpl.java:187)
    at weblogic.webservice.tools.build.internal.WSDL2JavaImpl.run(WSDL2JavaImpl.java:192)
    at weblogic.webservice.tools.build.internal.ClientGenImpl.getTypeMappingFromWSDL(ClientGenImpl.java:707)
    at weblogic.webservice.tools.build.internal.ClientGenImpl.doClientGenFromWsdl(ClientGenImpl.java:403)
    at weblogic.webservice.tools.build.internal.ClientGenImpl.run(ClientGenImpl.java:343)
    at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.doClientGen(ClientGenTask.java:351)
    at weblogic.ant.taskdefs.webservices.clientgen.ClientGenTask.execute(ClientGenTask.java:208)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    at org.apache.tools.ant.Main.runBuild(Main.java:609)
    at org.apache.tools.ant.Main.start(Main.java:196)
    at org.apache.tools.ant.Main.main(Main.java:235)

    I don't know if anybody is following this thread, but in case if somebody is stuck
    in a situation like me, may get some hint to solve similar problem from my postings.

    Parag
    (previous postings text omitted)

  • RELEVANCY SCORE 2.58

    DB:2.58:Class Declaration In Wpf Mvvm ap


    Im new to MVVM as well as WPF and Enity Framework.
    alot of tutorials on the net, refers to the MODEL as classes....
    eg. public class Customer
    property firsnamt{get, set}
    propert surname {get, set}

    my question is...if im using Entity Framework, all the classes are already generated and I no longer need to create my own. How does this fit in with MVVM? Especially in the IdataErrorInfo side of things.

    DB:2.58:Class Declaration In Wpf Mvvm ap

    Hi,
    using EF almost all your entity classes will be generated , but sometimes you may need to manually code . I suggest please refer tutorial onMSDN for Entity Framework .
    In MVVM , these classes may be treated as Model objects .
    These is no any relation with IDataErrorInfo .
    First you go through basic tutorials of MVVM and Entity Framework .
    http://lmgtfy.com/?q=entityframework
    http://lmgtfy.com/?q=WPFMVVMOne good question is equivalent to ten best answers.

  • RELEVANCY SCORE 2.58

    DB:2.58:Easy Example: Show A Control On A Different Vi jf


    Hi alli have a very-beginner question: i have a main VI, and several sub-VI's...what i want...is to pass a value from a sub-vi to the main VI, to display it there. and i have to do it with a reference and property node...that's all i found out so far...it seems to be so easy, i feel really stupid. any help is appreciated...markus

    DB:2.58:Easy Example: Show A Control On A Different Vi jf

    OK, here is the way to do it by reference. Put both vi's in a directory called c:\MyTemp to run my example. I used a static VI reference. In your application you can redefine the reference to your own particular path.



    - tbobInventor of the WORM Global

  • RELEVANCY SCORE 2.58

    DB:2.58:How To Change The Plot Label 8k


    Easy question. I have a 2x2 array going waveform graph. How do I change the labels on each of those plot to the text I want? I look in the property nodes, but couldn't find it. Thanks!






    Solved!
    Go to Solution.

    DB:2.58:How To Change The Plot Label 8k

    ahh thanks.. I found that property but didn't know I had to set an active plot.

  • RELEVANCY SCORE 2.58

    DB:2.58:Property Classes Equivalent In Adf xk


    what are the Property Classes ( Oracle Forms ) equivalent in adf.

    DB:2.58:Property Classes Equivalent In Adf xk

    There ous no equivalent in adf or java. However you can built this class or classes yourself.
    It can be one or more java classes which together built what you call property class.
    The exact content and functionality depends on the property.

    Timo

  • RELEVANCY SCORE 2.58

    DB:2.58:Getting At All Classes On Classpath xx


    Is there an easy way to get a list of all of the classes on the classpath without actually traversing the directories?

    Thanks,

    Josh

    DB:2.58:Getting At All Classes On Classpath xx

    Surely there must be: how else could Eclipse (for
    example) show a tree-view of available classes?Because somewhere in the megabytes of code that form eclipse (which isn't java) someone wrote code that does that.

  • RELEVANCY SCORE 2.58

    DB:2.58:Ejb Classpath Question xx


    Hi,

    I have a burning question regarding EJBs and classpaths.

    Here is my situation:
    - My application uses EJBs, Servlets and JSP pages
    - My EJB remote interfaces and implementation classes extend common,
    abstract base classes
    - My EJB implementation classes use several utility classes, which are
    also used by my servlets.
    - Each EJB is deployed in a separate JAR file

    The question I have is which classes should be included in the EJB JAR
    files.

    I'd like to put just the EJB implementation class in the EJB JAR, and
    put everything else in a common JAR that is placed in my WEB-INF/lib
    folder and shared by the rest of the application. However, if I do
    that, Weblogic won't load the EJBs because it tries to do so before it
    deploys my web app, and hence before it adds the JARs in the
    WEB-INF/lib folder to its classpath.

    I can explicitly add my jar to the Weblogic classpath on the
    commandline (weblogic.class.path property). Now my EJBs load. However,
    my servlets become unable to load any classes from any jar in
    WEB-INF/lib. I read something about it being a bad idea to include a
    jar from WEB-INF/lib in the classpath, so I'm probably seeing that
    problem.

    The third option is to include all the dependent classes in my EJB
    jars themselves, in addition to deploying them in WEB-INF/lib. This
    works, but it bothers me that there are multiple copies of the same
    class files lying around.

    I'm sure I'm not the first developer who's written an EJB that shares
    classes with a servlet or JSP page. What's the proper way to do this?

    Thanks.

    DB:2.58:Ejb Classpath Question xx


    There is 1 carriage return :

    Manifest-Version: 1.0CR

    Class-Path: utility.jar

    "Mark Cordobal" markcor@notme.com wrote:

    The attach field doesn't work anymore ...

    Here is the content :

    Manifest-Version: 1.0
    Class-Path: utility.jar

    "Mark Cordobal" markcor@notme.com wrote:
    In attachment there is the sample

    Regards

    Mark Cordobal

    Frank LaRosa frank@franklarosa.com wrote:
    I tried that. The Jar utility wouldn't even make the jar file whenI
    tried
    it. It complained that the first thing in my manifest file had to be
    a
    "Name" attribute. I tried adding one, but it didn't help. Do you have
    an
    example? Thanks.

    Mark Cordobal wrote:

    Use a ClassPath entry in your EJB jar module MANIFEST.MF file

    Mark Cordobal

  • RELEVANCY SCORE 2.58

    DB:2.58:Property Grid And Nested Objects When I Cannot Use A Type Converter... cp



    My issue originates from the fact that I have developed a partial-class library from a schema.
    Using the XSD.exe tool, I have a series of partial classes that are being used somewhat like a library. This code is compiled into a dll
    and given to a different program. This is where the issues arise.

    In this second program I would like to display these classes in a property grid. But alas they have nested objects.I would like to
    turn these nested objects into expandable objects much like the way the size object is found on the property grid. (Yes this is the classic size object issue for the property grid)

    My problem is, every solution I can find online for these issues suggests creating a type converter for your class. I would have no problem
    in doing this, except that my classes are already compiled. I cannot find a way in which I could add a type converter onto these classes aside from slipping into the code prior to compilation and manually adding the converter into the code; Which seems incredibly
    inefficient.

    My code needs to be able to take any schema that has moved through the XSD tool. This means there can be muti-nested objects, and making
    a dummy cast won't work either.

    My question is if this is even possible with the property grid? I am really hoping it will because it would save me ages of UI development.

    DB:2.58:Property Grid And Nested Objects When I Cannot Use A Type Converter... cp

    Here it is.
    I use a method very similar to the Property Bag outlined here.
    http://www.codeproject.com/Articles/12282/Implementing-a-PropertyBag-in-C

    He has his code available so take a look and see if you are in for the commitment it takes.

  • RELEVANCY SCORE 2.58

    DB:2.58:Question About Classes pd


    when you set the linkage for a movie clip, the base class is
    set for you, usually?
    then how do you know what Class to set?
    I made a rect on the stage. Converted it to mc.
    Set linkage for as3 and it said it would set the class
    automatically.
    when I run it

    1119: Access of possibly undefined property x through a
    reference with static type Class.

  • RELEVANCY SCORE 2.58

    DB:2.58:Easy Question About 3 Driver Classes jx



    which are the differences between

    Plug and Play normal

    Plug and Play (project-style)

    and IVI?

    i have to make a program to comunicate and control a oscilloscope...

    which one i have to download?




    Using LabVIEW 7.1

  • RELEVANCY SCORE 2.58

    DB:2.58:Ssrs, Grouping, And Objects As Dataset k3


    To All
    I have a Class A that contains a List as a property, which happens to be a Class B as well. On my SSRS report I would like to display both Classes with a few of their own properties however I would like to group on Class A. So my report will look
    some think like this.

    ClassA Property 1,ClassA Property 2,ClassA Property 3
    ClassB Property 1, Property 2
    ClassB Property 1, Property 2

    ClassA Property 1,ClassA Property 2,ClassA Property 3
    ClassB Property 1, Property 2
    ClassB Property 1, Property 2

    ClassB Property 1, Property 2
    Hope this makes since.

    Thanks in Advance For Any Assistance
    kw

    kwuh97

    DB:2.58:Ssrs, Grouping, And Objects As Dataset k3

    Hello,
    Based on your description, “classes are basically my tables in my database”. Supposing the table “Class A” stored information of categories and each category has multiple properties values, the table “Class B” is about Subcategories and there is 1to many relationship
    between “category” and “subcategory”. We can create a dataset by join the two tables and retrieve all columns we need.
    In order to meet your requirement, you can use Matrix Data region, add the “category” field as parent row group and “subcategory” field as child row group; add the “category property” field as “column group” and display the “subcategory property” field in
    the data cell.
    If I have any misunderstanding, please let me know. You can post the report dataset with sample data, so we will help to work out this issue.
    Regards,
    Fanny LiuFanny Liu
    TechNet Community Support

  • RELEVANCY SCORE 2.58

    DB:2.58:When And Where Set The Routejump Property jd


    Hello everyoneFor my DSL i don't want the connectors to jump over each other. The LinkShape and the Diagram class have a RouteJump property. I want for every connector in my diagram set this property to a value like never jump.My first question is: when should I call this property and on which of the both classes? I tried the constructor of my connector, but this throws a NullValue exception.Does someone know a best practice for my request?And by the why: what is the meaning of all the values of the enums used here?Thanks   Benjamin

    DB:2.58:When And Where Set The Routejump Property jd

    Hello everyoneFor my DSL i don't want the connectors to jump over each other. The LinkShape and the Diagram class have a RouteJump property. I want for every connector in my diagram set this property to a value like never jump.My first question is: when should I call this property and on which of the both classes? I tried the constructor of my connector, but this throws a NullValue exception.Does someone know a best practice for my request?And by the why: what is the meaning of all the values of the enums used here?Thanks   Benjamin

  • RELEVANCY SCORE 2.58

    DB:2.58:Scenarios For Abstract Classes And Interfaces jm


    Would please tell me the exact scenarios when we should use abstract classes and interfaces.

    this question disturbing me for a long time....dont think its a simple basic question, it seems to be easy and to satisy any person by explaining it's litttle bit complicated....

    thanks

    DB:2.58:Scenarios For Abstract Classes And Interfaces jm

    In short: always prefer interfaces for reference types, and always prefer interfaces versus fully abstract classes. If the class has some implementation, you have no choice anyway.

  • RELEVANCY SCORE 2.58

    DB:2.58:Custom Rule: How To Get All Classes Which Have A Property Of A Certain Type zc


    I have a custom rule which checks for certain things on fields and properties. The checks should now be different if the class is used by another class, if this class inherits from component.
    Is there an easy way to find out which classes are using a class of a certain member (or exactly have a property of the type of the class to which the member belongs)?

    Thanks in advance
    pascal

    DB:2.58:Custom Rule: How To Get All Classes Which Have A Property Of A Certain Type zc

    I have a custom rule which checks for certain things on fields and properties. The checks should now be different if the class is used by another class, if this class inherits from component.
    Is there an easy way to find out which classes are using a class of a certain member (or exactly have a property of the type of the class to which the member belongs)?

    Thanks in advance
    pascal

  • RELEVANCY SCORE 2.58

    DB:2.58:How To Change The Default Label Alignment Property? jk


    Easy question probably, but can't seem to find the answer/way....

    How can I change the default value APEX uses for the Page Item Label "Horizontal/Vertical Alignment" property?

    Every time I create page items this defaults to RIGHT, and my app uses them all as LEFT aligned...so I need to change this every time. Would love to just have it default to that. Must be an easy way I'm missing, right?

    Thanks!
    David

    Edited by: David DMC on Apr 28, 2011 10:16 AM

    DB:2.58:How To Change The Default Label Alignment Property? jk

    I think best way for you to change your CSS file to make every label left..

  • RELEVANCY SCORE 2.58

    DB:2.58:Showing Property In Editor Window kp



    Unity will display non-private FIELDS in the inspector, a property it can have issues with.


    You may want to create custom classes to implement the behavior on a type(like you did with an UpdateView in a set.


    Also, doing work in a get/set isn't good form for a property, all calls with properties should be extremely light weight.


    Also use the search function, same question, same answer.

    DB:2.58:Showing Property In Editor Window kp


    Right now when u change a property in the editor you will need to call UpdateView via the context menu. There is a way to get it to automatically call via editor extensions, but that's more work.

    using System.Collections.Generic;
    using UnityEngine;

    public class UIToggleProgressBar : MonoBehaviour {
    //here comes references to other items
    public ListUIToggle items = new ListUIToggle();

    [SerializeField]
    private int step;

    public int Step {
    get { return step; }
    set {
    step = value;
    UpdateView();
    }
    }
    [ContextMenu(UpdateView)]
    private void UpdateView() {
    //Here I update view on step change
    }
    }

  • RELEVANCY SCORE 2.58

    DB:2.58:Select From Different Div Classes Depending On A Value 38


    How can i select from different classes in a DIV object dependingon the value of a property inside a foreach?

    DB:2.58:Select From Different Div Classes Depending On A Value 38

    Can you elaborate your question further via some code sample or other information?@prashantphadke || Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog! http://aka.ms/t4vuvz