by the way the value of the table to form

Hello

I have a requirement in which I need to store the selected rows in a table (from the database) in my text on a form.

the code in my form as follows.

< af:form id = "f1" >
< af:inputText label = "id" id = "it1" value = "#{full.id}" / >

< af:commandButton text = 'Search' id = "cb1" >
< af:showPopupBehavior popupId = "p1" / >
< / af:commandButton >

< af:inputText label = "name" id = "it2" value = "#{full.name}" / >

< af:popup id = "p1" >
< af:panelFormLayout id = "pfl1" inlineStyle = "width: 337px;" >
< af:table value = "#{bindings." PlantMasterView1.collectionModel}.
var = "row" rows = "#{bindings." PlantMasterView1.rangeSize}.
emptyText = "#{bindings." PlantMasterView1.viewable? "{'No data to display.': 'Access Denied.'}".
fetchSize = "#{bindings." PlantMasterView1.rangeSize}.
rowBandingInterval = '0 '.
selectedRowKeys = ' #{bindings. " PlantMasterView1.collectionModel.selectedRow}.
selectionListener = "#{bindings." PlantMasterView1.collectionModel.makeCurrent}.
rowSelection = "single" id = "t1" >
< af:column sortProperty = "PlantId" sortable = "false".
headerText = "#{bindings." PlantMasterView1.hints.PlantId.label}.
ID = "c2" >
< af:outputText value = "#{rank." PlantId}"id ="ot2">
< af:convertNumber groupingUsed = "false".
model = ' #{bindings. " PlantMasterView1.hints.PlantId.format}"/ >
< / af:outputText >
< / af:column >
< af:column sortProperty = "PlantName" sortable = "false".
headerText = "#{bindings." PlantMasterView1.hints.PlantName.label}.
ID = "c1" >
< af:outputText value = "#{rank." PlantName}"id ="ot1"/ >
< / af:column >
< / af:table >

< af:commandButton text = "ok" id = "cb2" action = "#{full.act}" / >

< / af:panelFormLayout >
< / af:popup >
< / af:form >


Here is the code from my managed bean

public class {full

private string ID;
private String name;

public String act() {}

String plantid = jsfutils.resolveExpressionAsString ("#{bindings.") PlantId.inputValue}"); attribute links plantid and plantname are created.
String plantname = jsfutils.resolveExpressionAsString ("#{bindings.") PlantName.inputValue}");
ID = plantid;
name = plantname;
Returns a null value.
}

{} public void setId (String id)
This.ID = id;
}

public String getId() {}
return the id;
}

public void setName (String name) {}
myIdName = name;
}

public String getName() {}
return the name.
}
}

but here the problem is when I press the ok button in the popup, it throws an error IE.

Error 500 - Internal server error

