Bean Introspection

A class containing some methods and EventListeners.By introspection I want to get only the methods and EventListeners.
But MethodDescriptor is returning all the things while EventSetDescriptor returning nun of these.
How to get name of the EventListener ???
//this is the Bean Class
public interface MySampleResource
extends Resource
// Properties
// =============================================================================================
* Return the value of the PropertyX property, which has an integer value.
* This is a read only property and has one to one relationship with a
* field.
* <p>
* Although the resource exposes a normal getter, the application programmer
* has to keep in mind, that the property value might be unavailable in a
* distributed environment (for various reasons) and that the
* ResourceExceptions thrown have to be handled in the proper way.
* @throws ResourceException - if the value is not immediately available.
public int getPropertyX ()
throws ResourceException;
* Return the value of PropertyY. This is a read/write property and has one
* to one relationship with a field.
public int getPropertyY ()
throws ResourceException;
* TODO SAUK: add a function abstract.
public int getPropertyZ ()
throws ResourceException;
// public int setPropertyZ (int x)
// throws ResourceException;
* Set the value of PropertyY property.
* <p>
* Setting a property value (like other method calls also) in a distributed
* environment is only possible in the backend end (provider side), i.e. the
* setter has to be relayed to that end.
* <p>
* Since during that remote invocation things can go wrong with the call
* itself (not the backend function as such) the setter might throw related
* ResourceExceptions.
public void setPropertyY (int aValue)
throws ResourceException;
// Method calls
// =============================================================================================
* TODO SAUK: add a function abstract.
public void functionX (int anIntArgument)
throws ResourceException;
* TODO SAUK: add a function abstract.
public String functionY (String aStringArgument)
throws ResourceException;
* TODO SAUK: add a function abstract.
public void functionZ (int anIntArgument, String aStringArgument)
throws ResourceException;
// Event Generation Infrastructure
// =============================================================================================
* Add aListener to the list of all listeners for this resource.
public void addMySampleResourceListener (MySampleResourceListener aListener);
* Remove aListener from the list of listeners of this resource.
public void removeMySampleResourceListener (MySampleResourceListener aListener);
//while I am attempting the following code
BeanInfo beanInfo = Introspector.getBeanInfo(c);
EventSetDescriptor[] eventSetDescriptor = beanInfo.getEventSetDescriptors();
for (int i = 0; i < eventSetDescriptor.length; i++)
System.out.println("Event Name: " + eventSetDescriptor.getName());
//why it is not working ????

Okay, that would be your problem.
Your interface MySampleResourceListener MUST extend EventListener or some other subinterface of EventListener, or the Introspector will simply ignore it. You can check this yourself. The method of the introspector that checks this is called getTargetEventInfo. You should be able to find it in the source for the introspector.
It contains an if structure on the line isSubclass(listener, EventListenerType), where listener is the type of listener it's inspecting (i.e. the MySampleResourceListener), EventListenerType is EventListener.class, and isSubclass is a routine to check if listener is a subclass (or subInterface) of EventListenerType.
The solution is this: simply extend EventListener.
From Java API: (EventListener is) A tagging interface that all EventListeners MUST extend.
Give that a try, and see if it works for you. Good Luck!

