value of selectOneChoice in the table gets reset to true visible table
I have a table with 2 columns. 1 column a inputtext A and another selectOneChoice B.
Also, I have a selectOneChoice more C above this table. On the "X" value in the drop-down list selection, the table above becomes true visible.
But at the same time, the selectOneChoice B reset to a value of zero instead of having the value extracted from DB.
A inputtext has no effect. It displays the value extracted from DB.
If we say that the table are refreshing causing to reset selectOneChoice B. It is seems to be wrong. Below this table, I have 2 button to add and remove rows from the table.
Add / delete, table gets refereshed but selectOneChoice B loses its value.
Before the page loads, set the bean attribute which is used to visible.
Tags: Java
Similar Questions
-
How to set the default value of the component selectOneChoice in the table to the ADF
Hi all
I use jdev 11.1.1.6.0 version.
I used an adf table in which an attribute is selectOnceChoice.
To create the table and selectOneChoice I used the data control java bean.
and drag and drop a table and after that I have drag and drop one of the attributes as selectonechoice and linked with the return of the method list as < key, value > pair.
I want the default value to select only one option in each attribute rows.
I checked with simillar issue on post next, but not yet resolved.
My jspx code is
<af:column id="c11" headerText="Invoice To" > <af:outputText value="#{row.invoiceTo}" id="ot19"/> <af:selectOneChoice value="#{bindings.invoiceTo.inputValue}" label="#{bindings.invoiceTo.label}" required="#{bindings.invoiceTo.hints.mandatory}" shortDesc="#{bindings.invoiceTo.hints.tooltip}" id="soc3" autoSubmit="true" valuePassThru="true"> <f:selectItems value="#{bindings.invoiceTo.items}" id="si4"/> </af:selectOneChoice> </af:column>
where invoiceTo is the table attribute and the invoiceTo attribute is dragged and dropped as a SOC function list Source data mapped data value with the List attribute
and the display attribute
Data value = invoiceTo List = lovMasterKey attribute
Display attribute = lovMasterValue
that list is maintained at < lovMasterKey, lovMasterValue >
According to the value of invoiceTo line, it should show as default value is selectOneChoice, but its showing no not as a default value.
Please, help me how set the default value of selectOneChoice in the table according to each value line invoiceTo.
Thank you all for the help on this issue.
Problem has been resolved.
Reason for this was used
It is solved using code used for the list built for selectoneChoice more
List lovMasterList = new ArrayList(); SelectItem siItem = new SelectItem(); siItem.setLabel(objAfCmnLovMasterListVO1.getLovMasterValue()); siItem.setValue(objAfCmnLovMasterListVO1.getLovMasterKey()); lovMasterList.add(siItem);
Now, I used the code where the line below. InvoiceTo is the key and row.invoiceToItems are the list of articles for selectOneChoice.
Thank you very much...
-
required (asterisk) for selectonechoice in the table
Hello
I created a table. Table has the value and the label of two columns
label is selectonechoice and text input value
To view the selectonechoice as the label I did readonly = true
but bacause of the asterisk sign is not displayed for the field mandatory also tool tip is not displayed for the field that are necessary.
Required property used for text entries (value) and the selectoncechoice (label)
With the help of Studio Edition Version 11.1.1.9.0
Help, please
Label is a selectOneChoice? a little weird. What is the requirement?
And if necessary the sign didn't come for soc, surround with af: panelLabelAndMessage set true to the panelLabelAndMessage required true or showRequired and try.
-
How the values to insert into the table with the command insertion
Dear all
can someone tell me how the values to insert into the table with the command insert, I want to say I always use command insert behind my forms on what shutter release button press the button of my save, but today I had a form of 6i, where controls (textbox, combo, etc.) are delineated with directly the table with I guess than the Properties Windows , I created 3 columns in tand 3 text on forms fields, now kindly tell me how to do this fields to fill and do not insert command, I mean directly defined with table column
Please help me its urgentHello
If the block is based on your database table, just committed the shape, then changes will be applied to the database.
François
-
The selection list value is not in the table
Hi people
I have a DML page; I put an a field at the top of the HTML to a selection list, of a dynamic LOV.
I put it to display the name and return the value of the corresponding id.
However, nothing gets entered or changed in the table (or on the pages in the Apex, in the table that I have reviewed in SQL * workshop)
For the parameters of the ARTICLE: what should be the specifications from the Source?
Should I pay something in the Page processing: Panel process?
Thank you-
MarionHello
Try to write the name of the column to uppercase.
I think that wrap apex double quote when insertingBR, Jari
-
How to insert a value of triggers in the table?
Mr President.
I have the following trigger
CREATE OR REPLACE TRIGGER lineitem_trg BEFORE UPDATE OF lineitem ON voucherdet FOR EACH ROW BEGIN :NEW.LINEITEM := TO_CHAR ( TO_NUMBER (:OLD.LINEITEM) + 1 , 'FM00' ); END lineitem_trg; /
Now to how to add this triggers a value in the table
The value of this trigger is part of the primary key with voucher_id which is obtained by the voucher_id_seq
This is my database as below
CREATE TABLE "NOM" ( "ACCT_ID" VARCHAR2(7) NOT NULL ENABLE, "ACCT_NAME" VARCHAR2(50) NOT NULL ENABLE, "O_BAL" NUMBER(13,2), "ITAX_ID" VARCHAR2(7), "SALES_TAX_NO" VARCHAR2(20), "PL_SUPPLIER" VARCHAR2(1) DEFAULT 'N', "STOCK_REPORT" VARCHAR2(1) DEFAULT 'N', "ACCT_TYPE" VARCHAR2(4), CONSTRAINT NOM_PK PRIMARY KEY ("ACCT_ID")ENABLE, CONSTRAINT NOM_ACCT_TYPE_FK FOREIGN KEY ("ACCT_TYPE") REFERENCES "ACCT_TYPE" ("ACCT_TYPE") ENABLE ); CREATE TABLE "VOUCHER" ( "VOUCHER_ID" VARCHAR2(8) NOT NULL ENABLE, "VOUCHER_DATE" DATE DEFAULT sysdate, "POST_DATE" DATE DEFAULT sysdate, "DEBIT" VARCHAR2(7), "CREDIT" VARCHAR2(7), "VOUCHER_SOURCE" VARCHAR2(2), CONSTRAINT VOUCHER_PK PRIMARY KEY ("VOUCHER_ID")ENABLE, CONSTRAINT VOUCHER_NOM_DEBIT_FK FOREIGN KEY ("DEBIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHER_NOM_CREDIT_FK FOREIGN KEY ("CREDIT") REFERENCES "NOM" ("ACCT_ID") ENABLE ); CREATE TABLE "VOUCHERDET" ( "VOUCHER_ID" VARCHAR2(8) NOT NULL ENABLE, "DEBIT" VARCHAR2(7) NOT NULL ENABLE, "CREDIT" VARCHAR2(7) NOT NULL ENABLE, "PARTICULARS" VARCHAR2(100), "AMOUNT" NUMBER(21,2), "LINEITEM" VARCHAR2(4) DEFAULT '01', "V_ID_ITAX" VARCHAR2(11), "V_ID_PAY" VARCHAR2(11), "CHALLAN_NO" VARCHAR2(10), CONSTRAINT VOUCHERDET_PK PRIMARY KEY ("VOUCHER_ID", "LINEITEM")ENABLE, CONSTRAINT VOUCHERDET_DEBIT_FK FOREIGN KEY ("DEBIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_CREDIT_FK FOREIGN KEY ("CREDIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_VOUCHER_FK FOREIGN KEY ("VOUCHER_ID") REFERENCES "VOUCHER" ("VOUCHER_ID") ON DELETE CASCADE ENABLE );
CREATE SEQUENCE VOUCHER_ID_SEQ INCREMENT BY 1 START WITH 1; begin execute immediate 'create or replace trigger VOUCHER_ID_TRG '||chr(10)|| ' before insert on "ALIZA"."VOUCHER" '||chr(10)|| ' for each row '||chr(10)|| 'begin '||chr(10)|| ' if inserting then '||chr(10)|| ' if :NEW."VOUCHER_ID" is null then '||chr(10)|| ' select VOUCHER_ID_SEQ.nextval into :NEW."VOUCHER_ID" from dual; '||chr(10)|| ' end if; '||chr(10)|| ' end if; '||chr(10)|| 'end;'||chr(10); end; /
Concerning
And I explained to you why it is false.
Go one read what I put above, and I gave an example of (with command and control elements) in the other thread.
If you want the user a composite key as the primary key by using the primary key of the voucher and something else, do this thing, just a sequence that is obtained from a sequence value (not gapless, but always unique). And then you always build your LINEITEM values for display based on this sequence for example
LPAD (to_char (ROW_NUMBER () over (partition by order VOUCHER_ID by LINEITEM)), 2, '0') as a CONTROL element
It's when you query the data to display it, is not to store it in the database. In the database, you simply store an internal sequence number in LINEITEM.
Do not try and store a sequence for your lineitem gapless. It is false.
-
validate a value non-zero in the table
Hi all
I need to make a base of validation on a single column for example. (colm_A) battery of the table.
the scenario is:
If there is a value to colmA, validation invites you to reject the new insertion of the error value.
If there is no value to colmA, it will allow the new insertion of value.
Kindly advice.
Thank youCreate a new validation.
In the validation method, select PL/SQL.
in select the posting type of PL/SQL that you want to create the select Function return Boolean
in validation Textbox enter code similar to the below adeclare i number; begin select count(colm_A) into i from tblA; if i = 0 then return true; else return false; end if; end;
in the textbox for error... Enter the error message to display when validation fails.
Kind regards
Shijesh -
How to generate a value of 0 if the table does not value contain?
Hello
I have a nice select gives me these results:
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:01 36.6 01/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:02 63.4 02/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:03 73.2 03/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:04 78.6 04/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:05 98.8 05/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:06 2008-06-30.4
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:07 23.8 07/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:08 70.8 08/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:09 14 2008-09
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:10 60.4 10/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:11 46 11/2008
You see, the month 12 is missing, because no data exists in the table. OK, that's normal.
But I want to display the result 0 even if nothing in the table for the month 12. The result would be:
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:01 36.6 01/2008
etc...
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:11 46 11/2008
f? p =: 2::GET_DETAIL_REPORT:NO:P2_VALUE:12 0 2008-11
I know that I have to generate a list of values for each month and join them.
Could you please help me this?select add_months(to_date('01'||:P2_DATE_DEBUT, 'mm/yyyy'), level-1) dt from dual connect by level <= 12
It's nice select I already have.
Kind regardsSELECT 'f?p=&APP_ID.:2:&SESSION.:GET_DETAIL_REPORT:NO::P2_VALUE:' || TO_CHAR(TRUNC(date1, 'MM'), 'MM') LINK, To_CHAR(TRUNC(DATE1, 'MM'), 'MM/YYYY') valeur, sum(valeur) "Cumul" FROM PL_MF_JOUR WHERE cle = :P2_DEPT AND DATE1 BETWEEN to_date('01/01' || :P2_DATE_DEBUT || ' 00:00:00', 'DD/MM/YYYY HH24:MI:SS') AND to_date('01/01' || :P2_DATE_DEBUT || ' 23:59:59', 'DD/MM/YYYY HH24:MI:SS') +364 GROUP BY TRUNC(DATE1, 'MM') ORDER BY TRUNC(DATE1, 'MM')
Christian
PS: your help is very appreciated every time, thank you.You need to generate your calendar of 12 months and then left outer join with it.
Something like:
WITH dts as (select to_date('01/'to_char(rownum,'fm99')||'/'||:P2_DATE_DEBUT,'DD/MM/YYYY') as dt from dual connect by rownum <= 12) SELECT 'f?p=&APP_ID.:2:&SESSION.:GET_DETAIL_REPORT:NO::P2_VALUE:' || TO_CHAR(dt, 'MM') LINK, TO_CHAR(dt, 'MM/YYYY') valeur, sum(valeur) "Cumul" FROM dts LEFT OUTER JOIN PL_MF_JOUR ON (dt = TRUNC(DATE1,'MM') AND cle = :P2_DEPT AND DATE1 BETWEEN to_date('01/01' || :P2_DATE_DEBUT || ' 00:00:00', 'DD/MM/YYYY HH24:MI:SS') AND to_date('01/01' || :P2_DATE_DEBUT || ' 23:59:59', 'DD/MM/YYYY HH24:MI:SS')+364 ) GROUP BY dt ORDER BY dt
NB. Untested (obviously)
-
get the selected value of selectOneChoice with the help of EL
It's my selectonechoice. It has only two values: "JPN" AND "USD".
< af:selectOneChoice value = "#{bindings." Currency.inputValue}.
required = "#{bindings." Currency.hints.Mandatory}.
shortDesc = "#{bindings." Currency.hints.ToolTip}.
ID = "soc1.
Binding = "#{pageFlowScope.apVendHistoryQueryMainMB.Currency} '"
valuePassThru = "true" >
< f: selectItems value = "#{bindings." Currency.Items}.
ID = "si2" / >
< / af:selectOneChoice >
It comes to the el, I tried to use:
< af:convertNumber type = "number".
pattern = "#{Bindings.Currency.inputValue =="JPN"?" '########0' : '##,###,###0.00'}"/>
I want to just when the selected value is JPN, model will use ' # 0'.Hey Danny,
It works fine for me.
What do you mean by
anyway... does ' t work...
The format have not changed according to the selection?
Here's what I tried,
1 added a transitional attribute to my VO and baptized as currency and the USD value default value.
2 DND the currency attribute to jspx page and he added that selectOneChoice with static values (USD and JPN).
JSPX pagepagedef
3. Add an input text (Sal field in a table EMP) and set the id of the selectOneChoice the partialTriggers
A run the page, and according to the choice of currency (from the selectOneChoice), the format of the field of sal is changing.
Arun-
-
Setting default value for selectOneChoice when the Page loads
BPM JDev 11.1.1.5.0
I have a selectOneChoice component bound to a BPM data control. You need to set a specific value as the default value when the page is loaded for the first time.I did the scope of the bean managed as pageFlowScope.
Then created a variable of string in the bean called 'postal code' and its setter I wrote like:You can follow this approach as well. But when you call the countryCode setter? You must set the value of the variable string.
Then, I used your code in the jspx page.
You need to edit my code in the jspx you use a managed bean. The code will change as below.
I was suggesting to use a variable of pageFlowScope as defined in my previous code snippet. And on pageload, set this variable. To find out how to write/execute java code before page loads refer to this post:
http://www.baigzeeshan.com/2011/05/How-to-run-Java-code-on-every-page-load.html
In the afterPhase of the post method, you can set the variable pageFlowScope as shown below.AdfFacesContext.getCurrentInstance().getPageFlowScope().put("countryCode", "India
IN"); -
Help try to calculate and interpret the value of data in the table
Trying to create a form field that would calculate / interpret a value to use for NGN based on certain values WT and Temp.
E.g. At 20 degrees and a weight of 20, my Rng will be 600. A weight of 15, my Rng will be 537.
How can I use a picture to help me to calculate what would be my Rng value if my WT value falls anywhere between two of the values listed WT?
Thanks in advance for any help.
Yes, if you use a multidimensional array.
-
Divide the value and insert into the table
create table mytab (a tank (25), b Varchar2 (50), Varchar2 (100)) C;
I have a string like
myStr:'A$bggoy#qwewewee@A$Qwe#zcxdf@A$po#xvcvxc@A$sdmy#sfdsdf @'
I need to divide and insert into mytab
That's what I tried
declare p_str varchar2 (4000)
Begin
long l_str p_str default. '$';
number of l_n;
myTableType l_data: = myTabletype();
Start
loop
l_n: = instr (l_str, ",");
When the output (nvl(l_n,0) = 0);
l_data.extend;
l_data (l_data.count): =.
LTRIM (rtrim (substr (l_str, 1, l_n - 1)));
l_str: = substr (l_str, l_n + 1);
-Connect mytab
end loop;
end;
Shows below inf-s:
describe the OBJ_SPLIT ;
recreate
CREATE OR REPLACE TYPE OBJ_SPLIT_table IS TABLE OF OBJ_SPLIT;
to view the result of the compilation
CREATE OR REPLACE Function Fn_get_split (P_str VARCHAR2)
return OBJ_SPLIT_table
PIPELINED is type t_ref_cursor IS REF CURSOR;
rf_c t_ref_cursor;
r_out_rec OBJ_SPLIT: = OBJ_SPLIT (null, null, null, null);
Begin
Open the rf_c for
Select s,.
REGEXP_SUBSTR (str, ' [^ $] +', 1, 1) s1,
REGEXP_SUBSTR (str, ' [^ $#] +', 1, 2) s2,.
REGEXP_SUBSTR (str, ' [^ $#] +' 1, 3) s3
from (select s, REGEXP_SUBSTR (s, "[^ @] +', 1, rownum") str)
(select s P_str of double)
connect by instr (s, ' @', 1, level - 1) > 0)
where str is not null;
LOOP
EXTRACTION rf_c
IN
r_out_rec. Str,
r_out_rec. Delimter1,
r_out_rec. Delimter2,
r_out_rec. Delimter3;
EXIT WHEN rf_c % NOTFOUND;
PIPE ROW (r_out_rec);
END LOOP;
CLOSE Rf_c;
end;
and the result
Select DELIMTER1, DELIMTER2, table DELIMTER3 (Fn_get_split('A$bggoy#qwewewee@A$qwe#zcxdf@A$po#xvcvxc@A$sdmy#sfdsdf@'));
in SQLPLUS
----
Ramin Hashimzade
-
Can not get the selectOneChoice Id in the table
Hello
I have selectOneChoice inside the table like that where the selectOneChoice id is generated based on the data in the table:
< af:table >
....
< af:column = 'Action' id headerText = "c5" width = "30" >
< af:selectOneChoice id = "has$ {row.» AutoSubmit DetailSeq}' = 'true' valueChangeListener = "#{viewScope.backing_requestOverview.onSelectAction}" label = "Action" mode = "compact" shortDesc = "#{row." " DetailSeq} ">"
< f: selectItems value = "#{backing_requestOverview.requestActionsMap [row." StatusUid]}"id ="si333"/ >
< / af:selectOneChoice >
< / af:column >
....
< / af:table >
In the valueChangeListener:
{} public void onSelectAction (ValueChangeEvent valueChangeEvent)
RichSelectOneChoice actionChoice = (RichSelectOneChoice) valueChangeEvent.getComponent ();
LOGGER.info ("Short Desc:" + actionChoice.getShortDesc ());
LOGGER.info ("Id of the component:" + actionChoice.getId ());
}
However, here is the result:
Short / / Desc: 9
ID of the component: a
Looks to id = "has$ {row.» DetailSeq} ", unable to show the DetailSeq.
No idea why?
Thank you
-Mina
SetPropertyListener works. Good suggestion!
Thank you
-Mina
-
How to identify the current row in the table of selectOneChoice compact mode
Hello
I have an af:table in which one of the columns is selectOneChoice in compact mode. When you select the point in this selectOneChoice, valueChangeListener fires and do some work based on this line. However, my problem is that it is difficult to identify the current line, because the selectOneChoice is in compact mode. If the selectOneChoice is not in compact mode, when the user selects an item in selectOnechoice, af selectionListener: table is triggered to identify the current row. But if selectOneChoice is in compact mode, user has the option to choose from selectOneChoice and valueChangeListener fires before af selectionListener: table is triggered. Therefore, not able to identify the current row.
As a workaround is not so perfect, I tried to put the line identifier (in my case it is DetailSeq) in shortDesc and do it from there. But users complain seeing this not user-friendly in shortDesc/hintText. I tried to put DetailSeq as the id of the selectOneChoice, but it works not (cannot get the selectOneChoice in the table Id)
< af:table >
....
< af:column = 'Action' id headerText = "c5" width = "30" >
< af:selectOneChoice id = "has$ {row.» AutoSubmit DetailSeq}' = 'true' valueChangeListener = "#{viewScope.backing_requestOverview.onSelectAction}" label = "Action" mode = "compact" shortDesc = "#{row." " DetailSeq} ">"
< f: selectItems value = "#{backing_requestOverview.requestActionsMap [row." StatusUid]}"id ="si333"/ >
< / af:selectOneChoice >
< / af:column >
....
< / af:table >
In the valueChangeListener:
{} public void onSelectAction (ValueChangeEvent valueChangeEvent)
RichSelectOneChoice actionChoice = (RichSelectOneChoice) valueChangeEvent.getComponent ();
LOGGER.info ("Short Desc:" + actionChoice.getShortDesc ());
LOGGER.info ("Id of the component:" + actionChoice.getId ());
}
Any advice?
Thank you
-Mina
Have you tried the setPropertyListener?
Timo
-
Hello
I'm unable to reset the values in the table, once I hit the clear button clears values, but when I buy again, it remembers the old values. But if I re - run the VI then table is reset and old values are not stored. Can someone help me how to clear the values of the table, so that after the loading of new values and to rid the table he doesn't remember the old values. I enclose the vi with this post. Please take a look.
Maybe you are looking for
-
V10 is slow and crashes, how to downgrade to v9 for a browser to work again?
I just got the v10 install automatic update of Firefox. It is now very slow, often hangs for long periods to 100% of the CPU, cannot be interrupted. I can't click on buttons or links for 10s of seconds after loading a page. Now, it is essentially a n
-
My Apple Watch has just stopped working
My Apple Watch just stopped working about an hour after it has been loaded. All I have is a black screen
-
Mid-2014 MBPr has been restarted itself lately
My MBP Mid-2014 with Retina display was strange behavior in recent days. Sometimes the backlight on the keypad turns off. What is more worrying, it's suddenly the screen turns off, then after a few (or more) seconds, I get a screen indicating that
-
Bought a new beam of barebones as my old series was tired. I have transferred my hard disk but had to format it as a new motherboard. After you have reinstalled my OEM copy of Vista on my new rig, it won't activate as it says this copy is already in
-
Unable to print on Laserjet 1320, Windows 7, Google Calendar
Connected my Laserjet 1320 to my new PC with Windows 7. Solved a problem with printing using this forum (print multiple copies). Tried to print a page from Google Calendar by pressing the "print" key - box came the calendar print preview display. Cli