Adf faces command button, bindings and ejb 3.0 persisting problem

When mapping the persist method to an adf command button it got this error:
1. JBO-29000: java.lang.IllegalArgumentException: PERSIST impossible sur l'objet détaché : hr.entity.Departments@1b21.; nested exception is: java.lang.IllegalArgumentException: PERSIST impossible sur l'objet détaché : hr.entity.Departments@1b21. -
2. java.lang.IllegalArgumentException: PERSIST impossible sur l'objet détaché : hr.entity.Departments@1b21.; nested exception is: java.lang.IllegalArgumentException: PERSIST impossible sur l'objet détaché : hr.entity.Departments@1b21. -
Is that because Departments are serialized by the container when the session bean is accessed by the data control to catch the data when the form is populating and entities are detached from the persisting context ? or something else ?
I bind the button to the current row data provider for the departments. Is it correct, isn't ?

When mapping the persist method to an adf command button it got this error:
1. JBO-29000: java.lang.IllegalArgumentException: PERSIST impossible sur l'objet détaché : hr.entity.Departments@1b21.; nested exception is: java.lang.IllegalArgumentException: PERSIST impossible sur l'objet détaché : hr.entity.Departments@1b21. -
2. java.lang.IllegalArgumentException: PERSIST impossible sur l'objet détaché : hr.entity.Departments@1b21.; nested exception is: java.lang.IllegalArgumentException: PERSIST impossible sur l'objet détaché : hr.entity.Departments@1b21. -
Is that because Departments are serialized by the container when the session bean is accessed by the data control to catch the data when the form is populating and entities are detached from the persisting context ? or something else ?
I bind the button to the current row data provider for the departments. Is it correct, isn't ?