Similar Messages

  • Bean Introspection in jsp

    can Bean Intrspection help me to save the uploaded file ?
    I am using a html form which contains few employee information with a upload field for employee's picture. now i want to know, is it possible to save the uploaded image(jpg) into java bean like other properties ?

    I am using a html form which contains few employee
    information with a upload field for employee's
    picture. now i want to know, is it possible to save
    the uploaded image(jpg) into java bean like other properties ?Basically, if I read your problem correctly...you have a form which contains few normal text/form fields + a file to be uploaded? This is a problem concerning Multipart Http Request. Yes you can do it in JSP/Servlet. b.t.w., Struts handles it very well. Google for "Multipart Request FileUpload Servlet"
    -BJ

  • Command link not working for project on deployment as ear file

    Hi Jdev team / Jheadstart team,
    Its a very strange problem i am facing ..
    I have two screen with the same VO showing the details records split in two pages ( Master/ details)
    it shows a table structure in the firts screen and on clicking through the command link shows the details in the secong page .
    its working fine on the LOCAL machine ( JDEV) but once the ear file is deployed to the server it gives the follwing exception :
    07/08/08 09:01:23 [1681] *** Using bean introspection to lookup value :currentRowIndexInRange
    07/08/08 09:01:23 [1682] Key(String, AttributeDef[]): Invalid Key String found. AttributeCount:31599 does not match Key attributes
    07/08/08 09:01:23 [1683] DCBindingContainer.reportException :oracle.jbo.InvalidParamException
    07/08/08 09:01:23 [1684] oracle.jbo.InvalidParamException: JBO-25006: Invalid parameter value 7B6F7E6F7BF9747D for String passed to method Constructor:Key. Explanation: {3}     
    at oracle.jbo.Key.parseBytes(Key.java:489)
         at oracle.jbo.Key.<init>(Key.java:183)
         at oracle.adf.model.bc4j.DCJboDataControl.setCurrentRowWithKey(DCJboDataControl.java:863)
    Secondly when i use the button instead of the command link it works fine on the machine and deployed on server.
    Please tell me is it some thing to take care in the bindings files when regenerating through Jheadstart
    (I am using JHeadstart, Jdev 10.1.3) and regenerating using AMApplication Generator file.
    the bindings its generating in both cases (command links / button )are :
    <action id="setCurrentRowWithKeySmeFundingAdviser"
    IterBinding="SmeFundingAdviserIterator"
    InstanceName="SmeFundingAdviserFirmsAMDataControl.XXSmeFundingAdviserVO1"
    DataControl="SmeFundingAdviserFirmsAMDataControl"
    RequiresUpdateModel="false" Action="96">
    <NamedData NDName="rowKeyStr" NDValue="#{row.rowKeyStr}" NDType="java.lang.String"/>
    Please its very urgent .....
    regards
    Jazz

    Use the uninstall scripts from Adobe to completely remove all vestiges of PPro from your computer. Then perform the installation.
    Links to the scripts are on the troubleshooting page.
    Cheers
    Eddie

  • How to validate a date in date picker

    Dear All,
    ADF BC and ADF faces page, in the page there is a date picker field where i need to apply validation(i.e. select date is greater than the sysdate), i added a validation in the entity object on the corresponding field, using a compare validator, operator: Less Than, compare with: Query Result, sql statement: select sysdate from dual
    when the page is commited, i got the following errors, anybody any idea? thank you!
    07/09/03 18:18:32 [584] oracle.jbo.common.JboAssert: (Assertion Failed)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:338)
         at oracle.jbo.server.util.Variant.compareTo(Variant.java:1225)
         at oracle.jbo.server.rules.JboCompareValidator.validateValue(JboCompareValidator.java:171)
    07/09/03 18:18:32 [585] *** Using bean introspection to lookup value :currentRowIndexInRange
    03-sep 18:18:32 DEBUG (JhsPageLifecycle) -executing processModelUpdaters
    03-sep 18:18:32 DEBUG (JhsCollectionModel) -DocumentsCollectionModel: Executing processNewRows
    03-sep 18:18:32 DEBUG (JhsCollectionModel) -DocumentsCollectionModel: DocumentsTable new row 0 ignored, no attributes updated.
    03-sep 18:18:32 DEBUG (JhsPageLifecycle) -executing validateModelUpdates
    03-sep 18:18:32 DEBUG (JhsPageLifecycle) -executing onCommit
    07/09/03 18:18:32 [586] DCBindingContainer.reportException :oracle.jbo.TxnValException
    07/09/03 18:18:32 [587] oracle.jbo.TxnValException: JBO-27023: Valideren van alle rijen in een transactie is mislukt.
         at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4051)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1921)
    ## Detail 0 ##
    oracle.jbo.RowValException: JBO-27024: Valideren van rij met sleutel oracle.jbo.Key[382 ] van type Benchmarks is mislukt.
         at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:1597)
         at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4031)
    ## Detail 0 ##
    oracle.jbo.AttrValException: JBO-27025: Valideren van attribuut EstimatedComplDate met waarde 2007-08-11 is mislukt.
         at oracle.jbo.server.AttributeDefImpl.validate(AttributeDefImpl.java:1954)
         at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1866)
    P.S. some of the message are displayed in Dutch
    Message was edited by:
    Jerry Yang

    But first setLenient(false), because to my mind
    DateFormat it apt to be far too lenient
    tending to accept things like 30 Feb.A web banking application had setLenient(false). Customers would call support because they got an error message when they tried to get transaction statements for the whole month by entering April 1 - April 31.
    We changed to setLenient(true). Consider which leniency mode is right for you. And write better error messages than what we had...
    Maybe: if non-lenient fails, parse with lenient; if that succeeds, give a specific error message explaining the situation (or execute with the lenient date, and present results with a warning message "we made a guess at what you meant, check results").

  • My command link doesn't work

    hi all,
    i have a created a page where i am performing a web type search with search form and search results on the same page and i have also implemented the conditional display of search results table as directed by the ADFBC guide.
    i.e., I created a managed bean where in am setting the searchFirstTime flag. here is the code of my managed bean.
    public class UserState {
    private static final String SEARCH_FIRSTTIME_FLAG = "SEARCH_FIRSTTIME_FLAG";
    private HashMap hmUserSettings = new HashMap();
    public UserState() {
    try{
    System.out.println("setting the user settings in constructor");
    hmUserSettings.put(SEARCH_FIRSTTIME_FLAG,true);
    }catch(Exception e){
    e.printStackTrace();
    public boolean isSearchFirstTime(){
    Boolean firstTime = (Boolean)hmUserSettings.get(SEARCH_FIRSTTIME_FLAG);
    try{
    System.out.println("setting the search flag in isSearchFirstTime firstTime.booleanValue() :"+firstTime.booleanValue());
    if (firstTime == null){
    firstTime = true;
    }catch(Exception e){
    e.printStackTrace();
    return firstTime.booleanValue();
    public void setSearchFirstTime(boolean searchFlag){
    try{
    System.out.println("setting the search flag searchFlag :"+searchFlag);
    hmUserSettings.put(SEARCH_FIRSTTIME_FLAG, new Boolean(searchFlag));
    }catch(Exception e){
    e.printStackTrace();
    In the search results table one of the columns is a command link, clicking on which opens a pop up window where i have some more details being displayed.
    here is the code of my jspx page for the command link
    <af:commandLink text="#{row.OrderNumber}"
    binding="#{backing_TestDDPUD.commandLink1}"
    action="#{backing_TestDDPUD.commandLink1_action}"
    useWindow="true"
    partialSubmit="true"
    windowHeight="200"
    windowWidth="500"
    id="commandLink1"/>
    i have specified the action to be performed,in the backing bean of my page, here's the code
    public String commandLink1_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("setCurrentRowWithKey");
    Object result = operationBinding.execute();
    System.out.println("inside commandLink1_action");
    if (!operationBinding.getErrors().isEmpty()) {
    System.out.println("$$$$$$$$$$$$$$$ has errors $$$$$$$$$$$$4");
    return null;
    DCIteratorBinding ib = (DCIteratorBinding)bindings.get("OeOrderHeadersViewResultsIterator");
    Row row = ib.getCurrentRow();
    Number numHeaderId = (Number)row.getAttribute("HeaderId");
    FacesContext fc = FacesContext.getCurrentInstance();
    // 2. Create value binding for the #{data} EL expression
    ValueBinding vb = fc.getApplication().createValueBinding("#{data}");
    // 3. Evaluate the value binding, casting the result to BindingContext
    BindingContext bc = (BindingContext)vb.getValue(fc);
    // 4. Find the data control by name from the binding context
    DCDataControl dc = bc.findDataControl("TestDDAppModuleDataControl");
    // 5. Access the application module data provider
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    ViewObject vo = am.findViewObject("OeOrderLinesAllView");
    vo.setNamedWhereClauseParam("theHeaderId",numHeaderId);
    System.out.println((vo.getNamedWhereClauseParam("theHeaderId")));
    return "dialog:orderDetails";
    my problem is that now when i enter a search criteria and execute the search, the search results are displayed properly in the table but when i click on the command link it does not open the pop up window, it does not even enter into the commandlink1_action() method..here's the log which i get after i click on the command link..can somebody please tell me what is going wrong or what exactly is happening
    07/03/28 17:19:20 [363] Reusing a cached session application module instance
    07/03/28 17:21:03 [364] **** refreshControl() for BindingContainer :TestDDPUDPageDef
    07/03/28 17:21:03 [365] *** Using bean introspection to lookup value :result
    07/03/28 17:21:03 [366] Invoke method Action:999
    07/03/28 17:21:03 [367] DCInvokeMethod:Invoking TestDDAppModuleDataControl.dataProvider.setOrgPolicyContext()
    07/03/28 17:21:03 inside the setOrgPolicyContext
    07/03/28 17:21:03 blnSetOrgPolicyContext finally :true
    07/03/28 17:21:03 [368] Resolving VO:TestDDAppModule.OeOrderHeadersView for iterator binding:OeOrderHeadersViewIterator
    07/03/28 17:21:03 [369] DCUtil, RETURNING: <null> for TestDDAppModule.OeOrderHeadersView
    07/03/28 17:21:03 [370] Resolving VO:OeOrderHeadersView for iterator binding:OeOrderHeadersViewResultsIterator
    07/03/28 17:21:03 [371] DCUtil, returning:oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding, for OeOrderHeadersView
    07/03/28 17:21:03 [372] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    07/03/28 17:21:03 [373] valiateToken:Decompressed BC state:BCST:=0OeOrderHeadersViewIterator=-F-,OeOrderHeadersViewResultsIterator=-D-000100000004C30A031F,
    07/03/28 17:21:03 setting the user settings in constructor
    07/03/28 17:21:03 setting the search flag in isSearchFirstTime firstTime.booleanValue() :true
    07/03/28 17:21:03 setting the search flag in isSearchFirstTime firstTime.booleanValue() :true
    07/03/28 17:21:03 setting the search flag in isSearchFirstTime firstTime.booleanValue() :true
    07/03/28 17:21:03 [374] **** refreshControl() for BindingContainer :TestDDPUDPageDef
    07/03/28 17:21:03 [375] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    07/03/28 17:21:03 setting the search flag in isSearchFirstTime firstTime.booleanValue() :true

    hi Frank,
    i have my table inside a panel page which is already sorrounded with h:form so i cannot sorround my table again with h:form or af:form. the command link in the page was working fine, till i included the code for the conditional display of the results table. If i look at the log printed after i click on the command link, i don't see any of the sop's being printed that i have given inside the commandlink1_action() method, i have a feeling that my action method is not being called at all and i am not able to figure out why the sop in the isSearchFirstTime() method is being printed 4 times.
    here is the entire code of my .jspx
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <afh:html binding="#{backing_TestDDPUD.html1}" id="html1">
    <f:loadBundle basename="UIResources" var="res"/>
    <afh:head title="SalesOrderTemplate" binding="#{backing_TestDDPUD.head1}"
    id="head1">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    </afh:head>
    <afh:body binding="#{backing_TestDDPUD.body1}" id="body1">
    <af:messages binding="#{backing_TestDDPUD.messages1}" id="messages1"/>
    <h:form binding="#{backing_TestDDPUD.form1}" id="form1">
    <af:panelPage title="Change Me"
    binding="#{backing_TestDDPUD.panelPage1}"
    id="panelPage1">
    <f:facet name="menu1"/>
    <f:facet name="menuGlobal"/>
    <f:facet name="branding"/>
    <f:facet name="brandingApp"/>
    <f:facet name="appCopyright"/>
    <f:facet name="appPrivacy"/>
    <f:facet name="appAbout"/>
    <af:panelForm binding="#{backing_TestDDPUD.panelForm1}"
    id="panelForm1">
    <af:inputText value="#{bindings.OrderNumber.inputValue}"
    label="#{bindings.OrderNumber.label}"
    columns="#{bindings.OrderNumber.displayWidth}"
    binding="#{backing_TestDDPUD.inputText8}"
    id="inputText8"/>
    <af:inputText value="#{bindings.SoldToOrgId.inputValue}"
    label="#{bindings.SoldToOrgId.label}"
    columns="#{bindings.SoldToOrgId.displayWidth}"
    binding="#{backing_TestDDPUD.inputText39}"
    id="inputText39"/>
    <f:facet name="footer">
    <af:panelGroup layout="vertical"
    binding="#{backing_TestDDPUD.panelGroup1}"
    id="panelGroup1">
    <af:panelButtonBar binding="#{backing_TestDDPUD.panelButtonBar2}"
    id="panelButtonBar2">
    <af:commandButton actionListener="#{bindings.Execute.execute}"
    text="Search"
    disabled="#{!bindings.Execute.enabled}"
    binding="#{backing_TestDDPUD.commandButton2}"
    id="commandButton2">
    <af:setActionListener from="#{false}"
    to="#{UserState.searchFirstTime}"/>
    </af:commandButton>
    </af:panelButtonBar>
    </af:panelGroup>
    </f:facet>
    </af:panelForm>
    <af:table value="#{bindings.OeOrderHeadersView.collectionModel}"
    var="row"
    rows="#{bindings.OeOrderHeadersView.rangeSize}"
    first="#{bindings.OeOrderHeadersView.rangeStart}"
    emptyText="#{bindings.OeOrderHeadersView.viewable ? 'No rows yet.' : 'Access Denied.'}"
    binding="#{backing_TestDDPUD.table1}" id="table1"
    rendered="#{UserState.searchFirstTime == false}">
    <af:column sortProperty="OrderNumber" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.OrderNumber}"
    binding="#{backing_TestDDPUD.column1}" id="column1">
    <af:commandLink text="#{row.OrderNumber}"
    binding="#{backing_TestDDPUD.commandLink1}"
    action="#{backing_TestDDPUD.commandLink1_action}"
    useWindow="true" partialSubmit="true"
    windowHeight="200" windowWidth="500"
    id="commandLink1"/>
    </af:column>
    <af:column sortProperty="SoldToOrgId" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.SoldToOrgId}"
    binding="#{backing_TestDDPUD.column2}" id="column2">
    <af:inputText value="#{row.SoldToOrgId}"
    required="#{bindings.OeOrderHeadersView.attrDefs.SoldToOrgId.mandatory}"
    columns="#{bindings.OeOrderHeadersView.attrHints.SoldToOrgId.displayWidth}"
    binding="#{backing_TestDDPUD.inputText2}"
    id="inputText2">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.OeOrderHeadersView.formats.SoldToOrgId}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="OrderTypeId" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.OrderTypeId}"
    binding="#{backing_TestDDPUD.column3}" id="column3">
    <af:inputText value="#{row.OrderTypeId}"
    required="#{bindings.OeOrderHeadersView.attrDefs.OrderTypeId.mandatory}"
    columns="#{bindings.OeOrderHeadersView.attrHints.OrderTypeId.displayWidth}"
    binding="#{backing_TestDDPUD.inputText3}"
    id="inputText3">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.OeOrderHeadersView.formats.OrderTypeId}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="RequestDate" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.RequestDate}"
    binding="#{backing_TestDDPUD.column4}" id="column4">
    <af:inputText value="#{row.RequestDate}"
    required="#{bindings.OeOrderHeadersView.attrDefs.RequestDate.mandatory}"
    columns="#{bindings.OeOrderHeadersView.attrHints.RequestDate.displayWidth}"
    binding="#{backing_TestDDPUD.inputText5}"
    id="inputText5">
    <f:convertDateTime pattern="#{bindings.OeOrderHeadersView.formats.RequestDate}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="OrderedDate" sortable="false"
    headerText="#{bindings.OeOrderHeadersView.labels.OrderedDate}"
    binding="#{backing_TestDDPUD.column5}" id="column5">
    <af:inputText value="#{row.OrderedDate}"
    required="#{bindings.OeOrderHeadersView.attrDefs.OrderedDate.mandatory}"
    columns="#{bindings.OeOrderHeadersView.attrHints.OrderedDate.displayWidth}"
    binding="#{backing_TestDDPUD.inputText6}"
    id="inputText6">
    <f:convertDateTime pattern="#{bindings.OeOrderHeadersView.formats.OrderedDate}"/>
    </af:inputText>
    </af:column>
    </af:table>
    </af:panelPage>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_TestDDPUD-->
    </jsp:root>
    thanks,
    lavanya

  • Delete in Table Layout gives JHS-00101

    Hello JHeadstart Team,
    I'm using jdev 10.1.3.1 and jhs 10.1.3 (SU1).
    In my application I have 2 master-detail pages (master = form layout, detail = table layout). In both pages the delete action does not work, i.e. selecting a delete checkbox and pressing the save button gives JHS-00101: No changes to save !?
    Select, Insert and Update work fine!
    Log:
    07/02/22 10:03:16 [907] (39985) ApplicationPoolImpl.reuseReferencedInstance(2172) Reusing a cached session application module instance
    07/02/22 10:03:16 [908] (0) ApplicationPoolImpl.reuseReferencedInstance(2172) Reusing a cached session application module instance
    10:03:16 DEBUG (JhsPageLifecycle) -Executing prepareModel, page=/pages/GEWGemeindedatenBenutzerdefiniert/KulissenBenutzerdefiniert.jspx, pagedef=KulissenBenutzerdefiniertPageDef
    10:03:16 DEBUG (JhsNavigationHandlerImpl) -Executing checkRoles
    07/02/22 10:03:16 [909] (109) DCBindingContainer.internalRefreshControl(2314) **** refreshControl() for BindingContainer :KulissenBenutzerdefiniertPageDef
    07/02/22 10:03:16 [910] (0) DCIteratorBinding.getViewObject(1224) Resolving VO:KulissenBenutzerdefiniertView1 for iterator binding:KulissenBenutzerdefiniertIterator
    07/02/22 10:03:16 [911] (0) DCIteratorBinding.getViewObject(1224) Resolving VO:KulissenzuordnungenView1 for iterator binding:KulissenzuordnungenIterator
    07/02/22 10:03:16 [912] (16) DCJboDataControl.syncWithForceOption(1248) *** DCDataControl.sync() called from :DCBindingContainer.refresh
    07/02/22 10:03:16 [913] (0) JboBeanUtils.getProperty(81) *** Using bean introspection to lookup value :currentRowIndexInRange
    10:03:16 DEBUG (JhsPageLifecycle) -executing processModelUpdaters
    10:03:16 DEBUG (JhsCollectionModel) -KulissenzuordnungenCollectionModel: Executing processNewRows
    10:03:16 DEBUG (JhsCollectionModel) -KulissenzuordnungenCollectionModel: KulissenzuordnungenTable new row 0 ignored, no attributes updated.
    10:03:16 DEBUG (JhsCollectionModel) -KulissenzuordnungenCollectionModel: KulissenzuordnungenTable new row 1 ignored, no attributes updated.
    10:03:16 DEBUG (JhsPageLifecycle) -executing validateModelUpdates
    10:03:16 DEBUG (JhsPageLifecycle) -executing onCommit
    10:03:16 DEBUG (JhsNavigationHandlerImpl) -handleNavigation action=null, outcome=Commit
    10:03:16 DEBUG (JhsPageLifecycle) -Executing prepareRender, page=/pages/GEWGemeindedatenBenutzerdefiniert/KulissenBenutzerdefiniert.jspx, pagedef=KulissenBenutzerdefiniertPageDef
    07/02/22 10:03:16 [946] (125) DCBindingContainer.internalRefreshControl(2314) **** refreshControl() for BindingContainer :KulissenBenutzerdefiniertPageDef
    07/02/22 10:03:16 [947] (0) DCJboDataControl.syncWithForceOption(1248) *** DCDataControl.sync() called from :DCBindingContainer.refresh
    07/02/22 10:03:16 [948] (31) JboBeanUtils.getProperty(81) *** Using bean introspection to lookup value :currentRowIndexInRange
    In the ADF BC Tester the application modules run properly, the delete action as well.
    Why is there no call to (JhsCollectionModel) -KulissenzuordnungenCollectionModel: Key of row that will be removed: oracle.jbo.Key?
    How can I debug?
    Is there something wrong in the model level or view level?
    Thanks in advance
    Peter

    Hello again,
    I found the reason for the described behaviour:
    If I check "Use Table Range?" in the detail block the delete action works, if I turn off this attribute the delete action gives JHS-00101.
    Can you verify this ?! My workaround for the meantime is to set the Number of rows that should be displayed to a very high number.
    Regards
    Peter

  • Error For input string: "M"

    hi i have select radio button but when i make seletion am geting this error      Error
    For input string: "M" am in jdeveloper 11.1.1.6.0
    <af:selectOneRadio id="sor4" layout="horizontal"
                                                     value="#{bindings.Gender.inputValue}"
                                 autoSubmit="true" immediate="true">
                <af:selectItem label="Female" value="F" id="si16"/>
                <af:selectItem label="Male" value="M" id="si10"/>
              </af:selectOneRadio>

    the error is
    <DCExecutableBinding> <refreshIfNeeded> [11074] Invoke refresh for :UamPractitionersView1Iterator
    <DCIteratorBinding> <refresh> [11075] Executing and syncing on IteratorBinding.refresh from :UamPractitionersView1Iterator
    <DCUtil> <findSpelObject> [11076] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for IntlModuleDataControl
    <ADFLogger> <begin> Attaching an iterator binding to a datasource
    <DCIteratorBinding> <getViewObject> [11077] Resolving VO:UamPractitionersView1 for iterator binding:UamPractitionersView1Iterator
    <ADFLogger> <addContextData> Attaching an iterator binding to a datasource
    <SelectItemUtils> <_addUIXSelectItem> class org.apache.myfaces.trinidadinternal.convert.IntegerConverter:"The number is not a whole number." for the value "M"
    <SelectItemUtils> <_addUIXSelectItem> class org.apache.myfaces.trinidadinternal.convert.IntegerConverter:"The number is not a whole number." for the value "F"
    <JboBeanUtils> <getProperty> [11078] *** Using bean introspection to lookup value :componentClientId
    <LoopDiagnostic> <dump> [11079] variableIterator variables passivated >>> TrackQueryPerformed def SearchAppliedCriteria def SearchAppliedCriteria=IntlUsersCriteria
    <DCIteratorBinding> <releaseDataInternal> [11080] Releasing iterator binding:values_3068
    <DCIteratorBinding> <releaseDataInternal> [11081] Releasing iterator binding:listIter
    <DCIteratorBinding> <releaseDataInternal> [11082] Releasing iterator binding:values_3075
    <DCIteratorBinding> <releaseDataInternal> [11083] Releasing iterator binding:listIter
    <DCIteratorBinding> <releaseDataInternal> [11084] Releasing iterator binding:values_3082
    <DCIteratorBinding> <releaseDataInternal> [11085] Releasing iterator binding:values_3089
    <DCIteratorBinding> <releaseDataInternal> [11086] Releasing iterator binding:values_3096
    <ViewObjectImpl> <closeStatementsResetRowSet> [11087] ViewObject: [internal_vcival_def]Root.internal_vcival_def_3100 close prepared statements...
    <DCIteratorBinding> <releaseDataInternal> [11088] Releasing iterator binding:operators_3079
    <DCIteratorBinding> <releaseDataInternal> [11089] Releasing iterator binding:operators_3086
    <DCIteratorBinding> <releaseDataInternal> [11090] Releasing iterator binding:operators_3093
    <DCIteratorBinding> <releaseDataInternal> [11091] Releasing iterator binding:operators_3065
    <DCIteratorBinding> <releaseDataInternal> [11092] Releasing iterator binding:operators_3072
    <ViewObjectImpl> <closeStatementsResetRowSet> [11093] ViewObject: [internal_vco_def]Root.internal_vco_def_3114 close prepared statements...
    <DCIteratorBinding> <releaseDataInternal> [11094] Releasing iterator binding:criteriaItemsForSearch_3056
    <DCIteratorBinding> <releaseDataInternal> [11095] Releasing iterator binding:nestedViewCriteria_3070
    <DCIteratorBinding> <releaseDataInternal> [11096] Releasing iterator binding:nestedViewCriteria_3077
    <DCIteratorBinding> <releaseDataInternal> [11097] Releasing iterator binding:nestedViewCriteria_3084
    <DCIteratorBinding> <releaseDataInternal> [11098] Releasing iterator binding:nestedViewCriteria_3091
    <DCIteratorBinding> <releaseDataInternal> [11099] Releasing iterator binding:nestedViewCriteria_3098
    <DCIteratorBinding> <releaseDataInternal> [11100] Releasing iterator binding:nestedViewCriteria_3070
    <DCIteratorBinding> <releaseDataInternal> [11101] Releasing iterator binding:nestedViewCriteria_3070
    <DCIteratorBinding> <releaseDataInternal> [11102] Releasing iterator binding:nestedViewCriteria_3070
    <DCIteratorBinding> <releaseDataInternal> [11103] Releasing iterator binding:nestedViewCriteria_3070
    <DCIteratorBinding> <releaseDataInternal> [11104] Releasing iterator binding:nestedViewCriteria_3077
    <DCIteratorBinding> <releaseDataInternal> [11105] Releasing iterator binding:nestedViewCriteria_3077
    <DCIteratorBinding> <releaseDataInternal> [11106] Releasing iterator binding:nestedViewCriteria_3077
    <DCIteratorBinding> <releaseDataInternal> [11107] Releasing iterator binding:nestedViewCriteria_3077
    <DCIteratorBinding> <releaseDataInternal> [11108] Releasing iterator binding:nestedViewCriteria_3084
    <DCIteratorBinding> <releaseDataInternal> [11109] Releasing iterator binding:nestedViewCriteria_3084
    <DCIteratorBinding> <releaseDataInternal> [11110] Releasing iterator binding:nestedViewCriteria_3084
    <DCIteratorBinding> <releaseDataInternal> [11111] Releasing iterator binding:nestedViewCriteria_3084
    <DCIteratorBinding> <releaseDataInternal> [11112] Releasing iterator binding:nestedViewCriteria_3091
    <DCIteratorBinding> <releaseDataInternal> [11113] Releasing iterator binding:nestedViewCriteria_3091
    <DCIteratorBinding> <releaseDataInternal> [11114] Releasing iterator binding:nestedViewCriteria_3091
    <DCIteratorBinding> <releaseDataInternal> [11115] Releasing iterator binding:nestedViewCriteria_3091
    <DCIteratorBinding> <releaseDataInternal> [11116] Releasing iterator binding:nestedViewCriteria_3098
    <DCIteratorBinding> <releaseDataInternal> [11117] Releasing iterator binding:nestedViewCriteria_3098
    <DCIteratorBinding> <releaseDataInternal> [11118] Releasing iterator binding:nestedViewCriteria_3098
    <DCIteratorBinding> <releaseDataInternal> [11119] Releasing iterator binding:nestedViewCriteria_3098
    <ViewObjectImpl> <closeStatementsResetRowSet> [11120] ViewObject: [internal_vci_def]Root.internal_vci_def_3063 close prepared statements...
    <DCIteratorBinding> <releaseDataInternal> [11121] Releasing iterator binding:viewObjectBindVars_3059
    <ViewObjectImpl> <closeStatementsResetRowSet> [11122] ViewObject: [internal_vci_def]Root.internal_vci_def_3170 close prepared statements...
    <DCIteratorBinding> <releaseDataInternal> [11123] Releasing iterator binding:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [11124] Releasing iterator binding:properties_3061
    <ViewObjectImpl> <closeStatementsResetRowSet> [11125] ViewObject: [IntlModule.IntlUsers1.IntlUsersCriteria]Root.IntlModule_IntlUsers1_IntlUsersCriteria_3054 close prepared statements...
    <DCUtil> <findSpelObject> [11126] DCUtil, returning:oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding, for IntlUsersCriteriaQuery
    <DCIteratorBinding> <releaseDataInternal> [11127] Releasing iterator binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlListBinding_3132List_3133
    <DCIteratorBinding> <releaseDataInternal> [11128] Releasing iterator binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlListBinding_3150List_3151
    <DCIteratorBinding> <releaseDataInternal> [11129] Releasing iterator binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlListBinding_3168List_3169
    <JUCtrlHierNodeBinding> <release> [11130] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_32, value:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [11131] Releasing iterator binding:operators_3065
    <DCIteratorBinding> <releaseDataInternal> [11132] Releasing iterator binding:listIter
    <DCIteratorBinding> <releaseDataInternal> [11133] Releasing iterator binding:values_3068
    <DCIteratorBinding> <releaseDataInternal> [11134] Releasing iterator binding:values_3068
    <DCIteratorBinding> <releaseDataInternal> [11135] Releasing iterator binding:operators_3065
    <DCIteratorBinding> <releaseDataInternal> [11136] Releasing iterator binding:operators_3072
    <DCIteratorBinding> <releaseDataInternal> [11137] Releasing iterator binding:listIter
    <DCIteratorBinding> <releaseDataInternal> [11138] Releasing iterator binding:values_3075
    <DCIteratorBinding> <releaseDataInternal> [11139] Releasing iterator binding:values_3075
    <DCIteratorBinding> <releaseDataInternal> [11140] Releasing iterator binding:operators_3072
    <DCIteratorBinding> <releaseDataInternal> [11141] Releasing iterator binding:operators_3079
    <DCIteratorBinding> <releaseDataInternal> [11142] Releasing iterator binding:values_3082
    <DCIteratorBinding> <releaseDataInternal> [11143] Releasing iterator binding:values_3082
    <DCIteratorBinding> <releaseDataInternal> [11144] Releasing iterator binding:operators_3079
    <DCIteratorBinding> <releaseDataInternal> [11145] Releasing iterator binding:operators_3086
    <DCIteratorBinding> <releaseDataInternal> [11146] Releasing iterator binding:values_3089
    <DCIteratorBinding> <releaseDataInternal> [11147] Releasing iterator binding:values_3089
    <DCIteratorBinding> <releaseDataInternal> [11148] Releasing iterator binding:operators_3086
    <DCIteratorBinding> <releaseDataInternal> [11149] Releasing iterator binding:operators_3093
    <DCIteratorBinding> <releaseDataInternal> [11150] Releasing iterator binding:values_3096
    <DCIteratorBinding> <releaseDataInternal> [11151] Releasing iterator binding:values_3096
    <DCIteratorBinding> <releaseDataInternal> [11152] Releasing iterator binding:operators_3093
    <DCIteratorBinding> <releaseDataInternal> [11153] Releasing iterator binding:criteriaItemsForSearch_3056
    <DCIteratorBinding> <releaseDataInternal> [11154] Releasing iterator binding:viewObjectBindVars_3059
    <DCIteratorBinding> <releaseDataInternal> [11155] Releasing iterator binding:viewObjectBindVars_3059
    <DCIteratorBinding> <releaseDataInternal> [11156] Releasing iterator binding:properties_3061
    <DCIteratorBinding> <releaseDataInternal> [11157] Releasing iterator binding:properties_3061
    <DCIteratorBinding> <releaseDataInternal> [11158] Releasing iterator binding:criteriaItemsForSearch_3056
    <JUCtrlHierNodeBinding> <release> [11159] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_33, value:vcRowsIterator
    <JUCtrlHierNodeBinding> <release> [11160] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_32, value:vcRowsIterator
    <JUCtrlHierNodeBinding> <release> [11161] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_33, value:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [11162] Releasing iterator binding:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [11163] Releasing iterator binding:variableIterator
    <ADFLogger> <begin> Rollback transaction
    <ApplicationModuleImpl> <resetState> [11164] Resetting AM=Root
    <ApplicationPoolMessageHandler> <doPoolMessage> [11165] **** PoolMessage REQ DETACH LWS
    <DCUtil> <findSpelObject> [11166] DCUtil, returning:oracle.jbo.uicli.binding.JUFormBinding, for view_pageDefs_usersPageDef_WEB_INF_Updusrtask_flow_definition_xml_Updusrtask_flow_definition
    <DCIteratorBinding> <releaseDataInternal> [11167] Releasing iterator binding:TitlecodeList_3052
    <DCIteratorBinding> <releaseDataInternal> [11168] Releasing iterator binding:CountrycodeList_3050
    <DCIteratorBinding> <releaseDataInternal> [11169] Releasing iterator binding:BranchcodeList_3051
    <DCIteratorBinding> <releaseDataInternal> [11170] Releasing iterator binding:OfficecodeList_3048
    <DCIteratorBinding> <releaseDataInternal> [11171] Releasing iterator binding:RoleaccesscodeList_3049
    <JUCtrlHierNodeBinding> <release> [11172] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_34, value:IntlUsers1Iterator
    <JUCtrlHierNodeBinding> <release> [11173] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_34, value:IntlUsers1Iterator
    <DCIteratorBinding> <releaseDataInternal> [11174] Releasing iterator binding:IntlUsers1Iterator
    <JUCtrlHierNodeBinding> <release> [11175] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_32, value:vcRowsIterator
    <JUCtrlHierNodeBinding> <release> [11176] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_33, value:vcRowsIterator
    <JUCtrlHierNodeBinding> <release> [11177] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_32, value:vcRowsIterator
    <JUCtrlHierNodeBinding> <release> [11178] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_33, value:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [11179] Releasing iterator binding:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [11180] Releasing iterator binding:variableIterator
    <DCIteratorBinding> <releaseDataInternal> [11181] Releasing iterator binding:UamUserdetailsView2Iterator
    <DCIteratorBinding> <releaseDataInternal> [11182] Releasing iterator binding:UamUserextensionView1Iterator
    <DCIteratorBinding> <releaseDataInternal> [11183] Releasing iterator binding:UamPractitionersView1Iterator
    <ApplicationPoolMessageHandler> <doPoolMessage> [11184] **** PoolMessage REQ ATTACH LWS
    <ApplicationPoolMessageHandler> <doPoolMessage> [11185] **** PoolMessage REQ DETACH LWS
    <JUCtrlHierNodeBinding> <release> [11186] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_34, value:IntlUsers1Iterator
    <JUCtrlHierNodeBinding> <release> [11187] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_34, value:IntlUsers1Iterator
    <DCIteratorBinding> <releaseDataInternal> [11188] Releasing iterator binding:IntlUsers1Iterator
    <JUCtrlHierNodeBinding> <release> [11189] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_32, value:vcRowsIterator
    <JUCtrlHierNodeBinding> <release> [11190] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_33, value:vcRowsIterator
    <JUCtrlHierNodeBinding> <release> [11191] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_32, value:vcRowsIterator
    <JUCtrlHierNodeBinding> <release> [11192] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_33, value:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [11193] Releasing iterator binding:vcRowsIterator
    <DCIteratorBinding> <releaseDataInternal> [11194] Releasing iterator binding:variableIterator
    <DCIteratorBinding> <releaseDataInternal> [11195] Releasing iterator binding:UamUserdetailsView2Iterator
    <DCIteratorBinding> <releaseDataInternal> [11196] Releasing iterator binding:UamUserextensionView1Iterator
    <DCIteratorBinding> <releaseDataInternal> [11197] Releasing iterator binding:UamPractitionersView1Iterator
    <af:selectOneRadio id="sor2" layout="horizontal"
                                   value="#{bindings.Gender.inputValue}"
                                   partialTriggers="resId1">
                  <af:selectItem label="Male" value="M" id="si5"/>
                  <af:selectItem label="Female" value="F" id="si4"/>
                </af:selectOneRadio>
    i what to store F,M NOT WHOLE NAME FEMALE OR MALE
    my pagedefination is
    <list IterBinding="UamUserdetailsView2Iterator" id="Gender"
              DTSupportsMRU="false" StaticList="true">
          <AttrNames>
            <Item Value="Gender"/>
          </AttrNames>
          <ValueList>
            <Item Value="M"/>
            <Item Value="F"/>
          </ValueList>
        </list>Edited by: adf009 on 2013/05/20 10:24 AM

  • The pagedef is invalid

    hi,all:
    My environment is Jdeveloper 11.1.1.2.0,WebLogic 11g.The question is when I first go to the Home page,It's OK,but if I open any other page,then select the Home page.refresh the page. a error appear:
    类型为迭代程序绑定定义的对象名hand_hadf_common_pages_view_home_themes_adfmenubar_taskflow_home_taskflow_home_taskflow_isUserActivePageDef无效。
    after litter while, it disappear without any operation.
    If I repeat these operation,the error won't come until I logout and login then repeat again.It appear again.I don't know Why.Please help.Thanks
    PS:1, the console log is:<JboBeanUtils><getProperty> [4853] *** Using bean introspection to lookup value :regionModel
    <Utils><buildFacesMessage> ADF: Adding the following JSF error message: 类型为迭代程序绑定定义的对象名 hand_hadf_common_pages_view_home_themes_adfmenubar_taskflow_home_taskflow_home_taskflow_isUserActivePageDef无效。
    oracle.jbo.InvalidObjNameException: JBO-25005: 类型为迭代程序绑定定义的对象名hand_hadf_common_pages_view_home_themes_adfmenubar_taskflow_home_taskflow_home_taskflow_isUserActivePageDef无效。
    2, the pagedef is the define about method of the AM and the task-flow
    3, the chinese words mean the iterator binding object ...... is invalid
    Edited by: Sherry on 2011-6-13 下午8:24

    Hi,
    May be while loading the home page , you are trying to call the AM method as intial activity which is in the home page task flow but it's not in other page pagedef.
    Try to check the similar kind of mistakes.
    Try to check the pagedef entry is already available in DataBindings.cpx file.

  • Extending abstract classes

    I just have a simple question. I have one class which is abstract
    public abstract class Person
         private String firstName;
         private String lastName;
         private String title;
         private String dateOfBirth;
         private String homeAddress;
         private String phoneNumber;
         public static final String MR = "Mr";
         public static final String MISS = "Miss";
         public static final String MS = "Ms";
         public static final String MRS = "Mrs";
         public static final String DR = "DR";
         public static final String PROF = "Prof";
         public Person(String firstName, String lastName, String title, String dateOfBirth,
                         String homeAddress, String phoneNumber){
              this.firstName=firstName;
              this.lastName=lastName;
              this.title=title;
              this.dateOfBirth=dateOfBirth;
              this.homeAddress=homeAddress;
              this.phoneNumber=phoneNumber;
         And i have another class which extends this class
    public abstract class Borrower extends Person{
      public LibraryItem [] itemsBorrowed;
      private double currentFine;
      private int barCode;
      public LibraryItem [] getItemsBorrowed()
           return itemsBorrowed;
      public double getCurrentFine()
           return currentFine;
      public int getBarCode()
           return barCode;
      }When i try to compile these two classes, i get the error
    Cannot find symbal constructor Person(). The problem is that the tutor hates us providing default constructors, and i presume that this is what the error is asking for. Is there any way around this or does a default constructor need to be povided?
    cheers

    codingMonkey wrote:
    georgemc wrote:
    nick2price wrote:
    Ok, i get you, better call the superclass constructor as tutor hates me using no param constructorsChallenge him on that. Not only are they perfectly acceptable, they're a mandatory part of the JavaBeans spec.Personally, even though there are nothing wrong with them, I prefer to avoid no-arg constructors in a lot of cases. Usually when I feel that a class should always have certain attributes. I.e. instead of having a no-arg constructor for something like a Person class, I'd rather have a constructor that takes at least a name. It is true that the name could always be initialized in the no-arg constructor, but I would think that it makes more sense for a person to always have a name, rather than being called "null" or "N/A".If you plan on using any framework that uses the Beans spec (and while the inexperienced, self-professed "purist" might balk at that, you'll find it virtually impossible to avoid as a commercial coder) you won't be able to with those classes. Your argument about always needing a sensible starting point falls down where you have multiple disparate types that you are re-constructing. While it's quite nice to say "a Person should always have a Name", if you have, for example, a persistence framework that will generically map the results of various database queries back onto Java objects, you have to write some special case code for each class in your domain model, that says "in order to contruct this object, you first need to perform this query, then invoke this constructor with this part of the result of that query, then populate the rest of the properties using setter methods". For every class in your domain model. That's a fair amount of overhead. The no-args constructor model completely circumvents that, since everything's populated by the same generic code - beans introspection. Think about it. For every class in your model, you have to have separate chunks of code that are aware of - and hence, coupled to - a specific query, and a specific constructor of a specific class. Far from ideal.
    Even if you decide to roll your own code to manage peristence, configuration, remoting and the like, you'll still eventually settle on no-args constructors as extremely handy tools. Note that I'm all for the presence of other constructors as well, that do allow sensible creation of objects with certain values. Just that the no-args constructor is so infinitely useful for writing a huge amount of generic code
    I would think that it makes more sense for a person to always have a name, rather than being called "null" or "N/A".Me too. And there's nothing in any of my points that gainsays, or opposes that. You create a Person instance, and he's called "null" for a few clock cycles before you populate him from a database query - nothing wrong with that

  • Trouble when embedding a Bean in an Office Document

    Hello all,
    I have to embed a Java Bean into an ActiveX Container like a MS Office document via the axbridge.
    Let me mention, what I have (successfully) done so far:
    - Create a Java Bean
    - Create a Jar file (incl. the manifest file)
    - Run the packager and register the Object
    - Test the control in the MS ActiveX Control Test Container
    System: Win2k, JSDK 1.4.2, JRE 1.4.2_03, Office 2000, Visual C++ 6.0 SP 3
    The ActiveX control works fine in the MS test container. When I try to embed it in another Container like a MS Office document or Macromedia Authoware, the Container Program hangs up without an error message. Also the Java Console contains no message.
    On the other side, the Control can successfully be created and used within VBA:
    Sub myTestApplet()
        Set myTest = CreateObject("TestApplet.Bean.1")
        �
        Set myTest = Nothing
    End Sub Doing so, the control works correctly, but isn�t displayed in the document.
    I tried to use different Superclasses for the Bean like Component, JComponent, Panel etc. and at last I used an empty Bean inherited from JComponent. Every try works well in the MS test container, but as soon as I try to embed it into an Office-Document the Application hangs up.
    The ActiveX Bridge from the 1.4.2 SDK/JRE Bundle doesn�t work at all, even not in the MS test container. Thus I installed the 1.4.2_03 JRE, which makes the controls work in the MS test container (but still not in other Containers).
    Can somebody help me? I have no idea for a workaround and I�m blocked now. Any advice is very welcome!
    Regards,
    Oliver

    Thank you very much for your interest at my problem.
    I try to describe exactly, what I do: I want to integrate a Java3D program into a Macromedia Authorware application. Therefore I want to convert the Java3D program into an ActiveX control (and use the ActiveX Bridge). Authorware must be able to access methods of the J3D program and the J3D program must be able to throw events to Authorware. I think this is nothing special for an ActiveX control.
    In order to avoid additional problems, I use a simple test application without Java3D (source code enclosed).
    I work on:
    WindowsXP,
    JSDK 1.4.2, JRE 1.4.2_3,
    Visual C++ 6.0 SP3 and I also tried Visual Studio .NET.
    Authorware 7
    MS Office 2000
    What have I done so far?
    - compiled the code and created a jar archive (manifest file enclosed)
    - packaged and registered the Bean as described in http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    - successfully tested the ActiveX control in the ActiveX Control Test Container. The exported methods appear (and work) correctly when I choose "invoke methods".
    Now to the problem(s): If I try to embed the control in Authorware or an office document via the ToolBox, the container program hangs up. But as already mentioned above, Visual Basic .NET embeds the control successfully. Therefore I try to create an ActiveX control in VB .NET, which integrates my Java Bean. Let's say a wrapper control. Here are the steps:
    - I opened Visual Studio .NET and created a new VB project based on template "Windows Application".
    - added the Bean to the ToolBox
    - added the Bean into the VB Form.
    - added a button into the form. The form designer created the Bean and button as:Friend WithEvents AxActiveXTest1 As AxActiveXTest.AxActiveXTest
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Me.AxActiveXTest1 = New AxActiveXTest.AxActiveXTest()
    Me.Button1 = New System.Windows.Forms.Button() - in the form designer double clicked the button and entered the following code: Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.AxActiveXTest1.appendText("Hello World")
    End Sub- test the form and click on the VB button.
    Now the error message listed above appears ("cannot invoke method 'appendText' at this time"). I have no idea, why VB crashes when I try to access a method of the Bean. Somewhere I must have made an error. Each assistance is very welcome.
    Thank you in advance and please excuse my less good English.
    Oliver
    Source code:
    1. Class ActiveXTest package de.acns.test;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.beans.*;
    import java.io.*;
    * class ActiveXTest
    public class ActiveXTest extends JPanel implements Serializable,
                                                       PropertyChangeListener
        // member variables
        private PropertyChangeSupport propertySupport;
        /** Creates new form ActiveXTest */
        public ActiveXTest() {
            propertySupport = new PropertyChangeSupport( this );
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            java.awt.GridBagConstraints gridBagConstraints;
            jButton1 = new javax.swing.JButton();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTextArea1 = new javax.swing.JTextArea();
            setLayout(new java.awt.GridBagLayout());
            jButton1.setText("Click Here!");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 0;
            gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
            add(jButton1, gridBagConstraints);
            jScrollPane1.setMinimumSize(new java.awt.Dimension(160, 100));
            jScrollPane1.setPreferredSize(new java.awt.Dimension(160, 100));
            jTextArea1.setPreferredSize(new java.awt.Dimension(50, 50));
            jScrollPane1.setViewportView(jTextArea1);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 1;
            gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
            add(jScrollPane1, gridBagConstraints);
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            // Add your handling code here:
            appendText("You clicked the java button.\n");
         * Public methods to export
        public void appendText( String text)
            jTextArea1.append(text);
        public void setText( String text )
            String oldValue = jTextArea1.getText();
            jTextArea1.setText( text );
            propertySupport.firePropertyChange("TEXT", oldValue,
                                               jTextArea1.getText());
        public String getText()
            return jTextArea1.getText();
         * PropertyChangeListener Support
        public void addPropertyChangeListener(PropertyChangeListener listener) {
            propertySupport.addPropertyChangeListener(listener);
        public void removePropertyChangeListener(PropertyChangeListener listener) {
            propertySupport.removePropertyChangeListener(listener);
         * static main method, enables the bean to be testet "standalone"
        public static void main( String[] args)
            // Create a new instance and add it to a JFrame
            ActiveXTest activeXTest = new ActiveXTest();
            JFrame      frame       = new JFrame("Testapplication");
            activeXTest.addPropertyChangeListener(activeXTest);
            frame.setDefaultCloseOperation(frame.HIDE_ON_CLOSE);
            frame.addWindowListener(new WindowAdapter()
                public void windowClosing( WindowEvent e )
                    System.exit(0);
            frame.getContentPane().setLayout( new GridLayout ());
            frame.getContentPane().add( activeXTest );
            frame.validate();
            frame.pack();
            frame.setLocation( (Toolkit.getDefaultToolkit().getScreenSize().width 
                                 - frame.getWidth())  >> 1,
                               (Toolkit.getDefaultToolkit().getScreenSize().height
                                 - frame.getHeight()) >> 1 );
            frame.show();
         * For testing purposes only, when the bean is
         * created by the static main method
        public void propertyChange(PropertyChangeEvent evt)
            System.out.println("Property \"" + evt.getPropertyName()
                                + "\" wurde von \"" + evt.getOldValue()
                                + "\" in \"" + evt.getNewValue()
                                + "\" ge?ndert");
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTextArea jTextArea1;
        // End of variables declaration
    } 2. ActiveXTestBeanInfopackage de.acns.test;
    import java.beans.*;
    * class ActiveXTestBeanInfo
    public class ActiveXTestBeanInfo extends SimpleBeanInfo {
        // Bean descriptor information will be obtained from introspection.
        private static BeanDescriptor beanDescriptor = null;
        private static BeanDescriptor getBdescriptor(){
            // Here you can add code for customizing the BeanDescriptor.
            return beanDescriptor;     }
        // Properties information will be obtained from introspection.
        private static PropertyDescriptor[] properties = null;
        private static PropertyDescriptor[] getPdescriptor(){
            // Here you can add code for customizing the properties array.
            System.out.println("ActiveXTestBeanInfo: Properties werden exportiert:");
            try
                // create the property descritpors
                properties = new PropertyDescriptor[]
                    new PropertyDescriptor( "text", de.acns.test.ActiveXTest.class )
                // For debugging purposes only
                for( int i=0; i<properties.length; i++)
                    System.out.println(properties.getShortDescription() );
    System.out.println(" ");
    catch( Exception e )
    e.printStackTrace();
    return properties; }
    // Event set information will be obtained from introspection.
    private static EventSetDescriptor[] eventSets = null;
    private static EventSetDescriptor[] getEdescriptor(){
    // Here you can add code for customizing the event sets array.
    return eventSets; }
    // Method information will be obtained from introspection.
    private static MethodDescriptor[] methods = null;
    private static MethodDescriptor[] getMdescriptor(){
    // Here you can add code for customizing the methods array.
    System.out.println("ActiveXTestBeanInfo: exportiere Methoden:");
    try
    // create the method descriptors
    methods = new MethodDescriptor[]
    new MethodDescriptor( ActiveXTest.class.getMethod("appendText", new Class[]{String.class}))
    // For debugging purposes only
    for( int i=0; i<methods.length; i++)
    System.out.println(methods[i].getName());
    System.out.println(" ");
    catch( Exception e)
    e.printStackTrace();
    return methods; }
    private static int defaultPropertyIndex = -1;
    private static int defaultEventIndex = -1;
    // Here you can add code for customizing the Superclass BeanInfo.
    * Gets the bean's <code>BeanDescriptor</code>s.
    * @return BeanDescriptor describing the editable
    * properties of this bean. May return null if the
    * information should be obtained by automatic analysis.
    public BeanDescriptor getBeanDescriptor() {
    return getBdescriptor();
    * Gets the bean's <code>PropertyDescriptor</code>s.
    * @return An array of PropertyDescriptors describing the editable
    * properties supported by this bean. May return null if the
    * information should be obtained by automatic analysis.
    * <p>
    * If a property is indexed, then its entry in the result array will
    * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
    * A client of getPropertyDescriptors can use "instanceof" to check
    * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
    public PropertyDescriptor[] getPropertyDescriptors() {
    return getPdescriptor();
    * Gets the bean's <code>EventSetDescriptor</code>s.
    * @return An array of EventSetDescriptors describing the kinds of
    * events fired by this bean. May return null if the information
    * should be obtained by automatic analysis.
    public EventSetDescriptor[] getEventSetDescriptors() {
    return getEdescriptor();
    * Gets the bean's <code>MethodDescriptor</code>s.
    * @return An array of MethodDescriptors describing the methods
    * implemented by this bean. May return null if the information
    * should be obtained by automatic analysis.
    public MethodDescriptor[] getMethodDescriptors() {
    return getMdescriptor();
    * A bean may have a "default" property that is the property that will
    * mostly commonly be initially chosen for update by human's who are
    * customizing the bean.
    * @return Index of default property in the PropertyDescriptor array
    *           returned by getPropertyDescriptors.
    * <P>     Returns -1 if there is no default property.
    public int getDefaultPropertyIndex() {
    return defaultPropertyIndex;
    * A bean may have a "default" event that is the event that will
    * mostly commonly be used by human's when using the bean.
    * @return Index of default event in the EventSetDescriptor array
    *          returned by getEventSetDescriptors.
    * <P>     Returns -1 if there is no default event.
    public int getDefaultEventIndex() {
    return defaultEventIndex;
    3. manifest file manifest.mf
    Manifest-Version: 1.0
    Name: de/acns/test/ActiveXTest.class
    Java-Bean: True

  • How to make the properties visible for a bean in IDE?

    Hi,
    I have a jpanel and have two buttons ,OK and cancel inside it.
    I made this class as a bean, and put in the component palette of IDE.
    Now when i click and drop that bean in a frame., and try to set the properties, the IDE will be giving me only the outer component which is a JPanel properties,
    I want to work with the properties of inner components OK and Cancel.
    How can i acheive this?

    Yes, Write wrapper methods for the properties you are interested in. Introspection does not examine beans which are declard in a class in IDEs, IT only follows an inheritence tree.
    So if you have a button and want it to be visible in your new bean, you will have to expose the properties of the bean again using wrapper methods. You could use the propertyChange model to notify the button on property changes.

  • Jsp bean property method dilemma

    Hi all,
    I'm just starting using bean and trying to convert old jsp in MVC model using beans. I expose the problem:
    a simple internal search engine ask with a form to enter the some parameter. I want to use this parameter to compose my query to the db.
    Now I use this code in my jsp to make the query:
    boolean firstTime = true;
    Hashtable hshTable = new Hashtable(10);
    Enumeration enumParam = request.getParameterNames();
    while (enumParam.hasMoreElements())
      String name = (String)enumParam.nextElement();
       String sValore = request.getParameter(name);
       if (!sValore.equals(""))
        hshTable.put(name, new String(sValore));
    Enumeration enumHshTable = hshTable.keys();
    while (enumHshTable.hasMoreElements())
      String str_SelectStatement = "SELECT * FROM myTable";
      /*If isn't my first time don't add WHERE but AND*/
      if (firstTime)
       str_SelectStatement += " WHERE (";
       firstTime = false;
      else
       str_SelectStatement +=" AND (";
      String sKey = (String)enumHshTable.nextElement();
       str_SelectStatement += sKey + " LIKE '" + (String)hshTable.get(sKey) + "%')";
    }In this way I compose a smart query like this:
    SELECT * FROM myTable WHERE param1 LIKE 'param1Value' AND param2 LIKE 'param2Value' AND........
    How to convert it in a bean model?
    If I make n setXxxx() getXxxx() I loss in reuse of code.
    If I make personalized setXxxx() for the param1 how can I access to the name of the current method?
    I need this to compose my query. I can retrive the param1Value but not the current name (param1) of the parameter.
    import java.sql.*;
    import java.io.*;
    public class DbBean
    String Param1;
    ResultSet r = null;
    boolean firstTime = true;
    String str_SelectStatement = "SELECT * FROM myTable";
    public DbBean()
      super();
    public String getParam1() throws SQLException
      this.Param1 = r.getString("Param1")!=null?r.getString("Param1"):"";
      return this.Param1;
    public void setParam1(String param1Value)
      if (firstTime)
       str_SelectStatement += " WHERE (";
       firstTime = false;
      else
       str_SelectStatement +=" AND (";
    str_SelectStatement += NameOfTheMethod... + " LIKE '" + param1Value;
      this.Param1= newValue;
    }How can I take the NameOfTheMethod... Param1?
    I search around and I read that you can access to the Method name in the stack trace in an other method. But I can't belive this is THE way. It is no suitable.
    Any suggestion will be greatly appreciated.
    Thank you

    Hiya Ejmade,
    First of all: you're missing the concept of the MVC (Model - View - Controller) model. There are two (2) versions out there, with the currently pending (no. 2) going like this:
    from a resource, a JSP page acquires a java bean, encapsulating the data. Via set/get methods of the bean, you create content on the JSP page
    If you wanted to comprise your search engine like this, you would first have to create a file search.jsp (can be .html at this point) which would call a SearchServlet. This servlet would perform a query, encapsulate the data in some object (let's say java.sql.ResultSet) and then forward control to a JSP page, including the object. The page would acquire the object (through the session context, for instance), extract data, and make it available on the site.
    But that's not what's puzzleing you. You would like to know which method created the database query string so you could adapt that very string. This can be done with the class introspection API, reflection. It's quite complex, you'll need to read about it in a tutorial, try:
    http://java.sun.com/tutorial
    The reflection API has quite a lot of overhead and it, honestly speaking, does not have to be used here. Instead, try this:
    public class DBean {
    Hashtable queryParamters;
    public DBean(Hashtable queryParameters) {
      this.queryParameters = queryParameters;
    public String generateSQLCode() {
      StringBuffer call = new StringBuffer("SELECT * FROM myTable WHERE ");
      for (Enumeration e = queryParameters.keys(); e.hasMoreElements();) {
       String key = (String)e.nextElement();
       call.append(key + " LIKE " + (String)queryParameters.get(key));
      return(call.toString());
    }This code should generate the string for you (with minor adjusments). Btw, I noticed some basic mistakes in the code (calling the Object() constructor, for instance, which is not neccessary). Do pick up a good java book ..
    Hope this helps,
    -ike, .si

  • Difference b/w Java Class and Bean class

    hi,
    can anybody please tell me the clear difference between ordinary java class and java Bean class. i know that bean is also a java class but i donno the exact difference between the both.
    can anybody please do help me in understanding the concept behind the bean class.
    Thank u in advance.
    Regards,
    Fazlina

    While researching this question, I came across this answer by Kim Fowler. I think it explains it better than any other answer I have seen in the forum.
    Many thanks Kim
    Hi
    Luckily in the java world the definition of components is a little
    less severe than when using COM (I also have, and still occasionaly
    do, worked in the COM world)
    Firstly there are two definitions that need to be clarified and
    separated: JavaBean and EnterpriseJavaBean (EJB)
    EJB are the high end, enterprise level, support for distributed
    component architectures. They are roughly equivalent to the use of MTS
    components in the COM/ COM+ world. They can only run within an EJB
    server and provide support, via the server, for functionality such as
    object pooling, scalability, security, transactions etc. In order to
    hook into this ability EJB have sets of interfaces that they are
    required to support
    JavaBeans are standard Java Classes that follow a set of rules:
    a) Hava a public, no argument constructor
    b) follow a naming patterns such that all accessor and modifier
    functions begin with set/ get or is, e.g.
    public void setAge( int x)
    public int getAge()
    The system can then use a mechanism known as 'reflection/
    introspection' to determine the properties of a JavaBean, literally
    interacting with the class file to find its method and constructor
    signatures, in the example above the JavaBean would end with a single
    property named 'age' and of type 'int' The system simply drops the
    'set' 'get' or 'is' prefix, switches the first letter to lower case
    and deduces the property type via the method definition.
    Event support is handled in a similar manner, the system looks for
    methods similar to
    addFredListener(...)
    addXXXListener
    means the JavaBean supports Fred and XXX events, this information is
    particularly useful for Visual builder tools
    In addition there is the abiliity to define a "BeanInfo' class that
    explicitly defines the above information giving the capability to hide
    methods, change names etc. this can also be used in the case where you
    cannot, for one reason or another, use the naming patterns.
    Finally the JavaBean can optionally - though usually does - support
    the Serializable interface to allow persistence of state.
    As well as standard application programming, JavaBeans are regularly
    used in the interaction between Servlets and JSP giving the java
    developer the ability to ceate ojbect using standard java whilst the
    JSP developer can potentially use JSP markup tags to interact in a
    more property based mechanism. EJB are heaviliy used in Enterprise
    application to allow the robust distribution of process
    HTH.
    Kim

  • Database access design using java bean

    Hi,
    I am writing a JSP/servlet/Javabean based app. using MVC architecture.The database related logic is in java beans.
    I want a generalized class/bean that can form a connection , execute the passed query and return the results.Does any one has any URLs or sample code to explain how to do this using introspection?
    I would greatly appreciate any help as this design is very crucial for our application.
    Thanks -
    k

    Please check the Cameleon Open Source project at http://www.must.de/cameleon.html if ti fits your needs.

  • Java bean for database access

    Hi,
    I am writing a JSP/servlet/Javabean based app. using MVC architecture.The database related logic is in java beans.
    I want a generalized class/bean that can form a connection , execute the passed query and return the results.Does any one has any URLs or sample code to explain how to do this using introspection?
    I would greatly appreciate any help as this design is very crucial for our application.
    Thanks -
    k

    i don't think it need help,every book has such code,maybe i haven't understanding your meaning correctly,follow steps:
    1 create a class named DBconnect,
    2 in the constructor of the class,you create the connection,
    3 add several methods that execute the operation into your class ,such as :executeQuery(),executeUpdare().....
    that depands the requirement of your project.

Maybe you are looking for

  • MM:Asset Purchase

    Dear Gurus, I am Purchasing one Asset,Which have Excise duty,Ecess,SEcess & VAT, For that which condition types are to be used ? How to post Invoice so that RG23C-Part-II entries will get posted in register? Plz tell me the complete procedure..... Rg

  • MB_DOCUMENT_BADI - SAP R/3 release upgrade from 4.7.1 to ECC 6

    Once finished upgrading from SAP R/3 4.7.1 to SAP ECC 6, from SPAU I see that there was no problem on the implementations of this BAdI. But when I tried the transaction, where this BAdi was implemented in, I realized that my implementations were not

  • [Call for Speakers & Sponsors] Nov. 25th - ASUG Ontario

    [Call for Speakers & Sponsors] Nov. 25th - ASUG Ontario Chapter Meeting SAP Customer Keynotes by Toronto District School Board and Goldcorp Inc. Over 200 Attendees from the SAP Ecosystem. Break-Out Track Session. Sponsor Showcase Area Limited slots i

  • How to transport changes made in KSAZ

    Hi All, I want to move changes I made in KSAZ setting through TR.  When I am saving after making changes, system is not asking for TR but directly saving it. If anyone can help me out to put the changes in Transport. Thanks in advance Amit Goyal

  • I can't change the language in photoshop. help !!

    I can't change the language the photoshop CC. Help !!