Multiple selection in table filters 12c
Hi all,
I would like to filter a table using multiple values in the same filter. According to the normal behavior you can use VALUE1 OR VALUE2 OR VALUE3... in the table filter and it works but I have a new requirement where the "OR" cojuntion must be a ",".
So the question is:
How to use "," as conjuntion instead of "OR"?
Jhon
jdev 12c
Jhon, there is no such function (never has been). You are trying to create an IN clause.
What you can do it adopt the technique I outlined in my blog JDeveloper 11.1.1.6.0: Escape QBE Operators in Filterable Tables | JDev & ADF Goodies
Here I use a special syntax in the filter field to modify the query. I'm looking for '_and_' in the field to then search for the word 'and' in the column. However, you can modify the sample, use your own syntax and return an IN clause.
Timo
Similar Messages
-
Multiple selection in table not returning all selected rows
I am unable to obtain multiple selected rows from a table. I only get a single row no matter how many I select.
I have the following table
<af:table value="#{bindings.TargetSelectorTargets1.collectionModel}"
var="row"
rows="#{bindings.TargetSelectorTargets1.rangeSize}"
emptyText="#{bindings.TargetSelectorTargets1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.TargetSelectorTargets1.rangeSize}"
rowBandingInterval="0"
filterModel="#{bindings.ImplicitViewCriteriaQuery2.quickQueryDescriptor}"
queryListener="#{bindings.ImplicitViewCriteriaQuery2.processQuery}"
filterVisible="true" varStatus="vs"
selectedRowKeys="#{bindings.TargetSelectorTargets1.collectionModel.selectedRow}"
selectionListener="#{bindings.TargetSelectorTargets1.collectionModel.makeCurrent}"
rowSelection="multiple"
partialTriggers="::qryId1" id="t3"
styleClass="AFStretchWidth"
binding="#{testbean.targetselectortable}">
<af:column sortProperty="Name" filterable="true"
sortable="true"
headerText="#{bindings.TargetSelectorTargets1.hints.Name.label}"
id="c2">
<af:outputText value="#{row.Name}" id="ot33"/>
</af:column>
<af:column sortProperty="Type" filterable="true"
sortable="true"
headerText="#{bindings.TargetSelectorTargets1.hints.Type.label}"
id="c11">
<af:outputText value="#{row.Type}" id="ot34"/>
</af:column>
</af:table>
and I have the following bean method to get the selected rows
RowKeySet rks = targetselectortable.getSelectedRowKeys();
Iterator itr = rks.iterator();
Object key;
while(itr.hasNext())
key = (Object)itr.next(); targetselectortable.setRowKey(key);
Object o = targetselectortable.getRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) o;
Row row = rowData.getRow();
System.out.println(row.getAttribute("Name").toString());
and I only get one row.
Note: selectedRowKeys="#{bindings.TargetSelectorTargets1.collectionModel.selectedRow}"
shows a warning that "reference selectedRow" not found.
Can I do something to make it work?can u change the logic like
RowKeySet rowSet = targetselectortable.getSelectedRowKeys();
Iterator rowSetIter = rowSet.iterator();
> while (rowSetIter.hasNext()) {
> List l = (List)rowSetIter.next();
> Key key = (Key)l.get(0);
>
FacesContext fc = FacesContext.getCurrentInstance();> BindingContainer bindings =
> (BindingContainer)fc.getApplication().evaluateExpressionGet(fc,
> "#{bindings}",
> BindingContainer.class);
>
DCBindingContainer bindings = (DCBindingContainer)bindings ;> DCIteratorBinding iter =
> bindings.findIteratorBinding("TargetSelectorTargets1Iterator");
>
> iter.setCurrentRowWithKey(key.toStringFormat(true));
> Row r = iter.getCurrentRow();
> System.out.println(row.getAttribute("Name").toString());
> } -
HI Team, When I try to select the multiple selection for field Material in table Mara, the To value is not displayed
e.g in table mara if i select the material option from A* to Z*, all the materials are displayed from A until x but no of the materials are displayed starting with Z. I have found this as standard functionality in SAP and happens for all fields with multple selection in tables. can you guys advise if there is an OSS note for this?
Thanks,
SunnyHai Sunny,
Please check Do you have material staring with Z
and check is there any
Maximum No. of Hits restriction.
Till you get SAP notes
Create a query in SQVI for only ine table and
MARA and tick mark the selection b fields and fields to be displayed in the report.
Now in the report selection screen you will get TO option as well it will list all the Z materials.
Regards,
Mani -
Help needed with singleSelection and multiple selection in table.
Hi ,
How do i implement the singleSelection and multipleSelection on table rows.
How do i capture the checked rows?
How should the code be written and where should it be written.
I should be capturing the values of the checked rows and pass it to the pl/sql package.
I have a table - in -table so there is a singleselection on the outer table and multiple selection on the Inner table.
Could anyone help me with this.
Thanks,One solution to most of your questions : Read the advanced table section of Dev guide.
Always go through the dev guide before putting up the issue. Let the forum be for those scenarios which dev guide doesn't covers in much detail.
--Shiv -
Multiple Selection in Table in uix page
Hello EveryBody,
I'm using jdeveloper 9051+adf+uix.
I'm using multiple Selection in a table (dragged as read only table of a View Object).
Now i've to perform some action on the selected rows from the page.
How to implement this feature please help me to solve this problem.
Waiting for the reply
Thanks and Regards
MinaHi RB,
Yes still you can use this.
Ex:
for(int k=0;k<wdContext.nodeEmployeeInfo().size();k++)
if (wdContext.nodeEmployeeInfo().isMultiSelected(k))
/* Here you will get all the list of selected rows */
Regards, Anilkumar -
Hi,
I have a table control which is configured for multiple selection.
But, I need to get the list of selected rows?
How can I do it?
I didn't find any methods on the table control or at the context node.
Can anyone guide me out of this issue?
Thanks and regards
RBHi RB,
Yes still you can use this.
Ex:
for(int k=0;k<wdContext.nodeEmployeeInfo().size();k++)
if (wdContext.nodeEmployeeInfo().isMultiSelected(k))
/* Here you will get all the list of selected rows */
Regards, Anilkumar -
UIX/XML BC4J Retaining multiple selection in tables
We have a table with multiple selection, and we want the items to remain selected after the page refresh for some reason. Whats the cheapest way to obtain this?
Data bind the selection attribute of multipleSelection to "someKey@ctrl:eventResult". Then in your event handler use an oracle.cabo.ui.data.ServletRequestDataSet and attach it to the event result, under the key "someKey".
When the page is refreshed it should remember the multiple selection.
Regards,
John Fallows
Oracle Corporation. -
Multiple Selection of Table Rows
Hi Friends
I created a web dynpro application which displays a table with multiple records.
I added a button "REMOVE" to delete the selected rows from the table.
It is working good if I select single row, but if I want to delete more than one row I am not able to select the rows and how can I delete all the selected rows.
ThanksChange the selection property of node binded to table as 0..n.
This will allow you to select multiple rows.
To get multiple rows, use get_selected_elements method of if_wd_context_node.
Code for your reference :
DATA: wd_node TYPE REF TO if_wd_context_node,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set.
wd_node = wd_context->get_child_node( name = 'NODE' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
wd_node->remove_element( EXPORTING element = wa_temp ).
ENDLOOP. -
Multiple selection Shift & Control
Hi all,
In my webdynpro application.The only option was to select multiple records with SHIFT and deselect records with CTRL.
Is there any funtionnality in order to keep the selection by CTRL only ?
Best regardsIn recent post - someone mentioned that there is a SAP note for this behavior - although it's pretty old - so may/may not be the issue:
[SMP login required - SAP note 1306538 - Multiple selection in table not possible using CTRL|https://service.sap.com/sap/support/notes/1306538]
Is it possible that your release is at this level - looks like 7.01 SP1 to 3 has the issue but is corrected in 7.01 SP4.
Hope that is useful,
Cheers,
Chris -
How to create a table with multiple select on???
Hi all,
I am new to webdynpro and my requirement is to create a table with multiple selection on.I have to add abt 10 rows in the table but only 5 rows should be visible and moreover a verticalscroll should be available to view other rows.Can anybody explain me in detail how to do that.Please reply as if you are explaining to a newcomer.Reply ASAP as i have to do it today.
ThanxsHi,
1. Create a value node in your context name Table and set its cardinality to 0:n
2. Create 2 value attributes within the Table node name value1 and value2
3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
you have created a table and binded its value to context
Table UI properties
4.Set Selection Mode to Multi
5.Set Visible Row Count to 5
6.ScrollableColCount to 5
In your implemetaion, you can add values to table as follow:
IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
ele.setValue1(<value>);
ele.setValue2(<value>);
wdContext.nodeTable().addElement(ele);
The above code will allow you to add elements to your table node.
Regards,
Murtuza -
How to display multiple selected rows in a table inside a popup?
Hi,
I have a table on which multiple selection is enabled. I am able to get hold of multiple selected rows i.e. i am able to iterate over the selected row keys and print their values. Now, my problem is how to display the contents of all the selected rows in a popup? I get the details of only one row when I launch the popup.
Thanks
KaranHi,
Not confident if this works or not but just try it...
1. create a ViewLink between the same view Object.
The source and destination wil be the same Vo and the source and destination attribute will be the pk of both Vos.
2. Update the changes in Appln Module.
Open the AM and in DataModel tab .
select the Same VO from which you created table in the DataModel Listbox and select the VL in the "Avaible View Objects" List Box. Add under it(selected vo in datamodel listbox).
3. Refresh DataControl accordion.
4. in your jsff page drag and drop the child vo as a table..
See if it works
Regards,
Santosh. -
Toggling between single and multiple selection in a table
I am working on ADF faces. I need to switch between single and multiple selection in <af:table based on a button I select.
I cannot use switcher or rendered property inside <af:table. Only the first one is rendering the second one is not rendering based on the switch
<f:facet name="selection">
<af:tableSelectMany autoSubmit="true"
rendered="#{treeBean.multipleRows}"/>
</f:facet>
<f:facet name="selection">
<af:tableSelectOne autoSubmit="true"
rendered="#{treeBean.singleRows}"/>
</f:facet>
When I use inside the switcher, it doesn't like the parent.
Any ideas would be greatly appreciated.
Thanks,
Vijay.I have probably misunderstood what your issue is. I do not know what your version of ADF faces is. Here is some sample code working with my version. Please check if your jdev has "rowSelection" attribute. If it has, please try my sampe code
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
xmlns:af="http://xmlns.oracle.com/adf/faces">
<jsp:directive.page contentType="text/html;charset=utf-8"/>
<f:view>
<af:document title="tableSelectMany Demo">
<af:form>
<af:panelGroup layout="vertical">
<af:messages/>
<af:selectOneChoice value="#{sessionScope.tableSelection}"
autoSubmit="true"
id="selType"
label="Selection Type">
<af:selectItem label="Single" value="#{null}"/>
<af:selectItem label="Multiple" value="#{true}"/>
</af:selectOneChoice>
<af:table summary="Periodic table"
binding="#{tableActions.table}"
partialTriggers="selType"
rowSelection="#{sessionScope.tableSelection ? 'multiple' : 'single'}"
value="#{periodicTable.tableData}" var="row" rows="10">
<af:column>
<f:facet name="header">
<af:outputText value="Name"/>
</f:facet>
<af:outputText value="#{row.name}"/>
</af:column>
<af:column>
<f:facet name="header">
<af:outputText value="Symbol"/>
</f:facet>
<af:outputText value="#{row.symbol}"/>
</af:column>
<af:column>
<f:facet name="header">
<af:outputText value="Action Column"/>
</f:facet>
<af:commandButton immediate="true" text="Action"
action="#{row.action}"/>
</af:column>
</af:table>
</af:panelGroup>
</af:form>
</af:document>
</f:view>
</jsp:root> -
Adding a Multiple Selection to a Table Dynamically on Process Request
Dear All
I am trying to get a selected row in a Table in an Oracle Seeded page. I have tried Row reference but was not successful.Hence I an trying to add the Multiple selection to the same table . Please help.
The code I tried is
OATableBean tabObj=(OATableBean) webBean.findChildRecursive("partCompanyVO1");
if(tabObj!=null)
System.out.println(" Not Null ");
tabObj.setSelectionDisabledBindingAttr("Disabled");
tabObj.setSelectionDisplayed(true);
tabObj.setControlBarDisplayed(false);
tabObj.prepareForRendering(pageContext);
OAWebBeanTable tableSelectionBean = (OAWebBeanTable)tabObj.getTableSelection();
System.out.println(" tableSelectionBean "+tableSelectionBean);
OASingleSelectionBean tabSingleSelObj=(OASingleSelectionBean)tabObj.getTableSelection() ;
System.out.println(" tabSingleSelObj "+tabSingleSelObj);
if(tabSingleSelObj!=null)
tabSingleSelObj.setText("Select Object");
System.out.println(" Selection is Enabled ");
}Antony,
You will be able to get all the selected rows using
Row[] selectRows = VO.getFilteredRows("Flag","Y") ;
Regards,
Gyan
www.gyanoracleapps.blogspot.com
www.querenttech.com -
Storing Data in Context from a table (multiple selection)
Hi,
I have created a node called cauverynode, which contains cauName and cauClient as its attribute. I have bound that node with the table. Now i have to store the selected clients into a context. How can i do that? Please help me out. i am unable to store the clients in a string context. Kindly solve it. Below is the code, which will store the selected item and put into a string variable.
public void supplyCauveryNode(IPrivateSampleComponent.ICauveryNodeNode node, IPrivateSampleComponent.IContextElement parentElement)
//@@begin supplyCauveryNode(IWDNode,IWDNodeElement)
IPublicSampleComponent.ICauveryNodeNode cauNode =
wdContext.nodeCauveryNode();
ArrayList selectedcauClients = new ArrayList(cauNode.size());
for (int i = 0, n = cauNode.size(); i < n; ++i) {
if (cauNode.isMultiSelected(i) || i == cauNode.getLeadSelection())
selectedcauClients.add(cauNode.getElementAt(i));
String strSelcaucli = null;
for (int i = 0, n = selectedcauClients.size(); i < n; i++) {
strSelcaucli = strSelcaucli + selectedcauClients.get(i);
wdContext.currentContextElement().setStrCauveryClient(strSelcaucli);
//@@end
Multiple selected data is been stored in this selectedcauClients arraylist, which is not working. Kindly help me out.
Thanks & Regards,
DhanaWhat is the following code supposed to do?
String strSelcaucli = null;
for (int ix = 0, n = selectedcauClients.size(); ix < n; ix++) {
strSelcaucli = strSelcaucli + selectedcauClients.get(ix);
wdContext.currentContextElement().setStrCauveryClient(strSelcaucli);
I guess you want to create a string containing the names(?) of all selected elements.
Then you should use something like
StringBuffer sb = new StringBuffer();
for (Iterator it = selectedcauClients.iterator(); it.hasNext(); )
ICauveryNodeElement e = (ICauveryNodeElement) it.next();
sb.append(e.getName());
if ( it.hasNext() ) sb.append(",");
String csv = sb.toString();
This gives you a comma-separated list of the names of the selected elements.
Armin -
Multiple Selection in Sun RI ui:table
Hi
I want to implement multiple selection in the <ui:table> component. I have enabled the "selectMultipleButtons" check box in the component property but whenI click on it, nothing happens. How do I make the row selections work in the <ui:table>. Do I have to go the path of putting a checkbox in each row etc and keep track of the selections using HashSet? Whats the point of having the "selectMultiplebuttons", "clearMultipleButtons" properties for the component?
Is there a documentation that explains how to use these RI components.
thanks
RupakI tried your suggestion but it doesnot seem to work properly. When I click on the check box, the row doesnot get highlighted. I have set the table to paginate after every 5 entries. So If I select some entries and move to th next page and then come back again, the selections are gone. I have several tables in my page under multiple tabs. How does the "#{currentRow.tableRow}" gets resolved? How does it know the currentRow for which table? May be thats the problem.....
Maybe you are looking for
-
Where do you go for a reorder of the letterpress cards? Need more and can't seem to find the card I created anywhere.
-
VS2013 Csutom List and Field issue
Hi Folks, I have a VS2013 project for SharePoint 2013. In this project I have a custom list with several general columns in it (name, address, telephone number). I have also created a custom Field that has its own user control. If I deploy the sol
-
Essbase Error(1200370) while executing business rule
Hi, I am getting the error - Cannot calculate. Essbase Error(1200370): Error executing formula for [Average] (line 15): attempt to cross a null member in function [@X] on executing the following script- FIX(@RELATIVE("AltHierarchyProducts",0)) FIX("F
-
C100 footage looks horrible in PPro CC on Windows
Hi folks! I did my best to find the answer but I didn't find a good one. The same C100 (.mts) footage is imported perfectly on PPro CC on the Mac but when I bring it into PPro CC on Windows, it simply looks horrible. It's got a green cast in the shad
-
Small Font for Date in Project Planning Board
Hello Friends? Iam Using ECC 6.0 C Version in our Company. iam facing a problem in <b>CJ2B</b> that Date is displaying in very small font. i could n't solve that problem till date. Can any body help me where can we make settings for making fonts size