Similar Messages

  • ADF Table - Command buttons disappear when no rows returned for table

    We have a command button that navigates to a create screen, when the table returns no rows the button disappears. We need to have this displayed always and within the ADF table. The code looks like:
    <f:facet name="selection">
    <af:tableSelectOne text=""
    binding="#{Search.tableSelectOne1}"
    id="tableSelectOne1">
    <af:commandButton actionListener="#
    bindings.ExecuteWithParams1.execute}"
    text="Edit n"
    action="edit"
    binding="#{SearchCtgry.commandButton3}"
    id="commandButton3">
    <af:setActionListener from="#{row.Code}"
    to="#{processScope.toCode}"/>
    </af:commandButton>
    </af:tableSelectOne>
    </f:facet>

    try placing the command button within the "actions" facet of the table. It will place it above the actual rows of the table. You could also use the "header" facet.
    <af:tableSelectOne text=""
    binding="#{Search.tableSelectOne1}"
    id="tableSelectOne1">
    <f:facet name="actions">
    <af:commandButton actionListener="#
    bindings.ExecuteWithParams1.execute}"
    text="Edit n"
    action="edit"
    binding="#{SearchCtgry.commandButton3}"
    id="commandButton3">
    <af:setActionListener from="#{row.Code}"
    to="#{processScope.toCode}"/>
    </af:commandButton>
    </f:facet>
    </af:tableSelectOne>

  • ADF Faces - issue with Portal and af table

    I wonder if anybody could help me with a problem we are experiencing with running our ADF Faces app inside a portal (NOT Oracle Portal). We are using the af table tag with the rows attribute set as follows:
    <af:table emptyText="No items found"
    rows="10" banding="row"
    bandingInterval="1"
    binding="#{backing_ModuleSearchReg.table1}"
    id="table1"
    var="row">
    What this does is if we have more than 10 rows to display it will display
    a table header that has a label 'Previous 1-10 of nnn' Next 10. However, when you click on 'Next 10' it produces a Javascript error.
    When we run the app outside of the portal we do not get this problem.
    I believe this is related to known issues with JSF and Javascript inside a 'framed' web page. But if anybody help me with this or point me to a resource that can help it would be very much appreciated.
    Many Thanks in advance.
    Chris

    Hi,
    I remember a similar issue with inner frames that should be fixed in JDeveloper 10.1.3.3. The problem was that the ADF Faces JavaScript did not get the correct document root.
    Frank

  • ADF Faces RC browser support and browser market share

    hi
    Given the current browser support in JDeveloper 11g (ADF (Faces RC)), for IE 7.0 (not IE 6), FF 2.0, FF 3.0, ...
    http://download.oracle.com/docs/cd/E12839_01/install.1111/e13666/OJDIG.htm#BDCJBGBC
    http://www.oracle.com/technology/products/jdev/htdocs/jdeveloper11gfaq.html#P0
    (Why Oracle has chosen to do so has been discussed before, in threads ADF 11g: Browser support for Internet Explorer 6, Browser certificaion clarification JDev 11gr1, ...)
    Given some information available online about browser market share ...
    http://marketshare.hitslink.com/browser-market-share.aspx?qprid=3
    http://www.w3schools.com/browsers/browsers_stats.asp
    http://www.w3counter.com/globalstats.php
    http://www.thecounter.com/stats/
    ... it looks like about 20 to 30 percent is still Internet Explorer 6 (which is not supported by ADF Faces Rich Client components).
    Which role should this play in a decision to choose for ADF Faces Rich Client components to build an internet application today?
    Maybe some can share their experience in making such choice.
    many thanks
    Jan Vervecken

    Hi Jan,
    (e1) That's a really good example, but the deciding point is different than browser version imho.
    In that example, the hospital control its technological infrastructure so I would say it's safe to ask the users to upgrade as the hospital team is actually going to do it. In this case it depends if the hospital itself is willing to upgrade its apps, not the users. However, the patients are a special kind of users of which at least a small amount will be physically disabled to some point so you'll have to evaluate the accessibility potential of ADF Faces RC and, as most rich libraries, it's not that awesome. So, in that example, I think you would have to use pure Trinidad instead as its accessibility support is a bit better or at least reduce the usage of rich features in RC (like no drag-drop since it's a nightmare for both blind and mobility reduced users).
    (e2) imho, no it wouldn't be safe to use RC if the target date is within 1 year since you don't control the user base in that example and not supporting a browser might cut your customer base and thus reduce your revenue.
    Regards,
    ~ Simon

  • ADF Faces components with HTML and DIV tags

    Hello all,
    I want to know if there a way to place a <div> tag within an adf faces component tag? eg. <af:table> tag and insert the div tag between </af:column>? I tried doing this by placing the div tag between columns and also enclosing it with verbatim tags, but a parsing exception occurs during run time. The purpose of this is to create frozen columns for horizontal scrolling.
    The code looks like:
    <af:table ...>
    <af:column headerText= ...>
    <f:facet name= ...>
    <h:outputText value= .../>
    </f:facet>
    </af:column>
    <f:verbatim>
    //DIV TAG
    </f:verbatim>
    <af:column headerText= ...>
    <f:facet name= ...>
    <h:outputText value= .../>
    </f:facet>
    </af:column>
    <af:column headerText= ...>
    <f:facet name= ...>
    <h:outputText value= .../>
    </f:facet>
    </af:column>
    <f:verbatim>
    //END DIV TAG
    </f:verbatim>
    </af:table>
    Thanks in advance.
    -Wes
    Message was edited by:
    zeoneozero

    repost
    -

  • ADF – Could I have HttpSession and EJB 3 Statefull session in same applicat

    I am using JDeveloper 10.3.2. Fist I create a single demo application to create EJB Session Bean (Statefull) and is working fine.
    When I am trying to use the same EJB to my large Application a got runtime Error,
    Without any exception. (Losing the information of EJB).
    And the Question is, Shall I use HttpSession and EJB 3 Statefull session in same application?

    Hi,
    if it is a Web application you need the https session anyway and the two are different kind of beasts, one handled by teh EJB container, the other by the web container.
    The question is why you ned stateful session beans - which seems to be a rare usecase? Usually state is persisted and tracked in the business service.
    However, without an error message its hard to tell what going wrong here
    Frank

  • ADF FACES: bugs in isLaunchingDialog and peekView

    I have a page that I may use as a dialog in one workflow and as a directly navigable page in another. I need the page to configure itself based on whether it was launched as a dialog or not.
    After reading the documentation on AdfFacesContext, it seemed that the isLaunchingDialog method or possibly peekView would offer me access to this data. However, neither of these methods ever seem to return anyting other than false and null, respectively.
    I have two places where a dialog is created (one using an outcome starting with "dialog:" and another is an instance of af:inputSelectText. I have installed NavigationHandlers and ViewHandlers to track the process flow, and at each interesting step I dump the values of the two methods listed above. They are ALWAY false and null. An example of the debug (as simple as it is) is below:
    System.out.println("renderView: launchingDialog=" +AdfFacesContext.getCurrentInstance().isLaunchingDialog());
    System.out.println("renderView: peek.UIRoot=" +AdfFacesContext.getCurrentInstance().peekView());
    Are these methods busted? Is there some trick to using them?
    Is there any other way to determine that the current view is being rendered as a dialog?
    Thanks.

    These methods are both working as intended, sorry to say.
    isLaunchingDialog() is a per-request method we use internally to remember if someone's launched a dialog in this request. It doesn't tell you if a dialog is visible. It's hard to envisage a use for clients.
    Meanwhile, peekView() is going to return null here because the dialog launching code only uses pushView() and popView() on platforms that don't have enough machinery to show a true dialog. With the original window still open, we've no need to call pushView() (and don't).
    At this time, there's no API that you could use to detect whether you're in a dialog at this particular moment.

  • Spring 2.5.5 and EJB 3.0 Deployment problem in WLS 10.3

    Hi,
    I am attempting to deploy a EAR file that previously ran on SJSAS 9.1 update 1 to WLS 10.3. As part of the deployment I get the following error related to the EJB3 classes.
    There are 1 nested errors: weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load class au.edu.cqu.cis.web.ajaxservice.AjaxServicesBean in Jar D:\dev\env\oracle\middleware\jdeveloper\system\system11.1.1.0.31.51.56\DefaultDomain\servers\DefaultServer\tmp\_WL_user\ProgEnrol-ear-3\v540rk\ProgEnrol-ejb-3.0.4-SNAPSHOT.jar : java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    I suspect that this is related to the @Autowired spring annotation in use in the session bean. Either, the server is not finding the Spring JAR correctly or it has a problem with the annotation.
    Can anyone point me in the right direction? Do I need to deploy the spring jar as a library?
    Thank you.
    Regards,
    Graeme.

    Hi, Graeme.
    Seems there is an existing CR on something related from v10.0: CR353213
    * WLS 10.0 - EJB 3.0 deployment fails when parsing class for Stateless annotation
    According to http://edocs.bea.com/wls/docs103/issues/known_resolved.html, this is not addressed in 10.3
    Closely review your classpath, and then (assuming you have access to the source) review the body of your ejb. If it is related to this CR, you may be able to workaround the issue by shortening the body and split large methods into more sub-methods.
    I hope this helps,
    -Adrian

  • WLS 10 and ejb 3 projct deployment problem

    hi all, my env. looks like :
    vls version : 10
    java version : 1.6.0.04
    operating system : Solaris SPARC 64-bit.
    problem :
    when i try to deploy my simplest ejb 3 project i got this error :
    weblogic.management.DeploymentException: [Deployer:149189]Attempt to operate 'distribute' on null BasicDeploymentMBean for deployment Test.
    at weblogic.deploy.internal.targetserver.DeploymentManager.assertDeploymentMBeanIsNonNull(DeploymentManager.java:1281)
    at weblogic.deploy.internal.targetserver.DeploymentManager.findDeploymentMBean(DeploymentManager.java:1322)
    at weblogic.deploy.internal.targetserver.DeploymentManager.createOperation(DeploymentManager.java:1022)
    at weblogic.deploy.internal.targetserver.DeploymentManager.createOperations(DeploymentManager.java:1368)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleUpdateDeploymentContext(DeploymentManager.java:160)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.updateDeploymentContext(DeploymentServiceDispatcher.java:153)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doUpdateDeploymentContextCallback(DeploymentRe
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.updateDeploymentContext(DeploymentReceiverCall
    at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.callDeploymentReceivers(ReceivedPrepare.java:199)
    at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.handlePrepare(ReceivedPrepare.java:110)
    at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.receivedPrepare(ReceivedPrepare.java:52)
    at weblogic.deploy.service.internal.targetserver.TargetRequestImpl.run(TargetRequestImpl.java:211)
    at weblogic.deploy.service.internal.transport.CommonMessageReceiver$1.run(CommonMessageReceiver.java:408)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    i can't resolve this issues for a week, pls help me.
    everything works fine at home on my PC where i have windows XP Professional OS.
    any idea will be appreciated.
    Regards,
    Paata.
    Magticom LTD, Georgia.
    Edited by paatal at 02/11/2008 5:56 AM
    Edited by paatal at 02/11/2008 5:57 AM

    Hi, Graeme.
    Seems there is an existing CR on something related from v10.0: CR353213
    * WLS 10.0 - EJB 3.0 deployment fails when parsing class for Stateless annotation
    According to http://edocs.bea.com/wls/docs103/issues/known_resolved.html, this is not addressed in 10.3
    Closely review your classpath, and then (assuming you have access to the source) review the body of your ejb. If it is related to this CR, you may be able to workaround the issue by shortening the body and split large methods into more sub-methods.
    I hope this helps,
    -Adrian

  • ADF-Faces table and mass data

    Hello Oracle,
    we consider to use ADF-Faces with Spring and TopLink or Hibernate that supports all important commercial databases.
    We need a solution for selecting mass data and show them using a ADF-Faces component.
    ADF-Faces table looks great and is fine for for some hundred datasets. But we have customers who could do a select over 80.000 or more datasets and it cannot be the solution to load them completly in collection-model in memory.
    Do you have a solution or do you plan somthing? A JSF data table component for mass data (e.g. load from database on every "next or "previous" click)?
    Regards
    Florian

    I'm pretty new to ADF Faces etc. but I know the ADF Table component supports paging. If you're using ADF Business Components as the persistence framework it supports paging out of the box giving you exactly what you're looking for.
    If you're using EJBs or Toplink I think you have to write your own paging interface but I don't know this for sure.
    Corey
    Message was edited by:
    cpuffalt
    Message was edited by:
    cpuffalt

  • ADF Faces: is mixing JSF RI and ADF Faces tags supported?

    Hi,
    I'm looking at ADF Faces as a future possibility for our application that is currently based on JSF RI.
    When looking at the ADF Faces demo it strikes me that all pages are almost completely built up from ADF Faces tags.
    For instance
    af:form
    af:commandButton
    af:inputText
    are used instead of the equivalent core jsf tags f:form, f:commandButton and f:inputText
    I'm wondering if this is mandatory if we would like to use some ADF Faces components mixed within our existing application.
    In other words: are ADF Faces tags supported in the environment of conventional JSF tags? And mixing ADF Faces JSF components with JSF components by other vendors?
    Another thing that strikes me is that pages are constructed using ADF Faces tags for any and all markup content.
    I guess this is meant to support several different clients (normal browser applications, mobile clients, voice activation over telephone) using different renderers.
    In my experience abstracting markup this way inherently means loss of control over the exact markup that is sent to the client. This is not acceptable for all projects and customers.
    Is embedding ADF Faces tags within template HTML, within f:verbatim tags or not, supported?
    Regards,
    Joost de Vries

    You absolutely can mix JSF RI and ADF Faces tags. This is very much supported! You can swap in <h:form> and <h:commandButton> and <h:inputText>. Our versions support some features that the JSF tags do not, as described in our release notes.
    Your point about using tags to produce all markup is a very cogent one. For some projects, absolute control over HTML will be a necessary requirement, so we do support that style of development. But we believe strongly that the future does not lie in constant handcoding of HTML, but instead in building more powerful, flexible, and reusable components and assembling those into pages. This was one of the themes of a talk I gave with two coworkers at this past JavaOne.
    -- Adam Winer (JSF EG member and ADF Faces lead)

  • How to set values of a parameterized message in ADF Faces?

    Hi all,
    i've got the following problem: I want to set the values of a parameterized message before i add the message to the FacesContext.
    Contents of the message resource bundle:
    testPage.successMsg.create=The device {0} was created successfully!
    Code within backing bean method:
    String message = getStringFromBundle("testPage.successMsg.create");
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(message));
    In Struts/ADF UIX the following code did the job:
    protected void setUIXInfoMessage(HttpServletRequest request, String key, Object[] args)
    MessageData msgs = new MessageData();
    MessageResources mr = this.getResources(request);
    String msg = "";
    if (mr != null)
    msg = mr.getMessage(request.getLocale(), key, args);
    msgs.addMessage(null, msg, null, UIConstants.MESSAGE_TYPE_INFO);
    request.setAttribute(UIX_MESSAGE_KEY, msgs);
    Can anyone help me with this problem? I have searched a lot in the Oracle ADF Development Guide and within forum, but did not find any solution.
    Another interesting thing is, how to set the parameters from jspx-Code.
    How can i achieve the same results in ADF Faces corresponding to the following UIX-Code:
    <boundAttribute name="title">
    <messageFormat format="${nls['deleteTip.confirmation']}">
    <dataObject source="${bindings.TipName}"/>
    </messageFormat>
    </boundAttribute>
    Resource Bundle:
    deleteTip.confirmation=Do you really want to delete the tip {0}?
    Another question:
    What are the corresponding elements in ADF Faces corresponding to <concat> and <if> in UIX or what possibilites exist in ADF Faces to dynamically concatenate strings depending on certain conditions?
    I know, these are many questions. I am familiar with UIX, but now i have to start developing applications with ADF Faces and there are some things i don't find corresponding equivalents.
    Thanks in advance!
    Regards,
    Stefan

    Hi,
    SRDemo shows you how to do this declratively
    <h:outputFormat value="#{res['srcreate.confirmPanel.message']}"
    escape="false" id="nextButton">
    <f:param value="#{requestScope.SRDEMO_CREATED_SVRID}"/>
    </h:outputFormat>
    where the <f:param ...> element sets the value of the variable
    To programmatically access internationalized strings, SRDemo uses
    private static ResourceBundle getBundle() {
    FacesContext ctx = getFacesContext();
    UIViewRoot uiRoot = ctx.getViewRoot();
    Locale locale = uiRoot.getLocale();
    ClassLoader ldr = Thread.currentThread().getContextClassLoader();
    return ResourceBundle.getBundle(ctx.getApplication().getMessageBundle(),
    locale, ldr);
    public static String getStringFromBundle(String key) {
    ResourceBundle bundle = getBundle();
    return getStringSafely(bundle, key, null);
    You take it from there and put it to a FacesMessage, If it uses parameters I guess you will have to parse the string
    Frank

  • ADF Faces Table with a Total row calculated?

    Hi there OTN Community:
    I have another doubt.
    I have an EJB dataControl, and i use one of his collections to display the data in an ADF Faces Table. One of the columns of the Adf Faces Table is numeric, And i have to display the Total of that Column.
    I only shows 10 rows per screen, but i need to show the total of all the rows.
    How i can calculate it?

    Mmmmm..... You're right!...I will try that.
    Thanx :)
    Hey, and....You know? i was thinking, maybe i can get the iterator and then capture each object of the iterator to compute the total. That is a crazy idea?, its possible?, its not recommended? or its ok too? :P
    Thanx in advance.
    Dany

  • Command Button action is bean method.How to pass parameter or reference ID?

    JDEV11gR1PS1/ADF
    A command button action's is bean method, as follows:
    <af:commandMenuItem id="gbl_cmi_1" action="#{tbBean.action1}"/> Bean code is something like
    public String action1() throws IOException {
    if (id.equals.("gbl_cmi_1"))...
    }Therefore, I'd like to be able to find out what the commandButton's ID is, for use in evaluation, etc.
    The reason being is that multiple commandButtons are actually being built dynamically as well, and the action may be a URL redirect. Therefore, I'm using the id to lookup what URL to redirect to.
    Ideas?
    Thanks.

    Hi,
    I think you can use f:attribute inside your commandButton.
    We use f:attribute inside button or link which hold a name/ value and we can read the value from backing bean as :
    public void addItemToCart(ActionEvent evt) {// this the actionListener of button or link
    Map attributes = evt.getComponent().getAttributes();
    String productId = attributes.get("attributeName");
    } Sameh Nassar

  • How can LabVIEW press a command button in access form?

    Situation: access database with a command button, who generate a code after pushing
    Task: LabVIEW open the access database, pressed the command button and read out the code
    Status:
    use activeX to open the access database - ready
    press the command button - open
    read out the code - open
    Problem: Is there a possibility that LabVIEW press automatically the command button in the access form?
    Solved!
    Go to Solution.

    First off, you are confusing your terms. Access is not a database. It's an development environment for creating applications that use databases. By default, Access uses a DBMS called Jet that is built into Windows, but it can use others like SQL Server or even Oracle.
    Second, in terms of pushing the button, that is totally dependent upon what functionality Access' ActiveX interface chooses to expose to external applications.
    Third, what does the button actually do? The statement, "..generate a code.." is meaningless. Does it perform a query? Does it generate a report? Does it modify records?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • Posting error in migo

    Hi Experts, I have created my own chart of accounts ( not copied from standard INT ). While trying to post MIGO, the following error is getting displayed. 1) Account determination for entry XXXX BSX not possible. when i try to lead through the diagno

  • CO-PA document

    Hi Have issue on CO-PA Document. Issue is Finished Goods Material Base Qty is TO. Costing Lot size is 1TO. While post sales return Credit Memo billing document  sales qty is below 1 TO, CO-PA Document is generating, but values is not appearing in CO-

  • SCORE HISTORY in Scorecard ( KPI Details ), need explaination!

    Details: In Scorecard > KPI Details > Score History: In the Score History there are there latest month comparisons include the current standing month. Questions: 1. How the TREND of this three month get compare to each others? 2. Why the left two mon

  • Running Ant file - build.xml from JDev

    hi all I have created simple BPEL project. I'm using JDev 10.1.3.1.0 & SOA suite 10.1.3.1.0 . If I deploy my BPEL process using deployment utility of JDev then it gets deployed well on localhost:8888 . But If I run build.xml Ant file from JDev then i

  • Smart mailbox emails are empty

    I created a couple of Smart Mailboxes and when I click on many of the emails in the folders, they are empty. When I go to the same emails in the InBox all the inforamtion can be seen. What am I missing? Thanks.