How to bind "Image Field" object on a database

Hi to all
I inserted into a dynamic PDF (Livecycle ES3 trial) an image field, but I don't understand how I can to bind a JPG into a database.
In (F5) preview... I'm able to open a image file on filesystem and visualize it on PDF form... but then? How to bind on database?
In my several tentatives I'm using a MS Access 2010 database table, where I defined a OLE object... but doesn't work.
Thank you at all.
visert

Hi,
I have not tried to do this, but this document provides some instructions.
http://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdfhttp://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdf
Hope it helps
Bruce

Similar Messages

  • WDJ: binding image field to context attribute

    Dear all,
    I filed a form with an image field to allow the user to insert a picture on the form from his PC.
    The form is shared by several Web Dynpro Java View.
    What is the right type of the context attribute  for binding the image field of the form?
    Thanks for your time.
    Regards,
    Mirco

    Hi Chintan,
    I also think it was a binary. but I do not, partly because the image field object is bindable with any data context  (I tried so far with integer, string, binary)
    To share the image between two Web Dynpro vew I used "usePDF" mode but I would like to bind the image with a context attribute so I can use "updateData" mode instead of "usePDF" mode
    Regards,
    Mirco

  • How to add a ChartOfAccounts object into the database.

    how to add a ChartOfAccounts object into the database. please shows sample code
    thanks

    Dim CoA As SAPbobsCOM.ChartOfAccounts
                CoA = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oChartOfAccounts)
                CoA.Code = 11223344
                CoA.ExternalCode = "a1234"
                CoA.ForeignName = "f Test Account"
                CoA.Name = "Test Account"
                CoA.AccountType = SAPbobsCOM.BoAccountTypes.at_Other
                CoA.ActiveAccount = SAPbobsCOM.BoYesNoEnum.tYES
                CoA.FatherAccountKey = 100001
                If CoA.Add <> 0 Then
                    MessageBox.Show(oCompany.GetLastErrorDescription)
                Else
                    MessageBox.Show("Added Account")
                End If
    Remember the father account key must be a valid account number in the company where you are trying to add the new account.  (The G/L Account code seen in the SBO client)

  • How to add a field object to group header section in crystal report document?

    Hi All, I have got two questions mentioned below, please share your inputs. 1)I want to know whether it is possible to add a field object to header section in crystal report document programmatically? I am using crystal runtime for visual studio. I know that using RAS we can do it, but I want to do it using managed library of crystal runtime. Please suggest. 2) I am doing a POC where I am using RAS (unmanaged library) to manipulated crystal report document. Please see code below: var dbTable = _reportDocument.ReportClientDocument.DatabaseController.Database.Tables[0]; var dbField = dbTable.DataFields.FindField(item.ColumnName,                         CrystalDecisions.ReportAppServer.DataDefModel.CrFieldDisplayNameTypeEnum.crFieldDisplayNameName,                         CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleEnglishUS); CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject fieldObject = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject();                     fieldObject.DataSourceName = dbField.Name;                     fieldObject.FieldValueType = dbField.Type; var groupHeaderArea = _reportDocument.ReportClientDocument.ReportDefController.ReportDefinition.GroupHeaderArea[0].Sections[i]; _reportDocument.ReportClientDocument.ReportDefController.ReportObjectController.Add(fieldObject, groupHeaderArea); In above code last line throwing exception : "The report field type is not valid." at CrystalDecisions.ReportAppServer.Controllers.ReportObjectControllerClass.Add(ISCRReportObject ReportObject, Section Section, Int32 nIndex) Thanks, Jai

    Hi Jaikumar
    As per the SCN Rules of engagement, one question per thread please.
    Re. your 1st question. Adding a field to a report is considered to be a report creation APIs (RCAPI). Only the RAS SDK has RCAPIs, so you can not use plain jane crystal APIs. For how to with RAS, see the examples here: NET RAS SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
    Also, consult the Developer Help Files:
    Report Application Server .NET SDK Developer Guide
    Report Application Server .NET API Guide
    Re. your second question, please create a new discussion.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • How to use Image field in SQL-7 for curvs

    I sampling data from a NI-card. There will be a lot of data so I thought I should use Image-field in SQL-7 to save the hole curve. How do you do that?

    I would suggest looking into the Database Connectivity Toolset. It has complete SQL functionality and uses ADO to connect to many types of databases. I have it and it comes with example programs which demonstrate how to write to and read from databases using SQL.
    J.R. Allen

  • How to set the field object's persence to "visible (Screen only)" by JavaScript?

    Dear all,
    I 'm new for designing Livecycle Form. As the title I mentained above, I only know the persence of field object can be configured by the JS code.
    for example: this.presence = "visible";
                      or this.presence = "hidden"; ....
    However, I want to configure the field object to visible (Screen only) by code. I had search all related key word, but I cannot find any information about this.
    Question:
             1. Are there any code in javascript to do that? Or any way to do this by code?

    Jack,
    I dont get your question, can you explain it again.
    M just curious to knw the Question
    Thanks & Regards
    Sunil Gupta

  • How to make Image Field readonly or any other substitute solution

    Hi,
    What is the attribute or property to make an image field in a form read only.
    It is an image field only,not just an image, because I need events on clicking that image.
    But the problem is that when I render the image in the form, when user clicks it shown a browse icon to upload an image in that place. I dont want that to happen. The image by itself should be display only, but I want to process events like "on click"
    Thanks,
    Harish

    Hi,
    U can change the access of any field to read-only using the scripting language "FormCalc". The syntax is:
    in the docReady event of the form:
    <path of the UI field>.access = "readOnly";
    for further info on scripting in Interactive forms:
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    Hope this helps you.
    Regards,
    Poojith MV

  • How to get the field type from the database dictionary in screen painter

    hi,
    I wanted to create a new input field that input field should have the data element from the structure that i have created. How to get the data field type from the database dictionary in the screen painter

    hi
    good
    there is two kinds of evernt
    PROCESS ON HELP-REQUEST
    PROCESS ON VALUE-REQUEST.
    which ll help you to give two types of help one is f1 help and another one is f4 help
    go through this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/47/e07f622b9911d2954f0000e8353423/content.htm
    thanks
    mrutyun

  • How To Store dom4j.Document Object in MySQL Database?

    Hi Everyone, i am currently using dom4j to create an xml document object i wish to hold the object in a mysql database using jdbc, however the document object does not implement serializable, i am having difficulty in storing the document object as a BLOB object within the database, any suggestions?
    any help or advice would be greatly appreciated
    Thanks

    Convert the Document object to String and store the XML string in MySQL database.

  • How to Assign Image field in crystal report through Image UDF

    Hi All,
    I want to capture the Image UDF in crystal report. How can i assign the field in report.
    Can any body help me.
    regards,
    Kiran Kumar

    Hi kiran Kumar,
    IPost a message to SAP Businessone Reporting & Printing Forum
    and also check this link
    Re: SAP Business One and Crystal Reports
    Image Type In Crystal Report
    Regards
    Jambulingam.P
    Edited by: Jambulingam P on Jun 19, 2009 8:22 AM

  • Creating a new cell factory, how to bind to my object's property

    As near as I can tell, the javafx binding using observable values, alot like jgoodies and its not like SWT databinding or WPF binding.
    I was creating a cell factory for a TreeView. Just using a label to display the contents and calling toString, alot like the way it works now. However, I could not figure out to create a binding that would bind to a property on my domain object. Is there a way to specify the binding to the Label's text property so that whatever object that the cell's item's value has I can bind to a property that I specify on it e.g. the "name" property. But I could not see how to do that. Also, the only way I could figure out how to update the Label's value was from updateItem. I thought maybe I could even setup the binding in updateItem so that when the TreeItem's value changed at least it would automatically update the label binding, but the API did not seem to support that.
    What's the right coding pattern to use when using straight Java coding?
    I know in jgoodies I could do this using the PresentationModel approach or master-detail SWT or WPF with just specifying the property on the item's property that I want in WPF.
    public static class MyTreeCell extends TreeCell<Object> {
              Label label;
              public MyTreeCell() {
                   label = new Label();
                   setNode(label);
              @Override
              public void updateItem(TreeItem<Object> arg0, boolean arg1) {
                   if (arg0 != null && arg0.getValue() != null) {
                        System.out.println("New value: " + arg0.getValue());
                        label.setText(arg0.getValue().toString());
                   } else {
                        System.out.println("New value is null and this println is called alot, why is that?");
                   super.updateItem(arg0, arg1);
         }

    Well the presentation model thing worked fine and I have some machinery for the cell factory/cell item to obtain a tree cell based on the domain object type (a template/factory is placed into the properties in the scenegraph hierarchy). But its not smooth yet and the pattern does not quite translate well into javafx. Because the cell factory produces cells that could be used for a variety of domain object types, all the logic gets pushed down to the treecell subclass which makes it messy. Maybe this is where CSS selectors need to come in, you specify the class of a tree cell for a specific domain object type and you can set that at the root of the application so it cascades. I'll see if this approach works.
    Here's the code for the javafx version of jgoodies' presentation model, less the corner cases. This allows you to bind to a property and change the bean underneath that the property accesses. I'm not convinced that having properties has observable values directly on the objects is the right model for javafx because of the coupling to the actual object the property represents. Sometimes, you need to represent the property concept separate from the actual object instance. Maybe this already exists in the library.
          * An object binding object that creates object bindings based on property
          * names specified as strings. This is a convenience class. Generally, the
          * return values from <code>getProperty()</code> should be used for binding
          * not the factory itself. The object should be a domain object bean with
          * bean methods to get or set the value using java bean naming conventions.
          * When the bean itself changes, the properties fire to indicate that their
          * values may have changed and the observing object should update itself.
          * <p>
          * This only handles reading bean properties. Need to add set() logic.
          * <p>
          * TODO: Make this work better. Many corner cases to cover. Include PCL.
         public static class BeanBindingFactory<T> extends ObjectBinding<T> {
              T bean;
              Map<String, CaptiveObjectProperty> properties = new HashMap<String, CaptiveObjectProperty>();
              public Property getProperty(String property) {
                   if (property == null || property.isEmpty())
                        throw new IllegalArgumentException("Property cannot be null");
                   if (properties.containsKey(property))
                        return properties.get(property);
                   CaptiveObjectProperty p = new CaptiveObjectProperty(this, property);
                   properties.put(property, p);
                   return p;
              public void setBean(T bean) {
                   this.bean = bean;
                   for (CaptiveObjectProperty p : properties.values()) {
                        p.invalidate();
                   fireValueChangedEvent();
              public T getBean() {
                   return bean;
              @Override
              protected T computeValue() {
                   return bean;
               * Lazily get the method representing the property.
               * @author Mr. Java
               * @param <T>
              protected static class CaptiveObjectProperty<T> extends
                        ObjectPropertyBase<T> {
                   String property;
                   Method m;
                   BeanBindingFactory factory;
                   public CaptiveObjectProperty(BeanBindingFactory factory,
                             String property) {
                        this.property = property;
                        this.factory = factory;
                   @Override
                   public Object getBean() {
                        if (factory == null || factory.getBean() == null)
                             return null;
                        return factory.getBean();
                   @Override
                   public T getValue() {
                        if (m == null) {
                             m = getMethod();
                        if (m == null)
                             return null;
                        try {
                             Object rval = m.invoke(factory.getBean());
                             return (T) rval;
                        } catch (Exception e) {
                             e.printStackTrace();
                        return null;
                   @Override
                   public String getName() {
                        return property;
                    * Invalidate the method. Perhaps the bean changed to another object
                    * and we should find the method on the new object.
                   public void invalidate() {
                        m = null;
                        fireValueChangedEvent();
                   protected Method getMethod() {
                        if (factory == null || factory.getBean() == null)
                             return null;
                        String methodName = "get"
                                  + Character.toUpperCase(getName().charAt(0));
                        if (getName().length() > 1)
                             methodName += getName().substring(1);
                        try {
                             Method mtmp = factory.getBean().getClass()
                                       .getMethod(methodName, new Class<?>[0]);
                             return mtmp;
                        } catch (Exception e) {
                             e.printStackTrace();
                        return null;
         }

  • How to bind a complex object to a composite component

    I'm using JSF2 and having an issue binding an object (EL Expression) as a parameter to my composite component.
    I have written a composite component (not very complex) that will display a drop-down list of countries and should bind the selection to a provided target bean.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:composite="http://java.sun.com/jsf/composite"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
    <!-- INTERFACE -->
    <composite:interface>
    <composite:attribute name="label" required="true" />
    <composite:attribute name="requiredMessage" required="true"/>
    <composite:attribute name="target" required="true" type="com.mycompany.entity.Country"/>
    </composite:interface>
    <!-- IMPLEMENATION -->
    <composite:implementation>
    <h:panelGrid columns="2">
    <h:outputLabel for="country-list" value="#{cc.attrs.label}"/>
    <h:panelGrid id="country" columns="1" styleClass="select-one-menu-panel" >
    <h:selectOneMenu id="country-list"
    enabledClass="select-one-menu-enabled" disabledClass="select-one-menu-disabled"
    layout="pageDirection"
    value="#{cc.attrs.target}"
    required="true" requiredMessage="#{cc.attrs.requiredMessage}"
    >
    <f:selectItem itemLabel="#{msgs['label.pleaseSelect']}" itemValue="" />
    <f:selectItems value="#{countryController.countries}" />
    <a4j:ajax />
    </h:selectOneMenu>
    <a4j:outputPanel id="country-list-error-panel" ajaxRendered="true">
    <h:message id="country-list-error" for="country-list" style="color:red"/>
    </a4j:outputPanel>
    </h:panelGrid>
    </h:panelGrid>
    </composite:implementation>
    </html>
    I want to be able to use the composite component in the following way:
    <util:country-select
    label="#{msgs['label.countryOfBirth']}"
    requiredMessge="#{msgs['error.birthCountryRequired']}"
    target="#{participant.countryOfBirth}"/>
    When I load the page everything renders correctly, but when I select an item from the drop-down I get a validation error.
    apply-form:j_idt77:country-list: Validation Error: Value is not valid
    I know that it must be something with the way that I have the parameters defined but I simply can't find any information to help me figure this out.
    Any light that you might be able to she on this would be greatly appreciated.
    Thank you for the help...

    Hi,
    well, you can. What the ADF Data Control and thus the binding gives you is the JSF component binding and the business service access.
    If you don't want to use ADF, then what you can do is
    - Create an ADF BC root Application Module from a managed bean
    e.g. see http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcservices.htm#CHDDDBFC
    - Access the View Object for querying the data to display
    - Expose the queried data so the component can handle it e.g. setter/getter for input components, ArrayList for tables (or you create the more complex component models like table and tree models)
    Having outlined the above, here are some gotchas to watch out for
    - Make sure creating the root application module is done such that you don't create/release it with each request. So you may consider a data serving managed bean in a scope like page flow or session
    - Ensure you have helper methods that allow you to query and CRUD operate the View Object data
    Frank

  • How to bind a String object to java:comp/env name space?

    Hi, does anybody know how to declare a String as a JNDI object in OC4J V904. I want to register a String named 'Foo' with the value 'val' with JNDI. Eventually I want to get the value of this by referencing this JNDI name:
    java:comp/env/ejb/Foo
    I don't really care how this is done either by declaring it by way of ejb-jar.xml or a global setting at the application server level.
    Please assist!
    Thanks
    J

    There are many possible ways.
    - (BEST) Use the J2EE resource environment variable mechanism (ie resource-env-ref in ejb-jar.xml).
    - (MEDIUM) Use OC4J startup classes.
    - (IF ELSE FAILS) Use the InitialContext.rebind method.

  • How to bind Hibernate domain objects to the UI layer

    Dear All,
    I am trying to bind FX UI controls to properties of a Hibernate Domain object. Is there any good example to refer to for this purpose?
    Thanks & Regards,
    Nitin Gupta

    Assuming you do not formulate your hibernate objects as pojos with javafx properties directly, if the hibernate object is a pojo with or without PCL, you can convert the properties of the pojo to observable values (or properties) directly. These are used in a bind statement.
    Check out what jgoodies does with BeanAdapter or PresentationModel. You need the same concept. I've attached a class that does this for a pojo already (its an incomplete port of jgoodies PresentationModel). It will work for any pojo. It does not have setter support as it was just a demonstration. Its efficient for a pojo with a large number of properties. You could also write a very short property connector to produce one observable value per property. The value of the class below is to be able to swap out the bean being observed without having to change or reset the property observable values each time. Bind once and then just reset the bean (think master detail).
    package scenegraphdemo;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import java.lang.reflect.Method;
    import java.util.HashMap;
    import java.util.Map;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.ObjectPropertyBase;
    import javafx.beans.property.Property;
    import javafx.beans.property.StringProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.beans.value.WritableValue;
    * An object binding object that creates object bindings based on property names
    * specified as strings. This is a convenience class to avoid having observable
    * values directly dependent on the underlying bean. The actual bean the
    * properties connect can be changed dynamically using the channel or
    * <code>setBean</code>. This allows you to setup binding when you don't have
    * the bean to bind to or the bean to bind to will change as in the detail part
    * of a master-detail screen. Generally, the return values from
    * <code>getProperty()</code> should be used for binding not the factory itself.
    * The object should be a domain object bean with bean methods to get or set the
    * value using java bean naming conventions OR it should use javafx property
    * definition conventions. The factory will automatically listen for standard
    * java bean changes using <code>PropertyChangeListener</code> approaches unless
    * you indicate to not to.
    * <p>
    * When the bean itself changes, the properties fire to indicate that their
    * values may have changed and the observing object should update itself. This
    * object allows you to integrate your javafx/POJOs into the binding
    * infrastructure without being dependent on the actual underlying bean. If you
    * are familiar with jgoodies <code>BindingAdapter</code> this is a similar
    * class.
    * <p>
    * This only handles reading bean properties. Need to add set() logic.
    * <p>
    * TODO: Make this work better. Many corner cases to cover.
    * <p>
    * TODO: Instead of just method calls on POJOs, also check for PCL. Note that
    * javafx properties won't work easily they are always tied to the underlying
    * object so I would have to write another CaptiveObjectProperty object that is
    * essentially a delegator.
    public class BeanPropertyFactory<T> extends ObjectProperty<T> {
         ObservableValue<T> channel;
         Map<String, CaptiveObjectProperty> properties = new HashMap<String, CaptiveObjectProperty>();
         boolean listenForBeanPCLEvents = true;
         public boolean isListenForBeanPCLEvents() {
              return listenForBeanPCLEvents;
         public void setListenForBeanPCLEvents(boolean listenForBeanPCLEvents) {
              this.listenForBeanPCLEvents = listenForBeanPCLEvents;
              if (getBean() != null)
                   removeBeanPCLListener(getBean());
          * The bean channel where the bean is obtained.
          * @return
         public ObservableValue<T> getChannel() {
              return channel;
         public BeanPropertyFactory() {
              setChannel(new ObjectProperty());
         public BeanPropertyFactory(ObservableValue<T> channel) {
              if (channel == null)
                   setChannel(new ObjectProperty());
              else
                   setChannel(channel);
         protected void setChannel(ObservableValue<T> channel) {
              if (this.channel != null) {
                   removeBeanChangeListener(this.channel);
              this.channel = channel;
              if (this.channel != null) {
                   addBeanChangeListener(this.channel);
                   updateStringProperty(getBean());
              invalidateProperties();
              fireValueChangedEvent();
         protected StringProperty stringProperty = new StringProperty();
          * The string property is an observable toString property. It cannot be set.
          * @return
         public StringProperty beanStringProperty() {
              return stringProperty;
         public String getBeanString() {
              return beanStringProperty().getValue();
          * A listener that listens to changes in the bean channel. This only fires
          * when the bean changes not when the properties on the bean change. The
          * default actions updates the "string" property representation of this
          * object as well as attaches property change listeners.
          * @author Mr. Java
         protected class BeanChangeListener implements ChangeListener {
              @Override
              public void changed(ObservableValue arg0, Object arg1, Object arg2) {
                   if (arg1 != null) {
                        BeanPropertyFactory.this.removeBeanPCLListener(arg1);
                   if (arg2 != null) {
                        BeanPropertyFactory.this.addBeanPCLListener(arg2);
                   updateStringProperty(arg2);
         protected void updateStringProperty(Object obj) {
              if (obj != null)
                   beanStringProperty().setValue(obj.toString());
              else
                   beanStringProperty().setValue("null");
         protected void removeBeanChangeListener(ObservableValue<T> obj) {
              if (beanChangeListener == null)
                   beanChangeListener = createBeanChangeListener();
              if (obj != null) {
                   obj.addListener(beanChangeListener);
         protected void addBeanChangeListener(ObservableValue<T> obj) {
              if (beanChangeListener == null)
                   beanChangeListener = createBeanChangeListener();
              if (obj != null)
                   obj.removeListener(beanChangeListener);
          * The instance of a change listener for detecting when the bean in the bean
          * channel changes.
         ChangeListener beanChangeListener = new BeanChangeListener();
          * Subclass can override to create their bean change listener.
          * @return
         protected ChangeListener createBeanChangeListener() {
              return new BeanChangeListener();
         public BeanPropertyFactory(T bean) {
              setChannel(new ObjectProperty(bean));
         public Property getProperty(String property) {
              if (property == null || property.isEmpty())
                   throw new IllegalArgumentException("Property cannot be null");
              if (properties.containsKey(property))
                   return properties.get(property);
              CaptiveObjectProperty p = new CaptiveObjectProperty(this, property);
              properties.put(property, p);
              return p;
         @Override
         public T getValue() {
              return getBean();
          * A listener that listens for property change events on the bean. When the
          * bean changes, the listener must be removed then attached to the new bean
          * but can use the same instance of this class. The action is to inform any
          * existing property objects that the property has changed. The detection of
          * property changes is centralized in the factory class for efficiency.
         protected class BeanPropertyListener implements PropertyChangeListener {
              @Override
              public void propertyChange(PropertyChangeEvent evt) {
                   if (properties.containsKey(evt.getPropertyName())) {
                        CaptiveObjectProperty p = properties.get(evt.getPropertyName());
                        p.propertyChanged();
                   updateStringProperty(getBean());
          * The cached listener instance to listen to the bean (in the bean channel)
          * property change events if it supports PCL.
         PropertyChangeListener beanPropertyListener;
          * Subclasses can override to implement their own behavior. Its best to
          * extend from <code>BeanPropertyListiner</code> to include the default
          * behavior.
          * @return
         protected PropertyChangeListener createBeanPropertyListener() {
              return new BeanPropertyListener();
          * Add a listener only if the PCL methods exist. This listens for property
          * changes on the bean's property not changes in the actually bean held by
          * the bean channel.
         protected void addBeanPCLListener(Object obj) {
              if (!isListenForBeanPCLEvents())
                   return;
              if (obj != null) {
                   if (BeanPropertyUtils.hasPCL(obj.getClass())) {
                        if (beanPropertyListener == null)
                             beanPropertyListener = createBeanPropertyListener();
                        BeanPropertyUtils.addPCL(obj, beanPropertyListener, null);
          * Remove a listener only if the PCL methods exist.
          * @see #attachBeanPCLListener
         protected void removeBeanPCLListener(Object obj) {
              if (obj != null) {
                   if (BeanPropertyUtils.hasPCL(obj.getClass())) {
                        if (beanPropertyListener == null)
                             beanPropertyListener = createBeanPropertyListener();
                        BeanPropertyUtils.removePCL(obj, beanPropertyListener, null);
          * Invalidate the properties in the property cache. Then changed the bean in
          * the bean channel. Then fire a value changed event.
          * @param bean
         public void setBean(T bean) {
              invalidateProperties();
              if (getChannel() instanceof WritableValue) {
                   ((WritableValue) getChannel()).setValue(bean);
              } else {
                   throw new IllegalArgumentException(
                             "Could not set bean value into a non-writable bean channel");
              fireValueChangedEvent();
          * Called to indicate that the underlying bean changed.
         protected void invalidateProperties() {
              for (CaptiveObjectProperty p : properties.values()) {
                   p.invalidate();
         public T getBean() {
              return getChannel().getValue();
          * Lazily get the method representing the property prior to getting or
          * setting. Because this is a property, it can also be bound to.
          * @author Mr. Java
          * @param <T>
         protected static class CaptiveObjectProperty<T> extends
                   ObjectPropertyBase<T> {
               * The string name of the property.
              String readPropertyName, writePropertyName;
               * If the property is really a javafx property, it is stored here.
              Property<T> enhancedProperty;
               * Used if the property is not an enhanced property.
              Method readMethod, writeMethod;
               * The factory that holds the bean we obtain values against.
              BeanPropertyFactory factory;
              public CaptiveObjectProperty(BeanPropertyFactory factory,
                        String property) {
                   this.readPropertyName = property;
                   this.factory = factory;
              public CaptiveObjectProperty(BeanPropertyFactory factory,
                        String property, String writePropertyName) {
                   this.readPropertyName = property;
                   this.writePropertyName = writePropertyName;
                   this.factory = factory;
              @Override
              public Object getBean() {
                   if (factory == null || factory.getBean() == null)
                        return null;
                   return factory.getBean();
              @Override
              public void store(T value) {
                   if (writeMethod == null && enhancedProperty == null) {
                        getWriteMethod(value.getClass());
                   if (writeMethod == null && enhancedProperty == null) {
                        return;
                   try {
                        if (enhancedProperty != null) {
                             enhancedProperty.setValue(value);
                             return;
                        if (getBean() == null)
                             return;
                        writeMethod.invoke(getBean(), value);
                        return;
                   } catch (Exception e) {
                        e.printStackTrace();
              @Override
              public T getValue() {
                   if (readMethod == null && enhancedProperty == null) {
                        getReadMethod();
                   if (readMethod == null && enhancedProperty == null)
                        return null;
                   try {
                        if (enhancedProperty != null)
                             return enhancedProperty.getValue();
                        if (factory.getBean() == null)
                             return null;
                        Object rval = readMethod.invoke(getBean());
                        return (T) rval;
                   } catch (Exception e) {
                        e.printStackTrace();
                   return null;
              @Override
              public String getName() {
                   return readPropertyName;
               * Invalidate the method. Perhaps the bean changed to another object and
               * we should find the method on the new object. This is called prior to
               * the <code>getBean()</code> being changed.
              public void invalidate() {
                   readMethod = null;
                   fireValueChangedEvent();
               * This is used to externally signal that the property has changed. It
               * is quite possible that this object does not detect those changes and
               * hence, an external object (in all cases the BeanPropertyFactory) will
               * signal when a change occurs. Property change detection is centralized
               * in the factory for efficiency reasons.
              public void propertyChanged() {
                   fireValueChangedEvent();
              protected Property getJavaFXReadProperty(String propertyName) {
                   if (factory.getBean() == null)
                        return null;
                   String methodName = getName() + "Property";
                   try {
                        Method mtmp = factory.getBean().getClass()
                                  .getMethod(methodName, new Class<?>[0]);
                        enhancedProperty = (Property) mtmp.invoke(factory.getBean(),
                                  new Object[0]);
                        return enhancedProperty;
                   } catch (Exception e) {
                        // e.printStackTrace();
                        // silently fail here
                   return null;
              protected void getWriteMethod(Class<?> argType) {
                   if (factory == null || factory.getBean() == null)
                        return;
                   if (enhancedProperty == null)
                        enhancedProperty = getJavaFXReadProperty(getName());
                   if (enhancedProperty != null)
                        return;
                   writeMethod = getPojoWriteMethod(getName(), argType);
               * Sets the method, either an enhanced property or the POJO method via
               * reflection.
               * @return
              protected void getReadMethod() {
                   if (factory == null || factory.getBean() == null)
                        return;
                   enhancedProperty = getJavaFXReadProperty(getName());
                   if (enhancedProperty != null)
                        return;
                   // Look for standard pojo method.
                   readMethod = getPOJOReadMethod(getName());
               * Return a get method using reflection.
               * @param propertyName
               * @return
              protected Method getPOJOReadMethod(String propertyName) {
                   if (factory.getBean() == null)
                        return null;
                   // Look for standard pojo method.
                   String methodName = getGetMethodName();
                   try {
                        Method mtmp = factory.getBean().getClass()
                                  .getMethod(methodName, new Class<?>[0]);
                        return mtmp;
                   } catch (Exception e) {
                        // silently fail here
                        // e.printStackTrace();
                   return null;
              protected String getGetMethodName() {
                   String methodName = "get"
                             + Character.toUpperCase(getName().charAt(0));
                   if (getName().length() > 1)
                        methodName += getName().substring(1);
                   return methodName;
               * Return a set method using reflection.
               * @param propertyName
               * @param argType
               * @return
              protected Method getPojoWriteMethod(String propertyName,
                        Class<?> argType) {
                   if (factory.getBean() == null)
                        return null;
                   String methodName = getSetMethodName();
                   try {
                        Method mtmp = factory.getBean().getClass()
                                  .getMethod(methodName, argType);
                        return mtmp;
                   } catch (Exception e) {
                        // silently fail here
                        // e.printStackTrace();
                   return null;
              protected String getSetMethodName() {
                   String methodName = "set"
                             + Character.toUpperCase(getName().charAt(0));
                   if (getName().length() > 1)
                        methodName += getName().substring(1);
                   return methodName;
          * Obtain a property using the binding path. The binding path should be
          * simple property names separated by a dot. The bean has to specified
          * because the return value is a property that can be used directly for
          * binding. The first property specified in the binding path should be a
          * property on the bean.
          * <p>
          * The difference between this and <code>Bindings.select()</code> is not
          * much other that it uses the bean factory machinery and the path can be
          * specified as a string. Of course, the bean can be a plain pojo.
          * @param bindingPath
          * @return
         public static Property propertyFromBindingPath(Object bean,
                   String bindingPath) {
              if (bindingPath == null || bindingPath.isEmpty())
                   return null;
              BeanPropertyFactory lastFactory = null;
              Property lastProperty = null;
              String[] parts = bindingPath.split("\\.");
              if (parts.length > 0) {
                   for (int i = 0; i < parts.length; i++) {
                        if (parts.length() <= 0 || parts[i].isEmpty()) {
                             throw new IllegalArgumentException("Binding path part " + i
                                       + " has no length");
                        BeanPropertyFactory newFactory;
                        if (i == 0)
                             newFactory = new BeanPropertyFactory(bean);
                        else
                             newFactory = new BeanPropertyFactory(
                                       (WritableValue) lastProperty);
                        lastProperty = newFactory.getProperty(parts[i].trim());
                        lastFactory = newFactory;
              return lastProperty;
         * Alot like <code>Bindings.select</code> but also handles pojos.
         * @param bean
         * @param path
         * @return
         public static Property propertyFromBindingPath(Object bean, String... path) {
              String tmp = "";
              for (int i = 0; i < path.length; i++) {
                   tmp += path[i];
                   if (i <= path.length - 1)
                        tmp += ".";
              return propertyFromBindingPath(bean, tmp);
    and a supporting classpackage scenegraphdemo;
    import java.beans.PropertyChangeListener;
    * Static methods for manipulating PCL for standard java beans.
    * @author Mr. Java
    public class BeanPropertyUtils {
         protected final static Class<?>[] NO_ARGS = new Class<?>[] { PropertyChangeListener.class };
         protected final static Class<?>[] ARGS = new Class<?>[] { String.class,
                   PropertyChangeListener.class };
         protected final static String pclAddMethodName = "addPropertyChangeListener";
         protected final static String pclRemoveMethodName = "removePropertyChangeListener";
         * Return true if the class has PCL methods. Does not check for remove.
         * <p>
         * addPropertyChangeListener(PropertyChangeListener)
         * <p>
         * addPropertyChangeListener(String, PropertyChangeListener)
         * @param bean
         * @return
         public static boolean hasPCL(Class<?> clazz) {
              try {
                   if (clazz.getMethod(pclAddMethodName, NO_ARGS) != null) {
                        return true;
              } catch (Exception e) {
                   // silently fail
              try {
                   if (clazz.getMethod(pclAddMethodName, ARGS) != null) {
                        return true;
              } catch (Exception e) {
                   // silently fail
              return false;
         * Add a listener.
         * @param bean
         * @param listener
         * @param propertyName
         public static void addPCL(Object bean, PropertyChangeListener listener,
                   String propertyName) {
              try {
                   if (propertyName == null) {
                        bean.getClass().getMethod(pclAddMethodName, NO_ARGS)
                                  .invoke(bean, new Object[] { listener });
                   } else {
                        bean.getClass()
                                  .getMethod(pclAddMethodName, ARGS)
                                  .invoke(bean,
                                            new Object[] { propertyName, listener });
              } catch (Exception e) {
                   e.printStackTrace();
         * Remove a listener.
         * @param bean
         * @param listener
         * @param propertyName
         public static void removePCL(Object bean, PropertyChangeListener listener,
                   String propertyName) {
              try {
                   if (propertyName == null) {
                        bean.getClass().getMethod(pclRemoveMethodName, NO_ARGS)
                                  .invoke(bean, new Object[] { listener });
                   } else {
                        bean.getClass()
                                  .getMethod(pclRemoveMethodName, ARGS)
                                  .invoke(bean,
                                            new Object[] { propertyName, listener });
              } catch (Exception e) {
                   e.printStackTrace();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

  • How to make a field Identity in Access Database

    Hi All,
    Attached is the screenshot which has a split form and if we are in the middle of entering a new record in the datasheet below it creates a new record already and gives the same ID to the next one,so while entering the next record the number again will be
    7 instead of 8. However if i make the form a single form instead of a split form it works fine. 
    My code for Default Value of "ClaimRecoveryID" is
    =IIf(IsNull(DLookUp("Max([ClaimRecoveryID]) + 1 ","[ClaimRecovery]")),1,DLookUp("Max([ClaimRecoveryID]) + 1 ","[ClaimRecovery]"))   ( where ClaimRecovery is the name of the table and i think its giving
    the next record as the 7 is not yet in the system. Can someone please help me on how to change my code.

    To do that, you would need to assign the number before saving the record. As I mentioned, that is not a good idea in a multi-user environment.
    If one user starts a record and you immediately assign the new number, it is not saved yet. Then another user starts a new record they would be assigned the same number, because that number will not yet exist in the table. Before saving the record, you could
    check to see if the number already exists and change it, but that would defeat your purpose of displaying it immediately. The user would see 9 and it would change to 10.
    If multi-user is not a problem, then move the line Me!ClaimRecoveryID = nz(DMax("ClaimRecoveryID", "ClaimRecovery"),0)+1 to the before insert event of the form.
    I am also guessing that you are using this method of generating the number because you don't want any gaps in the numbering sequence. Should that not be the case, then simply change the field to an autonumber and you won't need any code. However, there will
    eventually be gaps in the numbering sequence.

Maybe you are looking for

  • Gallery (video) not playing in mobileme

    Hello, Iphone 3GS, account me.com. Safari iPhone: http://gallery.me.com/myusername > opening gallery mme > select one (video) > "Unable to read the movie, the server is not correctly configured" (I translate from french ). Why ? For pictures it works

  • On content server

    I am facing an error on the content server which is as follows : HTTP error: 500 (Internal Server Error) "CreateTab ContentStorage, connect error SQLConnect failed, [Microsoft][ODBC Driver Manager] Data s Anybody help me . please its urgent. VIKRAM

  • Display dead ?

    Hi, my N900 ran out of power and after a hours (actually i left the device on my desk over night) i recharged the device - but Problem is that it seems the Display is not working or not even starting (not sure which one of this 2 When i turn on the d

  • WLC 7.6.130, Airplay issues.

    Afternoon fella's...  I had previously setup the Bonjour gateway and everything seemed to be running with out a hitch, but now not so much. In testing, on a single controller, running 7.6.130 code, I can not for the life of me get an iPad to see the

  • Not printing 'anwers' for calculations / formulas where no input values were given

    i have successfully created a document with formulas.  when i print the document, i want 'answers' of calculations where no values were put in, NOT TO PRINT (currently all 'answers' with no values put in print as '0'.  this makes the document look un