javax.servlet.ServletException: java.lang.ClassCastException: oracle.jbo.domain.Number
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:421)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:421)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:94)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.doIt (WebAppServletContext.java:3684)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.jbo.domain.Number
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:699)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 34 more
Caused by: java.lang.ClassCastException: oracle.jbo.domain.Number
at oracle.adf.jsfutils.resolveExpressionAsString(jsfutils.java:111)
at oracle.adf.full.act(full.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... more than 42
If someone can solve this...?

Hello

Sorry to say, but this code is a bit awkward:

ViewObject vo = adfutils.findIterator("TestView1Iterator").getViewObject(); //EName and EId are attribute bindings.
vo.getCurrentRow().setAttribute("EName",name);
vo.getCurrentRow().setAttribute("EID",id);
BindingContext cntx = BindingContext.getCurrent();
cntx.getCurrentBindingsEntry().getOperationBinding("Commit").execute();

Why don't you

DCIteratorBinding dciter = (DCIteratorBinding) adfutils.findIterator("TestView1Iterator");
Row currentRw = dciter.getCurrentRow();
currentRW.setAttribute("EName",name);
currentRw.setAttribute("EID",id);
BindingContext cntx = BindingContext.getCurrent();
cntx.getCurrentBindingsEntry().getOperationBinding("Commit").execute();

But then, you use adfutils and the BindingContext, which is redundant. So lets get
RID using EL in you manage code bean

BindingContext cntx = BindingContext.getCurrent();
BindingContainer bindings = cntx.getCurrentBindingsEntry();

DCIteratorBinding dciter = (DCIteratorBinding)bindings.get("TestView1Iterator");
Row currentRw = dciter.getCurrentRow();
currentRW.setAttribute("EName",name);
currentRw.setAttribute("EID",id);
BindingContext cntx = BindingContext.getCurrent();
OperationBinding commitBinding = (OperationBinding ) bindings.get("Commit");
commitBinding.execute();

Looks a lot better now and should work

Frank

Tags: Java

Similar Questions

  • Iterator for the table and form is a problem during the cleaning of the records

    Hello

    I use JDev 12.1.2.

    I have an object of the detail view. I represent a part of its fields in a table and the rest in a form. I use the same iterator. Basically, I dragged and dropped the object even from the view of the data control and created a table and form layout with the fields I wanted in each provision. I put in place a clear feature for the rows in the table with a clear"" key. -on click I delete the line of the iterator in the managed bean. When I do this the selected record is deleted and the next record is displayed. But fields entered in the form layout also gets deleted. (the form should also be showing the record currently selected - it shows but entrable fields in the form are deleted because of claire that I did on the previous line.) If anyone can help get this resolved?

    Not use the same iterator for the tables and forms here? The links are in the row (row.bindings...) for the table, but for the form it is (links...). The Delete on the current row operation is causing the iterator delete all fields of links instead of from the line? Please shed some light.

    Thank you

    UMA

    How do you rank on the iterator compensation?

    use resetActionListener in your clear button and let us know what is happening?

    Ashish

  • Updating column in the table using forms...

    Well Guyz I got my submission today... everything went well... .but yet they want to add IE more features want to donate this application at different times working in the company on different projects... .initailly told me that u have to create this application for just our project, now they use my work to give to other PMsss:(et prendre tout le crédit avec aucun faisait pour moi u n personnes m'a beaucoup aidé dans la construction de cette application...) Well, they want to create an application where they can change some columns... that is to say over write the existing value in a column with a new value.
    Now, suppose I have col1, col2 in the table paymast, how should I proceed to create trigger for when I press the button on the form is updated to the number of given employee (I want to say if enter the respective information for the particular EMP as soon as I press the button the old values shud b replaced by new values...)

    A method that I have noe is to use the wizard to create the form n, and then enter the value of the respective areas of the column to be updated n, then press F6 DB... .i do not want to use this function...

    I want to update the application by pressing the button

    soon :)

    Published by: Chase Suhail on Nov 15, 2009 12:26 AM

    Published by: Chase Suhail on Nov 15, 2009 12:29 AM

    Published by: Chase Suhail on Nov 15, 2009 12:30 AM

    Published by: Chase Suhail on 15 Nov 2009 02:05

    I don't know a lot of your application, but if you build it near standard forms (e.g. base your blocks on the tables), then its standard Frédérique you type the new value in the field and press save. the button... do you want to the "economy"? then put a DO_KEY ('COMMIT_FORM'); in it.

  • What trigger to use to insert data into the table db forms

    Hello

    My form is current having a block of database with the table reference. When you enter data into the form field and click Save. Automatically record is inserted in the database table.
    I want to do this under manual insert. I changed the block of data to a data non-base. Where should I write the insert statement to insert data into the table.
    Is - shutter release key of the form-level validation?

    Please notify.

    Thank you
    Didi.

    You can guide me how to remove the message FRM-40401 no changes to save and instead, I wanted to put 1 transaction record successful... some like it like that.

    Hi didi.
    And this is my last post I'll sleep. ;)
    Take form level trigger named preform
    and write on it

    :SYSTEM.MESSAGE_LEVEL := 5;
    

    I hope this works...

    Hamid

    Mark correct/good to help others to get the right answers. *

  • generate the search pages the tables and forms using templates speed

    Hello

    I have a table-form page and would like to have a quick search on two windows. Currently, I'm copying the form of generated code page jspx table on page jspx form to achieve. Speed models can be modified to allow this? I looked at the formGroup.vm and the searchArea.vm, but the below lines

    If ($JHS.current.pageComponent.hasSearchArea)
    if(${JHS.) Current.Group.generateSearchAreaInRegion})

    seem to be stumble me...

    We develop in JDev 10.1.3.4 and JHeadstart 10.1.3.3.88

    Thank you!

    Lana

    Lana,

    You can make a custom searchArea.vm and a custom formGroup.vm model where you uncheck the box for #if ($JHS.current.pageComponent.hasSearchArea)

    You will then get a search box in the table and the page of the form.

    Steven Davelaar,
    Jheadstart team.

  • Modify the table basic forms of Portal

    Hello

    I have a form based on a table in Oracle Portal. Is it possible to change the base table to another table with the same fields?

    Thank you
    Arne

    Hey Arne,

    Official answer:

    No, Oracle Portal creates a package for your component of forms in the application's schema. The name of the table is stored in the package. Assistants do allow you to edit the table.

    Answer official, not supported by Oracle:

    Yes, you can change the code to package body. Especially when the columns do not change, it is easy enough to change the database table. I did the following test on the portal 11.1.1.x with the form of the example on the Emp table in the provider database PORTAL_DEMO:

    1. create a copy of the EMP table:

    SQL > conn portal_demo
    SQL > create table my_emp in select * from emp;

    2. in the portal user interface, go to the browser and navigate to the following location:

    Path: providers > locally built providers > Application example

    3. create a copy of the form on the EMP Table example

    * Click on manage link
    * Go to manage subtab
    * Click Copy to create a copy of the form

    4. in the portal navigation, click on the link manage to the new form that was created in step 3

    5. click on the link called Package body to get the body of your form package

    6 open the code in an appropriate editor or a tool such as SQL Developer and do a search and replace for string EMP. replace by MY_EMP.

    7 run the code updated the package in your portal repository database when it is connected as a user PORTAL_DEMO

    Thank you
    EJ

  • Deactivate the record in the table of forms

    Hai

    I have created a registry of attendace in forms 6i. I took a text file and processed, and the result is genereated in the table. Now my need to know when I extract textfile new process of my old data in the table should be removed if there is no builtin

    This clear_record is correct

    Respect of
    Srikkanth.M

    Clear_Block() clears the entire block.

    François

  • Is there an easy way to filter a 2D table based on the values in two fields?

    Y at - it an easy way to filter a 2D table based on the values of one of the fields. In my attached VI the output array has the following format:

    Ident Frame Type bytes TimeStamp data

    10:57:07.621 3AD00016 POUVEZ 8 0000000000000000 data frame

    10:57:07.622 3AD00017 CAN data frame 8 000005E000000000

    10:57:07.624 3AD00018 POUVEZ 8 0000000003300000 data frame

    10:57:07.625 2DC00000 POUVEZ 8 0000000000000000 data frame

    10:57:07.626 3AD00019 POUVEZ 4 0000030000000000 data frame

    I would like to delete all lines that do not have an "Ident" between the values of 3AD00000 and 3AD0001E. So for the data above the fourth row would be removed. The only way I can see to do this is to form a 1 d table. Is there a better approach?

    Thank you.

    Hi chuck72352,

    After you've sorted your data, you can use the function InRange. Combined with a "search in 1 table D", you get the range you really want.

    Mike

  • Best way to search for a value in the table

    Hello world

    Need help to decide which application should be used in the following scenario.
    Table  temp_a
    ( col_1 varchar2(20),
     status_flag varchar2(10)
    );
    col_1 is the primary key


    I want to know if a given value is present in "col_1" of the table "temp_a.

    So what query wud be faster:

    1.
     select count (*)
    from temp_a
    where col_1 = v_col_1   -- using variable to check for value
    and status_flag ='active' ;
    2.
     
     select count (*)
    from temp_a
    where col_1 = v_col_1   -- using variable to check for value
    and status_flag ='active' 
    and rownum =1 ;
    Here, I am not concerned about the number (*), I just need to check if the v_col_1 is present or not.

    1. then please let me know, if both are one and the same. or one of them is faster over another.

    2. also, is there a better way to check?

    Thank you
    Abhishek

    The two approaches are the same, because col_1 is a primary key.
    I think that there is a query then faster:

    select count (*)
    from temp_a
    where col_1 = v_col_1
    ;
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

  • How to convert a single scalar value in a table for the graphics path

    I try to establish a curve of output power of power factor vs. But my power factor shows a single scalar value (DBL) and power output is table 1 d of scalars. suggest me a way to trace "output power (Pout) vs power factor".

    It will be a really boring plot (a single line with any power factor you have), but you can use the table to initialize with the size of the switchboard.

  • By the way the table of Clusters with binary strings via adapter LabVIEW

    I need to go through LabVIEW adapter table clusters containing binary strings.
    These data will be subsequently stored in the MySQL database.

    I need to force the option "Binary string" for the ValBinary element, even if my output array is empty.

    Is this possible?

    Used versions: TestStand 4.2.1 + LabVIEW 8.6.1

    Attached file: valbinary2.vi containing the clusters of test output array.

    Howdy Jean-Louis,

    My apologies, I'm not quite your question. You're right that LabVIEW does not know that a string is a binary star strong; LabVIEW, chain stores in a format of Pascal, looks like all the strands in the same way. Because TestStand stores strings in the C type format, on the other hand, the null (0x00) characters can be confusing when interpreting strings in TestStand as you learned to understand. That is of course why TestStand offers the feature to interpret strings as binary strings.

    As Sylvie refers to his post, to illustrate his point I created within TestSTand an array of the same type of data customized to store past out of your valbinary.vi of test data. Test patterns, I also edited the outputsome constant values to the cluster VI. (See the following screenshot). Note that the last string (named ValBinary) in the cluster contains a hexadecimal string with a null character that is inserted as the 3rd on-screen character (before the actual end of the string).

    Here is a screenshot of the created sequence file that calls the VI and then displays the number of items in the table from the VI to the user.  Note that the Locals.MyTestData table is empty before the execution of the sequence.

    Finally, as the execution of the sequence, I opened the Variables pane to view the contents of the Locals.MyTestData table. Here, I have confirmed that the "binary" string of LV was successfully passed in and stored by TestStand.

    Finally, the popup message in the second step of the sequence shows indeed a message indicating there were two elements in Locals.MyTestData.

    This sequence has been able to run successfully even without manually specifying a size of Locals.MyTestData beforehand. TestStand dynamically allocated the necessary elements to store the results of test valbinary.vi.

  • Count the instances of a value in a table of mutation

    Hello

    I have a problem I can not effectively manage. I use a chassis with a group of surveillance of the modules and a 9474 cDAQ as a digital source of tension 9221 to run a high volume laboratory test. I am reading in a table Double 1 d of the values of the 9221 and comparing this value to a value of indicator control, if the value is properly and thus be able to determine if a part success or failure. I then read chess as an array of Boolean and using a search loop determine all index of failure so they can connect to a file with information of serialization are determined at the beginning of the application. The tests carried out are reasonable frequency say 60 Hz. and are conducted for major cycles say more million cycles, the acquisition of data analysis of programming must be able to keep in touch with these requirements.

    The problem I encounter is that the indication of failure detection system has an unintelligent output in the sense that if a part fails, and continues to fail failure can be saved for hundreds of thousands of cycles which is just useless information. I'm looking to try to implement a limitation of failure in that if a particular room, i.e. a particular index in our table of entry more than a user defined limit failure fails then this index is ignored by the file write loop say by being set to a value constant false. I tried to find an effective way to do that within my Search_Array_Index.vi but I can not think of a method that does not require create me a second array of Boolean and searching of the index this table inside the first search by index. Any help or advice will be greatly appreciated.

    I have attached all my code for the project. The main vi is the TestCode rev1 but the workhorse is the blood pressure monitor (excuse the design mess) and the Search_Array_Index is here, I have tried to create the smart output but had no luck.

    Thank you

    Zack

    You could do your VI a FGV of sorts to keep track of how many times this index has failed.  If the value is greater than X, you don't add it to the table.  You want to change the properties of execution of VI to be preallocated Clone for re-entrant execution so that each call keeps its own count.

  • Get the current index value of the table control

    I have a table control 1 d on a panel that contains a value of temperature curve that I send to a temperature controller. The values in the table are not unique, because for example 40.5 degrees in the table could represent 40.5 degrees on the cycles of cooling or heating. I could have severat heating/cooling cycles programmed into the table. I would like a way to read the array index of the currently displayed item in the array in the up/down control of index on the left of the table control. I could then run curves partial temperature easily by neutrophilia a starting point on the curve in the table control.

    I don't see a property that I can use to get this index value. Anyone have any ideas?

    Thank you

    J

    Use the property 'index values. It will be the first item of the output of a 1-d array.

  • Setting the value of a table of ActiveX control

    When controling a VI through ActiveX, how is possible to set the value of a table control?

    With digital controls, I have a problem: I just use SetControlValue and it works well:

    til SetControlValue ('y', 4) for example.

    However, in trying to do the same thing with a table, the control's value becomes an empty array:

    til SetControlValue ("arr', [3-4-5]") for example.

    What is the right way to do it?

    Hi Calvin,

    Have you tried passing a string and convert it to an array entry?  You can also try to use a 'matrix' control, rather than a table, as they are handled a little differently.

  • Hide columns in Table B, based on values LOV in another row of the table:

    Hello

    Jdev 12.2.1.0

    I have two tables A and B and I hide columns b based on the value of row of table A LOV. For example, I have a line in A table that has a column with the x, y, z values lov. Now, if I select the row in the table has and change the LOV to x, I had to hide some of the columns in the table (B) is there a way to get this feature? Any help would be appreciated.

    Thank you

    Assume:

    1 table a call "DepartmentId" column this column has LOV.

    B 2-table a column "ColumnInB" this column will be visible depending on the value of "DepartmentId".

    Try to do the following:

    1 - from data controls, drag "DepartmentId" attribute and drop it on the page as inputText then together make this inputText to false (you can remove it, but don't forget the corresponding binding in pageDef. not deleted).

    2. copy the value of the inputText which will be as "#{bindings." DepartmentId.inputValue}"and go to the"ColumnInB"column and visible property beyond the copied value.

    3 - the ColumnInB visible will be the condition as:

    4-set DepartmentId autoSubmit = 'true '.

    5-set table partialTriggers table B has id and id of DepartmentId LOV

Maybe you are looking for