List items in JSF 1.2?
Hello,
I'm in the process of learning JSF (I have a little ASP.NET background). I'd like to be able to iterate through a List of items and render them as buttons on the jsp page, inside list items in an unordered list:
<ul>
<li><button name="btn1" type="submit">button (1)</button></li>
</ul>It looks like the old JSTL <c:forEach> was able to do the iterations, but didn't have access to JSF backing beans(?). According to this site (http://www.jsffaq.com/Wiki.jsp?page=IsItPossibleToUseJSTLsCForEachWithFacesContext), there's some new way of doing this in JSF 1.2 / JSP 2.1. Can someone please elaborate on this - how can I iterate through a list without putting everything in a dataTable?
Thanks in advance!
Answered my own question. From http://wiki.java.net/bin/view/Projects/JavaServerFacesSpecFaq#11coreTags:
JSF 1.1 Troubleshooting Questions
Q. Do JavaServer Faces tags interoperate with JSTL core tags, forEach, if, choose and when?
A. The forEach tag does not work with JavaServer Faces technology, version 1.0 and 1.1 tags due to an incompatibility between the strategies used by JSTL and and JavaServer Faces technology. Instead, you could use a renderer, such as the Table renderer used by the dataTable tag, that performs its own iteration. The if, choose and when tags work, but the JavaServer Faces tags nested within these tags must have explicit identifiers.
This shortcoming has been fixed in JSF 1.2.
... so it looks like we still use the <c:forEach> tag, it just understands jsp and jsf now.
Similar Messages
-
How to get unordered/ordered list in ADF JSF
Hey,
So I'm thinking this is a pretty simple task but I just can't get it to work or find anything on it. I just want a simple unordered or ordered list in my JSF view, the text of each list element being an <af:outputText> value. At the moment I have something like:
<ol>
<li>
<af:outputText value="something" />
</li>
<li>
<af:outputText value="something2" />
<af:goLink text=" text " id="gl1" destination="/faces/mypage.jsp"/>
<af:outputText value="something3" />
</li>
<ol>So I expect it to output the below, but instead its completely messed up.
1. something
2. something2 text something3
It's getting messed up because ADF is adding divs around the <af:outputText> tags, as well as completing the li tags before my ones. Surely there is a way to do this either through the framework or other means? Anyone know?
Edited by: Ross on 30-Nov-2011 22:08An option is to wrap your elements in an af:panelList with listStyle='list-style-type:decimal', such that the af:panelList does the numbering of the elements for you. More information on the af:panelList can be found here: http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_panelList.html
For the second list item made up of your 3 components, try wrapping them in a horizintal af:panelGroupLayout.
eg:
<af:panelList id="pl1" listStyle='list-style-type:decimal'>
<af:outputText value="something" />
<af:panelGroupLayout layout="horizontal">
<af:outputText value="something2" />
<af:goLink text=" text " id="gl1" destination="/faces/mypage.jsp"/>
<af:outputText value="something3" />
</af:panelGroupLayout>
</af:panelList>CM. -
Error while editing a list item - SharePoint 2010.
Hi ,
i have 2 site collection one is read only site and another one is authoring site. both site collection are inside single web application and referring same content database.
when i try to edit a list item using authoring site i am getting the below error message. this is for all the lists in the site.
" the item is no longer available. it may have been deleted by another user. click ok to refresh the page."
i am able to edit the list items using read only site as an administrator.
please help me on these.This could be a permission issue, refer to the following post for more information
http://techtrainingnotes.blogspot.in/2012/02/sharepoint-error-this-item-is-no-longer.html
Cheers, -
List item problem in oracle forms 6i
Hello,
I've 10 test filed, in-front of each text field there are 10 list item (separate list item)
for each list item element list is given below
Route
Customer name
Delivery date
Delivery Time
Delivery Session
Expected received
Actual Received
Fresh Received
Rate per liter
Debit Amount
On text fields I am fetching records from another file. User will map the list item with text item.
What i want to check is, list item should not get repeated. i.e suppose I've run time display like this
text item
list item
A
ROUTE
B
DELIVERY DATE
C
DELIVERY TIME
D
DELIVERY DATE
E
EXPECTED RECEIVED
F
ACTUAL RECEIVED
G
FRESH RECEIVED
H
RATE PER LITER
I
DEBIT AMOUNT
J
DELIVERY SESSION
on text filed B- DELIVERY DATE is assign and at text field D again DELIVERY DATE is assign. I want to avoid this thing and prompt the user regarding the same. How should I go about this? Should I design a button for validation, if yes then what should be the code? or should i go with WHEN-LIST-CHANGE? if so, then what should be the code?
my design time display is like this
text
list item
txt1
lst1
txt2
lst2
txt3
lst3
txt4
lst4
txt5
lst5
txt6
lst6
txt7
lst7
txt8
lst8
txt9
lst9
txt10
lst10
please suggest something
Thank You
SamTHe most user-friendly way would be to remove elements from all other lists when they are chosen once. You would have to have a WHEN-LIST-CHANGED-trigger on all listitem and populate the the listitems accordingly.
-
List Item problem in oracle forms
Hi,
I am using list item in oracle forms 6i and facing one problem. I am populating list using following built-in.
Clear_list()
Create_Group_From_Query( )
Populate_list()
The problem I am facing is when list gets populate it keep the cursor at last element of list with null value. I want cursor to go at first item in the list. Is this thing is possible. The list item I am using is pop-list. In combo its showing list perfectly but I have to use pop-list only. Please help to come out of this problem.
Thanks in advance
Shweta.Hi Shweta,
Please post your query in Oracle Forms discussion forum.
Thanks,
Wilson. -
Unable to Read Calendar List Items through CAML
Hi All,
* I have created two columns in calendar one Year and other Month.When new event is added in calendar through (Item Added) event receiver I am setting the values to this columns as Name of Month to(February) and Year as(2014) .So that I can fetch the
data easily based on month and year
* Through this Columns Secondly when I try to fetch the data to count number of items of particular month and year using caml query I am getting error as below .
"Error:One or more field types are not installed properly. Go to the list settings page to delete these fields."
*My below caml code is working fine if i applied to custom list,But not to calendar.Can any one help me for what reason I am unable to fetch data
Code
string year="2014";
string month="February";
SPSite mysite = SPContext.Current.Site;
SPWeb myweb = mysite.OpenWeb();
SPList mylist = myweb.Lists["Calendar"];
SPQuery myquery = new SPQuery();
myquery.Query = @"<Where>
<And>
<Eq>
<FieldRef Name='Year'/>
<Value Type='Text'>" + year + @"</Value>
</Eq>
<Eq>
<FieldRef Name='Month' />
<Value Type='Text'>" + month + @"</Value>
</Eq>
</And>
</Where>";
SPListItemCollection totaltiems = mylist.GetItems(myquery);
Label1.Text= "Total Number of Items is "+" "+totaltiems.Count.ToString();
Thanks, Quality Communication Provides Quality Work. http://siddiq-sharepoint2010.blogspot.in/ Siddiqali Mohammad .Hi,
According to your post, my understanding is that you got an error when read calendar list items using CAML.
I created two single line of text columns in the Calendar( Year and Month), then add items in the Calendar to check with your code. The CAML query worked well as below.
string year = "2014";
string month = "February";
using (SPSite oSiteCollection = new SPSite("Your site URL"))
using (SPWeb myweb = oSiteCollection.OpenWeb())
SPList mylist = myweb.Lists["Calendar"];
SPQuery myquery = new SPQuery();
myquery.Query = @"<Where> <And> <Eq> <FieldRef Name='Year'/> <Value Type='text'>" + year
+ "</Value></Eq><Eq>+ "
+ " <FieldRef Name='Month' />+ "
+ " <Value Type='text'>" + month + "</Value>+ "
+ " </Eq> </And></Where>";
SPListItemCollection totaltiems = mylist.GetItems(myquery);
Console.WriteLine( "Total Number of Items is " + " " + totaltiems.Count.ToString());
Console.ReadLine();
Which type of the two columns in your Calendar? Were they text type?
Are you sure the field name(<FieldRef Name='Year'/>,
<FieldRef Name='Month' />) is same as internal name?
We should only use internal name while refrencing columns in CAML query. If you have space In you column , replace it with "_x0020_", such as
News_x0020_Category.
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Unable to populate list items with criteria
Hi
I want to populate some values based on condition in a text field.
I tried the code wihtout condition in new form instance and its working fine but when i tried with an condition on when mouse click on list item and its working for first action.If list having more than 1 values in list its became blank and not working
DECLARE
group_name varchar2(40) :='LSTCUR';
group_id RecordGroup;
list_id item := Find_item('TB.LSTCUR');
status NUMBER;
begin
IF Id_null(group_id) THEN
group_id := Create_Group_From_Query('LSTCUR','select distinct curr,curr from REC_CURR_V where br =:TB.PSRCH');
END IF;
Clear_list(list_id);
status := Populate_Group('LSTCUR');
Populate_list(list_id,group_id);
end;
rgds
soumyasoumya,
Try this code.
DECLARE
RG_Group_ID RECORDGROUP;
Num_Status NUMBER;
BEGIN
RG_Group_ID := FIND_GROUP('LSTCUR');
IF NOT Id_Null(RG_Group_ID) THEN
DELETE_GROUP(RG_Group_ID);
END IF;
RG_Group_ID := CREATE_GROUP_FROM_QUERY('LSTCUR', 'SELECT DISTINCT CURR, CURR FROM REC_CURR_V WHERE BR = ''' || :TB.PSRCH || '''');
CLEAR_LIST('TB.LSTCUR');
Num_Status := POPULATE_GROUP('LSTCUR');
POPULATE_LIST('TB.LSTCUR', RG_Group_ID);
END;Regards,
Manu.
If my response or the response of another was helpful, please mark it accordingly -
Open a SharePoint List item in Modal Pop up in SP 2013 fails after you filter or sort the list
Sorry for the long post. This has been killing me. I had this script working perfectly fine in SharePoint 2010 (online) and basically i have a source custom list (list A) with a hyperlink column and a Destination List with say title and my name.
Source List (list A) looks like this with these 2 columns
Title Test Link
A Link 1
B Link 2
C Link 3
Each of these links link to the actual list item in the destination list, so for example, link 1 is/sites/2013DevSite/Lists/Destination%20List/EditForm.aspx?ID=1
So basically i want anytime the Link are clicked that point to another list's item to open in a modal dialog and the script below worked perfectly fine in SharePoint 2010 (online)
<script language="javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script language ="javascript" type="text/javascript">
jQuery(document).ready(function() {
jQuery('a[href*="EditForm.aspx"]').each(function (i, e) {
// Store the A tag's current href in a variable
var currentHref = jQuery(e).attr('href');
jQuery(e).attr({
'href': 'javascript:void(0);',
// Use the stored href as argument for the ShowInModal functions parameter.
'onclick': 'ShowInModal("' + currentHref + '");'
function ShowInModal(href) {
SP.UI.ModalDialog.showModalDialog({title: "Edit Item", url: href});
</script>
All it does is find the href tags for that particular value Editform.aspx and the pop modal works in SP 2010 online. So the site page is designed in such a way there is a content editor web part with the reference to this javascript file and the sharepoint
list is right beneath it and this worked perfectly opening in modal windows in SP 2010.
Since migration to 2013, this is what exactly happens
1.) when you come to the site page, the modal works,
2.) If you filter or sort on say the Title or Test Link column in Source list (lets say you select the Value A), the script does not fire at all, if i hover over the hyperlink, the who hyperlink is shown and does not open the hyperlink in the modal pop up.
- This is important because i want to be able to sort on a particular item...
Could someone please let me know what am i doing wrong and why is this not working when i sort the list. Thanks for all the help.
Once again i am trying to open a sharepoint list item in Sharepoint 2013 from another list using JqueryA ListItem has its own unique row id so in all likelihood, an insert with the same data will result in a new list entry. The Lists Web Service however, has an UpdateListItem method which will take an update request. [refer
http://msdn.microsoft.com/en-us/library/office/websvclists.lists.updatelistitems(v=office.15).aspx ]
There is another note in the conference (marked answered) to your List Item Update problem. Probably worth a try too. [refer
http://social.msdn.microsoft.com/Forums/en-US/bee8f6c6-3259-4764-bafa-6689f5fd6ec9/how-to-update-an-existing-item-in-a-sharepoint-list-using-the-wss-adapter-for-biztalk?forum=biztalkgeneral ]
Regards. -
Hi Everyone,
A Very Very Happy, Fun-filled, Awesome New Year to You All.
Now coming to the discussion of my problem in Oracle Forms 6i:
I have created a form in which the data is entered & saved in the database.
CREATE TABLE MATURED_FD_DTL
ACCT_FD_NO VARCHAR2(17 BYTE) NOT NULL,
CUST_CODE NUMBER(9),
FD_AMT NUMBER(15),
FD_INT_BAL NUMBER(15),
TDS NUMBER(15),
CHQ_NO NUMBER(10),
CREATED_DATE DATE,
CREATED_BY VARCHAR2(15 BYTE),
PREV_YR_TDS NUMBER(15),
ADD_FD_AMT NUMBER(15),
DESCRIPTION VARCHAR2(100 BYTE),
P_SAP_CODE NUMBER(10),
P_TYPE VARCHAR2(1 BYTE)
The form looks like below:
ENTER_QUERY EXECUTE_QUERY SAVE CLEAR EXIT
ACCT_FD_NO
CUST_CODE
FD_AMT
FD_INT_BAL
PREV_YR_TDS
TDS
ADD_FD_AMT
P_SAP_CODE
P_TYPE
CHQ_NO
DESCRIPTION
R
W
P
List Item
There are 5 push buttons namely ENTER_QUERY, EXECUTE_QUERY, SAVE, CLEAR, EXIT.
The table above is same as in the form. All the fields are text_item, except the P_TYPE which is a List_Item ( Elements in List Item are R, W & P).
The user will enter the data & save it.
So all this will get updated in the table MATURED_FD_DTL .
I am updating one column in another table named as KEC_FDACCT_MSTR.
and
I want this details to get updated in another table named as KEC_FDACCT_DTL only if the P_TYPE='P'
CREATE TABLE KEC_FDACCT_DTL
FD_SR_NO NUMBER(8) NOT NULL,
FD_DTL_SL_NO NUMBER(5),
ACCT_FD_NO VARCHAR2(17 BYTE) NOT NULL,
FD_AMT NUMBER(15,2),
INT_RATE NUMBER(15,2),
SAP_GLCODE NUMBER(10),
CATOGY_NAME VARCHAR2(30 BYTE),
PROCESS_YR_MON NUMBER(6),
INT_AMT NUMBER(16,2),
QUTERLY_FD_AMT NUMBER(16,2),
ITAX NUMBER(9,2),
MATURITY_DT DATE,
FDR_STAUS VARCHAR2(2 BYTE),
PAY_ACC_CODE VARCHAR2(85 BYTE),
BANK_CODE VARCHAR2(150 BYTE),
NET_AMOUNT_PAYABLE NUMBER,
QUATERLY_PAY_DT DATE,
CHEQUE_ON VARCHAR2(150 BYTE),
CHEQUE_NUMBER VARCHAR2(10 BYTE),
CHEQUE_DATE DATE,
MICR_NUMBER VARCHAR2(10 BYTE),
PAY_TYPE VARCHAR2(3 BYTE),
ADD_INT_AMT NUMBER(16,2),
ADD_QUTERLY_FD_AMT NUMBER(16,2),
ADD_ITAX NUMBER(16,2),
ECS_ADD_INT_AMT NUMBER(16),
ECS_ADD_QUTERLY_FD_AMT NUMBER(16),
ECS_ADD_ITAX NUMBER(16)
So for the push button 'Save' , i have put in the following code in the Trigger : WHEN BUTTON PRESSED,
BEGIN
Commit_form;
UPDATE KEC_FDACCT_MSTR SET PAY_STATUS='P' WHERE ACCT_FD_NO IN (SELECT ACCT_FD_NO FROM MATURED_FD_DTL);
UPDATE MATURED_FD_DTL SET CREATED_DATE=sysdate, CREATED_BY = :GLOBAL.USER_ID WHERE ACCT_FD_NO = :acct_fd_NO;
IF :P_TYPE='P' THEN
INSERT INTO KEC_FDACCT_DTL
SELECT FD_SR_NO, NULL, MATURED_FD_DTL.ACCT_FD_NO, FD_AMT, INT_RATE, P_SAP_CODE,
GROUP_TYPE, (TO_CHAR(SYSDATE, 'YYYYMM'))PROCESS_YR_MON,
FD_INT_BAL, (FD_INT_BAL-MATURED_FD_DTL.TDS)QUTERLY_FD_AMT , MATURED_FD_DTL.TDS,
MATURITY_DATE, P_TYPE, NULL, NULL, (FD_INT_BAL-MATURED_FD_DTL.TDS)NET_AMOUNT_PAYABLE,
NULL, NULL, CHQ_NO, SYSDATE, NULL, 'CHQ', NULL, NULL, NULL, NULL, NULL, NULL
FROM MATURED_FD_DTL, KEC_FDACCT_MSTR
WHERE KEC_FDACCT_MSTR.ACCT_FD_NO=MATURED_FD_DTL.ACCT_FD_NO;
END IF;
COMMIT;
MESSAGE('RECORD HAS BEEN UPDATED AS PAID');
MESSAGE(' ',no_acknowledge);
END;
If P_TYPE='P' , then the data must get saved in KEC_FDACCT_DTL table.
The problem what is happening is,
If i enter the details with all the records as 'P' , the record gets inserted into the table KEC_FDACCT_DTL
If i enter the details with records of 'P' and 'R' , then nothing gets inserted into the table KEC_FDACCT_DTL.
Even the records with 'P' is not getting updated.
I want the records of 'P' , to be inserted into table KEC_FDACCT_DTL, even when multiple records of all types of 'P_Type' (R, w & P) are entered.
So, can you please help me with this.
Thank You.
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
Oracle Forms Builder 6i.Its not working properly.
At Form_level_Trigger: POST_INSERT, I have put in the following code.
IF :P_TYPE='P'THEN
INSERT INTO KEC_FDACCT_DTL
SELECT FD_SR_NO, NULL, MATURED_FD_DTL.ACCT_FD_NO, FD_AMT, INT_RATE, P_SAP_CODE,
GROUP_TYPE, (TO_CHAR(SYSDATE, 'YYYYMM'))PROCESS_YR_MON,
FD_INT_BAL, (FD_INT_BAL-MATURED_FD_DTL.TDS)QUTERLY_FD_AMT , MATURED_FD_DTL.TDS,
MATURITY_DATE, P_TYPE, NULL, NULL, (FD_INT_BAL-MATURED_FD_DTL.TDS)NET_AMOUNT_PAYABLE,
NULL, NULL, CHQ_NO, SYSDATE, NULL, 'CHQ', NULL, NULL, NULL, NULL, NULL, NULL
FROM MATURED_FD_DTL, KEC_FDACCT_MSTR
WHERE KEC_FDACCT_MSTR.ACCT_FD_NO=MATURED_FD_DTL.ACCT_FD_NO;
END IF;
MESSAGE('RECORD HAS BEEN UPDATED AS PAID');
MESSAGE(' ',no_acknowledge);
It worked properly when i executed first time, but second time , in database duplicate values were stored.
Example: First I entered the following in the form & saved it.
ACCT_FD_NO
CUST_CODE
FD_AMT
FD_INT_BAL
PREV_YR_TDS
TDS
ADD_FD_AMT
P_SAP_CODE
P_TYPE
CHQ_NO
DESCRIPTION
250398
52
50000
6000
0
600
0
45415
P
5678
int1
320107
56
100000
22478
3456
2247
0
45215
R
456
320108
87
50000
6500
0
650
0
21545
W
0
In the database, in table KEC_FDACCT_DTL, the ACCT_FD_NO:250398 with P_TYPE='P' record was inserted.
ACCT_FD_NO
P_TYPE
250398
P
But second time, when i entered the following in the form & saved.
ACCT_FD_NO
CUST_CODE
FD_AMT
FD_INT_BAL
PREV_YR_TDS
TDS
ADD_FD_AMT
P_SAP_CODE
P_TYPE
CHQ_NO
DESCRIPTION
260189
82
50000
6000
0
600
0
45415
P
5678
interest567
120011
46
200000
44478
0
4447
0
45215
R
456
30191
86
50000
6500
0
650
0
21545
W
56
In the database, in the table KEC_FDACCT_DTL, the following rows were inserted.
ACCT_FD_NO
P_TYPE
250398
P
250398
P
260189
P
320107
R
320108
W
There was duplicate of 250398 which i dint enter in the form second time,
All the other P_TYPE was also inserted , but i want only the P_TYPE='P' to be inserted into the database.
I want only those records to be inserted into the form where P_TYPE='P' and duplicate rows must not be entered.
How do i do this??? -
Termstore changes are not getting reflected in the list items in SharePoint 2010 farm environment
Hi,
I had created managed metadata with termstores from central admin. Then I had created one list in which added a column of type managed metadata using the managed metadata which I had created. And also added few list items to this list.
The problem is that after updating a termstore the changes are not reflecting in the list items which were added before the update.
I have referred the following links:
http://www.paulgrimley.com/2011/02/managed-metadata-changes-not-applied-to.html
http://davidfrette.wordpress.com/2010/05/26/taxonomy-update-scheduler%C2%A0timer%C2%A0job/
According to the links we need to run Taxonomy Update Scheduler on the server for updated termstore to get reflected. After running
this scheduler on development environment changes are getting reflected but not working on the production environment.
Kindly help!
Regards, ShrutiYou should check the obvious. You made the change in dev, but did you make the change in production too? And, is the term you updated, actually the one that you are looking at in the list item?
There is not much, if anything, that can go wrong with that timer job. so I'd guess that the term you are looking at is not the one you think you are updating.
If you have double checked everything (the term is is in fact the same term id), then you may have something erroring in the update process. In this case, you should check the ULS logs for any errors.
Chris
Chris Givens CEO, Architecting Connected Systems
Blog Twitter -
Spotlight lists items and shows preview images. BUT what about showing the path/location address of an item in my computer.
Especially important if I've put the item in the wrong folder and what to locate it without multi-steps. iMac OS X 10.5 was more useful.
Old OSX Spotlight function automatically displayed path/location within the machine: e.g. desktop/folder/sub-folder/item.
Can I make Spotlight show the path?Press option-command and the path is displayed at the bottom of the little preview window. Press command-return and the enclosing folder opens.
-
Set Default Value of Multi-select list item
I have a multi-select list item I want to default the value of to '%' (which is really '%null%') and have it selected. I tried setting default value of item, but it doesn't take '%null%'. I also tried a computation with a static of
:P507_ITEM := '%null%'; How do you get the default value set and selected?Hi
Shijesh is right, you need to change your null return value and use that return value as your default. Try and use something of the same datatype as your real return values if you plan to use '%' to display all as it will make your queries simpler. eg.
Company A returns 1
Company B return 2
% returns 0
Then your query would be...
SELECT ...
FROM ...
WHERE company_id = DECODE(:P_COMPANY,1,1,2,2,0,company_id)
Hope this makes sense.
Cheers
Ben -
How to Get the required List Item values by using Where Clause
I have two tables named "TAX_RULES","BILL"
1. " Tax_Rules" (Sub_Head_Code,Tax_ID,Tax_Percentage)
{ While "Sub_Head_Code" field is unique,
Tax_ID describes that there are two kinds of Tax_IDs based on Tax_percentage which is 6% for some Sub_Head_Codes and 3.5% for the remainng Sub_Head_Codes. I have given Tax_ID 1 for 6% and Tax_ID 2 for Sub_Head_codes having 3.5%. }
2. "BILL" (Bill_ID,Sub_Head_Code,Tax_ID,Bill_Amount)
{While "Bill_ID" describes unique Bill Identification Number,
Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table}
I have design form for both tables.
In BILL form i am trying to get values of Tax_ID from Tax_Rules table at run-time by using WHEN-NEW-FORM-INSTANCE.
For this whenever i select a Sub_Head_Code in Bill Form, all the Tax_IDs that i have recorded against each Sub_Head_Code which is either 1 or 2 against 6% and 3.5% respectively.
But I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code ahould come in the LIST ITEM.
I have used WHERE clause but that is useless.
Following is the Code that i have applied in the WHE-NEW-ITEM-INSTANCE Trigger at FORM LEVEL
<CODE>
DECLARE
rg_n1 VARCHAR2(40) :='TAX_ID';
rg_idn1 RecordGroup;
gc_idn1 GroupColumn;
errcode NUMBER;
BEGIN
CLEAR_LIST('BILL.TAX_ID');
rg_idn1 := Find_Group(rg_n1);
IF Id_Null(rg_idn1) then
rg_idn1 := Create_Group(rg_n1);
gc_idn1 := Add_Group_Column(rg_idn1,'EXPLAIN',CHAR_COLUMN,60);
gc_idn1 := Add_Group_Column(rg_idn1,'TAX_ID',CHAR_COLUMN,3);
END IF;
errcode := Populate_Group_With_Query(rg_idn1,'select TAX_ID,TAX_ID from TAX_RULES');
POPULATE_LIST('BILL.TAX_ID',RG_IDn1);
END;
</CODE>In the Tax Rules table, you state:
"Sub_Head_Code" field is unique
In the Bill table, you state:
Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table
If the Sub_Head_Code is unique, then it's acting as a primary key, so Sub_Head_Code and Tax_ID in the Bill table are not behaving like a composite foreign key. The Sub_Head_Code is a foreign key, and the Tax_ID is irrelevant as far as keys are concerned.
It is not clear what it is you want to do.
If you want to display the Tax_IDs from the Bill table when you select a Sub_Head_Code from the Tax_Rules table, then change your query to:
select TAX_ID, TAX_ID from BILL where Sub_Head_Code = :Tax_Rules.Sub_Head_Code
If you want to display the Tax_IDs from the Tax_Rules table when you select a Sub_Head_Code from the Bill table, then change your query to:
select TAX_ID, TAX_ID from TAX_RULES where Sub_Head_Code = :Bill.Sub_Head_Code
If this is not what you want, then clarify what it is you want to do. Don't say:
"I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code"
because it is not clear what tables you are referring to. -
Enable or disable particular record in list item based on a corresponding c
Hi,
How can i Enable or disable property of particular record in list item (multi record) based on a corresponding check box(multi record) ,
e.g Form Structure:
if press a button then record should populate where multi_post_query
if my_check_box = 1 then
my_list_item disable to update;
else
my_list_item enable to update;
end if;
now wanted result is like below
my_check_box ---- my_list_item
+----------------------enable
+----------------------enable
+----------------------enable
_----------------------Disable
_----------------------Disable
Here "+" means checked,"_" means unchecked and "enable" means updatable "Disable" means not updatable
the pseudo code is like,
if my_check_box = 1 then
my_list_item enable to update;
else
my_list_item disable to update;
end if;
Note: my_check_box is not updatable
please tell me which trigger and where I should create
Thanks
Edited by: 838602 on Feb 21, 2011 11:12 PM
Edited by: 838602 on Feb 22, 2011 1:40 AMHi Abdetu,
I created WHEN-NEW-RECORD-INSTANCE Trigger at data block level
And I need should work like below pseudo code (sorry for previous pseudo code)
if my_check_box = 1 then
my_list_item disable to update;
else
my_list_item enable to update;
end if;
so change code as
IF :MULTI.PROTECTED_FIELD = 1 THEN
SET_ITEM_PROPERTY ('MULTI.ACTION',REQUIRED , PROPERTY_FALSE );
SET_ITEM_PROPERTY('MULTI.ACTION',NAVIGABLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY ('MULTI.ACTION' ,UPDATE_ALLOWED,PROPERTY_FALSE);
SET_ITEM_PROPERTY ('MULTI.ACTION' ,INSERT_ALLOWED,PROPERTY_FALSE);
:multi.action := 0;
ELSE
SET_ITEM_PROPERTY ('MULTI.ACTION',REQUIRED , PROPERTY_TRUE);
SET_ITEM_PROPERTY('MULTI.ACTION',NAVIGABLE,PROPERTY_TRUE);
SET_ITEM_PROPERTY ('MULTI.ACTION' ,UPDATE_ALLOWED,PROPERTY_TRUE);
SET_ITEM_PROPERTY ('MULTI.ACTION' ,INSERT_ALLOWED,PROPERTY_TRUE);
END IF;
Sorry, still I am not getting desired o/p. even i check item (ACTION) level Trigger
Note: my_check_box is not updatable
that would assign at time of button press (post query) as i mentioned
Edited by: 838602 on Feb 22, 2011 1:41 AM -
How do I change multiple list items at once in a SharePoint list with ribbon button
Hi
I have a sharepoint list and a ribbon button that open a dialog box with buttons to set color on a row
The problem is that i can only selecet one item at once to set the color.
How can i do so it could set all or a couple items att once to the color i want
I want to do this with javascript
here is the code i use to get the item id and the color code is in a seperate js file
'use strict';
var clientContext, hostweburl, parentContext, parentWeb, selectedItem, itemId, listId;
clientContext = new SP.ClientContext.get_current();
hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
listId = decodeURIComponent(getQueryStringParameter("SPListId"));
itemId = decodeURIComponent(getQueryStringParameter("SPListItemId"));
parentContext = new SP.AppContextSite(clientContext, hostweburl);
parentWeb = parentContext.get_web();
selectedItem = parentWeb.get_lists().getById(listId).getItemById(itemId);
$(document).ready(function () {
clientContext.load(selectedItem);
clientContext.executeQueryAsync(OnSuccess, OnFail);
function OnSuccess() {
$("#Blue").click(function () {
selectedItem.set_item('Color', 'Blue');
selectedItem.update();
clientContext.load(selectedItem);
clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
$("#Green").click(function () {
selectedItem.set_item('Color', 'Green');
selectedItem.update();
clientContext.load(selectedItem);
clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
$("#Red").click(function () {
selectedItem.set_item('Color', 'Red');
selectedItem.update();
clientContext.load(selectedItem);
clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
$("#Transparent").click(function () {
selectedItem.set_item('Color', 'No Color');
selectedItem.update();
clientContext.load(selectedItem);
clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });Check if below can help you
http://sp2010batchedit.codeplex.com/
http://sharepoint.stackexchange.com/questions/35935/use-view-ribbon-custom-action-on-multiple-list-items
http://webcache.googleusercontent.com/search?q=cache:XqMO-PRLHQIJ:dannyjessee.com/blog/index.php/2014/06/enabling-custom-ribbon-buttons-dynamically-based-on-multiple-selected-item-values-using-refreshcommandui-and-jsom/+&cd=1&hl=en&ct=clnk&gl=in
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="DannyJessee.TestCustomAction"
Location="CommandUI.Ribbon"
RegistrationId="100"
RegistrationType="List">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.ListItem.Actions.Controls._children">
<Button Id="DannyJessee.MarkItemsFinishedButton"
Command="cmdMarkItemsFinished"
Image16by16="/_layouts/images/kpinormallarge-0.gif"
Image32by32="/_layouts/images/kpinormallarge-0.gif"
LabelText="Mark as Finished"
TemplateAlias="o2" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="cmdMarkItemsFinished"
CommandAction="javascript:MarkItemsFinished();"
EnabledScript="javascript:EnableFinishedButton();">
</CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
<CustomAction Id="DannyJessee.TestScript"
Location="ScriptLink"
ScriptSrc="/_layouts/15/CustomRibbonButton/CustomAction.js" />
</Elements>
If this helped you resolve your issue, please mark it Answered
Maybe you are looking for
-
How Can I Delete All Keywords in All Files?
I'm starting to get the hang of how to use the keyword functions in Lightroom, and I can see that I've been sort of mis-using them for a while. In one of my catalogs, I would like to eliminate ALL the keywords I associated with ALL the files (about 3
-
How could I add a spanish voice from text-to-Speech?
I like the text-to-speech function. But there is no Spanish Voice. How could I add a Spanish voice to it? I use Captivate 5.5. Your reply will be greatly appreciated.
-
Can you add grid lines in Photoshop Touch?
I would like to be able to add grid lines to an image in Photoshop Touch. Is that possible?
-
Background execution of reports
Hi Experts, I have a report the output of which is an ALV. Now If the report is run as such, the o/p is correct. But if I run the same report in background, the layout is coming incorrect. Although the titles of ALV (eg. article, site, storag
-
I have iphone 4 with virgin mobile canada, virgin provided me SIM unlock code online, but i don't know how to use that code to unlock my phone. Can anyone help me in this?