Programatically set where clause or view criteria not working in managed bean
I get a view using finditerator then then apply setwhere or view criteria but it does not filter the original rows. code is as follows
DCIteratorBinding dcIter3 =
ADFUtils.findIterator("PlanColorsIterator");
ViewObject cvo = dcIter3.getViewObject();
cvo.setNamedWhereClauseParam("Plno","4000"); // not working
/* // not working
cvo.applyViewCriteria(cvo.getViewCriteriaManager().getViewCriteria("PlanColorsCriteria"));
cvo.ensureVariableManager().setVariableValue("Plno", "4000");
cvo.executeQuery();
/* not working
cvo.setWhereClause("plan_no = :ThePlanType");
cvo.defineNamedWhereClauseParam("ThePlanType", null, null);
cvo.setNamedWhereClauseParam("ThePlanType", "4000");
cvo.executeQuery();
thanks for reply.
Jdeveloper version is 11.1.1.4.0.
Actually the vo on which I am trying to set set where is used as source to act as cursor to get values from filtered rows using set where and copy the this cursor values to another target vo. I am not showing these source values just getting values.
DCIteratorBinding dcIter2 =
ADFUtils.findIterator("PlotDtl2Iterator");
ViewObject dvo = dcIter2.getViewObject();
// colors to copy
DCIteratorBinding dcIter3 =
ADFUtils.findIterator("PlanColorsIterator");
ViewObject cvo = dcIter3.getViewObject();
cvo.setNamedWhereClauseParam("Plno","4000");
cvo.applyViewCriteria(cvo.getViewCriteriaManager().getViewCriteria("PlanColorsCriteria"));
cvo.ensureVariableManager().setVariableValue("Plno", "4000");
cvo.executeQuery();
cvo.setWhereClause("plan_no = :ThePlanType");
cvo.defineNamedWhereClauseParam("ThePlanType", null, null);
cvo.setNamedWhereClauseParam("ThePlanType", "4000");
cvo.executeQuery();
int totalCount=cvo.getRowCount();
cvo.setRangeSize(totalCount);
Row[] rArray=cvo.getAllRowsInRange();
for (Row r:rArray){
NameValuePairs nvp = new NameValuePairs();
nvp.setAttribute("Description",r.getAttribute("Description"));
nvp.setAttribute("PlanNo",r.getAttribute("PlanNo"));
nvp.setAttribute("MainAcc",r.getAttribute("MainAcc"));
nvp.setAttribute("Plqty",r.getAttribute("Qty"));
nvp.setAttribute("Cdkid",r.getAttribute("CdkId"));
nvp.setAttribute("FabricCode",r.getAttribute("FabricCode"));
nvp.setAttribute("DyeWash",r.getAttribute("DyeWash"));
// nvp.setAttribute("Description","test");
Row drow = dvo.createAndInitRow(nvp);
dvo.insertRow(drow);
Similar Messages
-
Group by, setting where clause in View Objects
Hello,
I have a problem with View Objects in BC4j. Cause I cannot use a column in the where clause of a view object that is not also an attribute of the view object, I am unable to group a statement as I want to. Is there a way to solve this problem?
Thanks in advance!
BrittaWhat version are you using..I tried a simple WHERE clause using an attribute which is not part of the VO and that works ok....
Thanks
Grant Ronald
Oracle Product Management -
@EJB not working for managed beans in adfc-config
using adf 11.1.1.3
We have an application that uses EJB (deployed on the same WLS as our application). We notice that when we create managed beans in the adfc-config and use the @EJB annotation to get an instance of the sessionbean, it is not working.
The error we get is a simple nullPointerexception pointing to the EJB.
When we register the bean in faces-config.xml instead of adfc-config.xml, we do get an instance of the EJB.
I also get a nullpointerException when i add the managed bean to a taskflow instead of the adfc-config.
This is an example of the bean:
public class HomeTest {
@EJB
MyService service;
public HomeTest() {
public List getData(){
return service.getSomedata();
}When i register this bean in adfc-config i get a nullpointer on service.
When i register the same bean in the faces-config, it is working.Frank,
Thanks! I think i managed to implement the workaround:
This is my bean that has been registered in the faces-config:
public class BeanHelper {
@EJB
private MyEJB myEjB;
public BeanHelper() {
super();
public MyEJB getMyEJB()
return myEJB;
}In my adfc managed bean i use
MyEJB myEJB = (MyEJB)JSFUtils.get("#{BeanHelper.myEJB}");This is working fine.
This way i no longer need to use a direct lookup and i don't need to know the exact path and so on for the EJB.
Thanks Frank!
Is there a way to let Oracle update the bug with this workaround so if other people find the bug, they know how to implement a workaround? -
Bc4j: set where clause at runtime for view objcet ?
how to set where clause for a view object that is not put in a subselect at runtime ?
select a.para_id, b.para_para_id
from table1 a, table2 b
need to set at runtime either:
where a.para_id = b.para_para_id
or:
where a.para_id = b.para_para_id(+)
problem is that bc4j is useing it as followed:
select * from (
select a.para_id, b.para_para_id
from table1 a, table2 b
) where (a.para_id = b.para_para_id(+))
cant use outer join like this
any suggestionsIf you do not want to issue the framework built query, you may want to set the query for a VO yourself instead of setting just the where clause by using setQuery() api. TO revert back to framework built query, call setQuery(null).
This way, when you need the xtra where-clause and not the "innerSQL stuff", you can build a custom sql with whereclause etc, and call setQuery(), execute that SQL, perform your tricks with the VO and then when the VO is usage is done, reset the VO query to original by calling setQuery(null). -
How to set Where clause in the View Object of the MessageChoice ?
Hi,
How to set Where clause in the View Object of the
MessageChoice ?
Example:
<bc4j:rootAppModuleDef name="EdEscolaCampusView1AppModule"
definition="ed00050.Ed00050Module"
releaseMode="stateful" >
<bc4j:viewObjectDef name="EdEscolaCampusView1" >
<bc4j:rowDef name="CreateEdEscolaCampusView1" autoCreate="true" >
<bc4j:propertyKey name="key" />
</bc4j:rowDef>
</bc4j:viewObjectDef>
<bc4j:viewObjectDef name="ListaTipLocalView1"
rangeSize="9999">
</bc4j:viewObjectDef>
</bc4j:rootAppModuleDef>
</bc4j:registryDef>
messageChoice declaration:
<bc4j:messageChoice name="SeqTipoLocalCampus"
attrName="SeqTipoLocalCampus"
prompt="Local do Campus">
<contents>
<bc4j:optionList attrName="SeqTipoBasico"
textAttrName="NomTipoBasico"
voName="ListaTipLocalView1"/>
</contents>
</bc4j:messageChoice>
I would like set where clause of ViewObject, with dinamic parameters (using attribute1 = :1), before populate messageChoice.
thanks...
DaniloHi Andy,
I try set a where clause using the message:
Set where Clause parameter using UIX , but my UIX Page have 2 messageChoice's of different ViewObject's, then I need implement this Java Class:
//Nome da Package da Tela Detail
package br.com.siadem.siaed.ed00050;
// Importa as Bibliotecas necessárias
import oracle.jbo.ViewObject;
import oracle.jbo.ApplicationModule;
import oracle.jbo.client.Configuration;
import oracle.cabo.servlet.BajaContext;
import oracle.cabo.servlet.Page;
import oracle.cabo.servlet.event.PageEvent;
import oracle.cabo.servlet.event.EventResult;
import oracle.cabo.data.jbo.servlet.bind.*;
import oracle.cabo.ui.data.BoundValue;
import oracle.cabo.ui.data.DataBoundValue;
import javax.servlet.http.HttpServletRequest;
import br.com.siadem.siaed.util.*;
import javax.servlet.http.Cookie;
import oracle.cabo.data.jbo.def.NestedAppModuleDef;
import oracle.cabo.data.jbo.def.ViewObjectDef;
import oracle.cabo.data.jbo.def.AppModuleDef;
// Classe que configura os parametros para a execução da Query,
// utilizando variáveis de Sessao
public class FunPreQueryLista
public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
// TrataDadosSessao - Classe utilizada para retornar os valores das variáveis de sessão genéricas
// Ex: CodCliente, CodMunicipio etc...
TrataDadosSessao varDadosSessao = new TrataDadosSessao();
// 1o. Parametro Configurado - Através da classe TrataDadosSessao, utilizando um método Get
// <alterar>
String valor1 = varDadosSessao.getCodCliente();
String valor2 = varDadosSessao.getCodMunicipio();
//Cria o objeto que retorna o ApplicationModule
ApplicationModule am = ServletBindingUtils.getApplicationModule(context);
// Início das Configurações da Query da Lista
//Cria o objeto que retorna o view object da lista desejada
//alterar
ViewObject TipoLocal = am.findViewObject("ListaTipoLocalView1");
//Configuração dos parametros definidos na query do view Object
//alterar
TipoLocal.setWhereClauseParam(0,valor1);
TipoLocal.setWhereClauseParam(1,valor2);
// Executa a Query
TipoLocal.executeQuery();
// Fim das Configurações da Query da Lista
// Início das Configurações da Query da Lista
//Cria o objeto que retorna o view object da lista desejada
//alterar
ViewObject TipoDestLixo = am.findViewObject("ListaDestinoLixoView1");
//Configuração dos parametros definidos na query do view Object
//alterar
TipoDestLixo.setWhereClauseParam(0,valor1);
TipoDestLixo.setWhereClauseParam(1,valor2);
// Executa a Query
TipoDestLixo.executeQuery();
// Fim das Configurações da Query da Lista
// Retorna o Resultado para a Página
return new EventResult(page);
The code works very well...
And, I'm sorry for my two repost's in UIX Forum about this in a few time.
Thank very much...
Danilo -
Set Where Clause of VL Using Coding???
How to Set Where Clause of VL(View Link) Using Coding???
i think,if you can not change the VL def,change the SQL(like give a translate column)
-
If statement within a view is not working correctly ?
Hi all,
maybe i am wrong but i think the if statement within a view is not working correctly. See code down below.
I would like to use the Hallo World depending on the page attribute isFrame with or without all the neccessary html tags. Therefore i have embedded the htmlb tags in an if statement. But for any reason if isframe is initial it isn't working. It would be great if anybody could help me.
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<% if not isframe is initial. %>
<htmlb:content design="design2003">
<htmlb:page title = "Top Level Navigation view">
<% endif. %>
hallo world
<% if not isframe is initial. %>
</htmlb:page>
</htmlb:content>
<% endif. %>
thanks in advance and best regards
Matthias HlubekMatthias,
The short answer: your example is <b>NOT</b> going to work. The long answer will probably 5 pages to describe. So first let me rewrite the example so that it could work, and then give a short version of the long answer. Do not be disappointed if it is not totally clear. It is rather complicated. (See the nice form of IF statements that are possible since 620.)
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<% if isframe is <b>NOT</b> initial. %>
<htmlb:content design="design2003">
<htmlb:page title = "Top Level Navigation view">
hallo world
</htmlb:page>
</htmlb:content>
<% else. %>
hallo world
<% endif. %>
So why does your example not work? Let us start with a simple tag:
<htmlb:page title = "Top Level Navigation view">
</htmlb:page>
Now, for each tag, we have effectively the opening part (<htmlb:page>), an optional body, and then the closing part (</htmlb:page>). We are now at the level of the BSP runtime processing one tag. What the runtime does not know, is whether the tag wants to process its body or not. Each tag can decide dynamically at runtime whether the body should be processed. So the BSP compiler generates the following code:
DATA: tag TYPE REF TO cl_htmlb_page.
CREATE OBJECT tag.
tag->title = 'Top Level Navigation view'.
IF tag->DO_AT_BEGINNING( ) = CONTINUE.
ENDIF.
tag->DO_AT_END( ).
You should actually just debug your BSP code at ABAP level, and then you will immediately see all of this. Now, let us mix in your example with our code generation. First you simplified example:
<% if isframe is NOT initial. %>
<htmlb:page title = "Top Level Navigation view">
<% endif. %>
<% if isframe is NOT initial. %>
</htmlb:page>
<% endif. %>
And then with our generated code. Look specifically at how the IF/ENDIF blocks suddenly match!
if isframe is NOT initial.
DATA: tag TYPE REF TO cl_htmlb_page.
CREATE OBJECT tag.
tag->title = 'Top Level Navigation view'.
IF tag->DO_AT_BEGINNING( ) = CONTINUE.
endif.
if isframe is NOT initial.
ENDIF.
tag->DO_AT_END( ).
endif.
You can see that your ENDIF statements are closing IF blocks generated by the BSP compiler. Such a nesting will not work. This is a very short form of the problem, there are a number of variations, and different types of the same problem.
The only way to solve this problem, is probably to put the body into a page fragment and include it like I did above with the duplicate HelloWorld strings. But this duplicates source code. Better is to put body onto a view, that can be processed as required.
brian -
Help viewer does not work after update to 10.4.4
Since updating to 10.4.4 my Help viewer does not work, and all of the troubleshooting fixes suggested in other threads have not had any success in resolving this. I've noted that when I go to Users>Library>Documentation>Help there is no mac.help file - can someone tell me if that means that I've lost the file altogether and need to reinstall it? I get to the first screen of the viewer, but the links from there don't work. Thanks for any help that you can provide!
Thanks for your suggestion. I downloaded OnyX and ran the cleaning function. After restarting, I opened Help and once again the first screen appeared fine. But again most of the links did not work, though those under the "What's New" heading did work. I might add that I had previously tried a variety of suggestions posted in another thread, which included deleting from the caches folder in Home>Library several files such as com.apple.helpui and help.plist in the Preferences folder. (As noted in my previous post this evening, I also created another user but that also did not have any effect.) Any other ideas? Thanks
-
IBM cognos TM1 Executive viewer is not working on direct Access
Hi,
We are implementing DirectAccess in our environment and testing applications in test lab. It has been observed that executive viewer is not working on Direct Access but working fine over VPN mobile checkpoint. When DA client click on open view button it
gives error
" Additional information:
Unable to connect to server XYZ.com using TCP-IP port 7112. Please make sure that IBM cognos TM1 executive viewer server is started and the port is not blocked by any proxy server or firewall"
but from client telnet is working on port 7112. All ports between DA server and application server are open 3389,7112 and 80.
Also select database option is grayed out and user is unable to select the database. When switching to VPN its working fine.
We are using Executive viewer 9.4.
Any help would be appreciated.It sounds like this program may not be capable of talking over IPv6, which DirectAccess uses. First make sure that when you connect it is trying to talk to a hostname and not an IPv4 address. If your program is calling for "192.168.1.100" - this is never
going to work over DirectAccess. It must call for a name that DirectAccess can resolve to an IPv6 address for communication over DA.
If you confirm it is talking to a name, and then if you confirm that you can do other things to that same name (can you RDP into the server for example?), then that confirms that DirectAccess traffic flow is working to that name/server.
If RDP works but the application still doesn't work, then the application is probably incapable of IPv6. You can either ask IBM if they have a newer version that does talk IPv6, otherwise I have a utility available that can intercept packets from these kinds
of problematic applications and flip the packets into IPv6 on the DA client. Let me know if you need any further information on that: http://www.ivonetworks.com/news/2013/05/ivo-networks-announces-app46-for-directaccess/ -
Chart view is not working in obiee11.1.1.5.0
Hi,
All types of chart views are not working(analysis compunt layout) in obiee11.1.1.5.0 version.please refer my below scren short
http://imageshack.us/photo/my-images/209/chatnotworkingobiee1111.jpg/
note:
1) no luck below link
OBIEE 11g - Cannot view charts
2) some of the servers working fine. after deployed skin some times making this kind of problem
Thanks
Deva
Edited by: Devarasu on Apr 4, 2012 10:51 AM
Edited by: Devarasu on Apr 4, 2012 11:20 AMHi,
Its reolved. our sking and style dvn files not yed updated earliear...after updated and restarted its working fine.
thanks
Deva -
Icon view is not working in my mac book pro.I tried other types of view, they all are working but icon view stopped working all of the sudden. Any suggestions how to fix it ???
1st i reinstalled snow leapord......d problem was fixed icon view was working and yesterday i installed lion....and everything is working properly....
try reinstalling......shuld work -
Dremweaver CS6. Design View is not working.
Hello.
Design View is not working.
I got this instead of normal View.
What wrong with it?
Regards,
NataSometimes it is just a temporary problem and by shutting down the DW and rebooting the system resolves such problems. Otherwise, you can try to reset the preferences using the instructions given here:
<Restore preferences | Dreamweaver CS6, Dreamweaver CC>
Or even try deleting the cache file using these instructions:
<Deleting a corrupted cache file>
Good luck. -
Brushes app question: does anyone know how to upload a brushes painting as a video? "Brushes Viewer" is not working for me.
Thanks! KARHi, Dave.
If you're using the BlackBerry browser, you can't configure anything to bypass the RIM servers. I believe you may do so by using the Opera browser, but I haven't tried it myself so cannot comment with authority.
I hope that clears up the issue for you.
- If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated. -
My Help Viewer is not working for mac help
My Help viewer is not working for mac help. Everytime i choose mac help the window opens then closes. But when i open another help like safari help it opens and works fine. If i switch it back to mac help the window just closes and the application quits.
If you know how to fix please telll!noname212,
Using "Search Discussions" with the term "Help Viewer" you will lead you to numerous posts which refer to Troubleshooting Help Viewer by Dr. Smoke.
Good Luck
;~) -
[svn] 1967: * Fixed issue where -keep-generated-actionscript would not work
Revision: 1967
Author: [email protected]
Date: 2008-06-05 08:12:21 -0700 (Thu, 05 Jun 2008)
Log Message:
* Fixed issue where -keep-generated-actionscript would not work
properly when -generate-abstract-syntax-tree was enabled, which is
now the default.
tests Passed: checkintests
Needs QA: YES
Needs DOC: NO
API Change: NO
Reviewer: clucier
Code-level description of changes:
CompilerConfiguration.java
Modified setKeepGeneratedActionScript() to force AST generation
off when the value is true.
Modified Paths:
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.javaRemember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them. This may or may not be unique to Arch Arm, so you might try asking on their forums as well.
Maybe you are looking for
-
How to get the output of a C prgram to Java to the parent Java program
Hi, Suppose there is a Java Program which calls inside it the C program.The C program outputs as below printf("%c%c",c1,c2); Now I have to take this output as an input of the Java Program for further processing.How can I do this? Tapas
-
Hi there and hello everybody. I am writing a book and have been using Libre Office and would like a better word processing package. I have heard that Pages 5 is better than the latest one. I need to be able to put my Libre Office documents into Pages
-
Win 7 Pro 64-bit / DW CS5 crashes when opening files with external links
open any html, php, etc with a link to an external file - could be any type dw cs5 crashes this is on a fresh, clean install of win 7 and cs5 suite. hard drive was wiped clean before installing Has anyone experienced this issue also? This is extremel
-
I have tried it all every support option every re-install everything but iTunes 6 will just not work on my computer any suggestions would be great!
-
Problems sending text from JavaScript to dynamic text box
For reasons which I won't bore you with, I'm trying to send text from a JavaScript to a dynamic text box in Flash. I've just spent all day wondering why I can't get it to work, despite following web guides to the letter. Finally I discovered that I'm