Dynamically setting DFF Context
Hi Guys,
I have a requirement to dynamically set the DFF context in the CO of the page (depending on various circumstances)
I have used setFlexContext in the following code to successfully set the context for my DFF in the Requisition Headers page:
//Set the context on the Requisition Header DFF.
OADescriptiveFlexBean dffBean = (OADescriptiveFlexBean) webBean.findChildRecursive("XXNRReqHeaderDFF");
try {
if (dffBean != null) {
pageContext.writeDiagnostics(this, "Ravi: Found XXNR DFF Bean. Setting Context to COOM", 4);
dffBean.setFlexContext(pageContext, "COOM");
dffBean.mergeSegmentsWithParent(pageContext);
dffBean.processFlex(pageContext);
else {
pageContext.writeDiagnostics(this, "Ravi: Did not find DFF Bean", 4);
} catch (Exception e) {
pageContext.writeDiagnostics(this, "Ravi: Could not set the Context", 4);
e.printStackTrace();
This was a simple page with only one Header DFF instance and the code above works perfectly.
Now I wish to use the same code to set the DFF context on the Requisition Lines Page. The above code does not work there.
The problem is that in the lines page, the DFF gets replicated for each of the requisition Line on the page and I am not able to figure a way out to set context for each individual line.
Did anyone face similar issues before/have any ideas on how to tackle this?
TIA!
Ravi
Hi Ravi,
Please refer below code
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
pageContext.getApplicationModule(webBean).invokeMethod("refreshDetail");
pageContext.setForwardURLToCurrentPage(null,true,null,(byte)0);
public void refreshDetail()
Row[] rows = getFndApplicationVO().getFilteredRows("selection","Y");
if (rows != null)
getFndApplicationVO().setCurrentRow(rows[0]);
Please refer topic "Descriptive Flexfield in a Master/Detail Page" in Jdev guide.
Regards,
Reetesh Sharma
Edited by: Reetesh Sharma on 06-Jul-2010 06:46
Similar Messages
-
Unable to set DFF context value
Hi,
i want to set DFF context value with a variable, so i tried first to set it with a constant.
in the controller's PR
super.processRequest(oapagecontext, oawebbean);
// first, find the flexfield's handle
OADescriptiveFlexBean oaDFF;
oaDFF = (OADescriptiveFlexBean)oawebbean.findIndexedChildRecursive("DescFF");
oapagecontext.writeDiagnostics(this,"oaDFF=>"+oaDFF ,1);
// default the Attribute Category (DFF context)
oaDFF.setFlexContext(oapagecontext,"QuietanzaErarioStato");
oaDFF.processFlex(oapagecontext);
but it doesn't take any effect, the context's pickilist remains blank.
However i tried the same code with another DFF and it worked. i am wondering if there is some differences between the two DFF.
Any help will be appreciated, it'quite urgent
ThanxHi,
Please create a new region thru personalization before the region where u r DFF is present. Use re-order to take the new region before the DFF region.
Set the controller to that new region and the code that you mentioned. This process will sets the context.
Kindly refer the dev guide as i found the above solution from devguide it self.
Thanks
Raghava -
How to set Dynamic value to context variable
hi all
Can anyone suggest me how to change value of context variable.
In short i need to set dynamic value to context variable
here is my code in web.xml
*<context-param>*
*<param-name>sessionTimeOutValue</param-name>*
*<param-value>200</param-value>*
*</context-param>*ChintanPatel wrote:
here is my code in web.xml
*<context-param>*
*<param-name>sessionTimeOutValue</param-name>*
*<param-value>200</param-value>*
*</context-param>*You can set the session time using httpsession.setmaxinactiveinterval -
How to use dynamic set in calculated measure
Hi,
I have this calculated measure in my cube:
member [Measures].[Estimate]
as
iif(
isleaf([Calendar].[By Year - Quarter - Month].currentmember),
iif(
1=1, // Simplified for examples sake
[Measures].[Actual],
[Measures].[Budget]
sum(
[Calendar].[By Year - Quarter - Month].currentmember.children,
[Measures].[Estimate]
It works fine, however when the user filters on the calendar hierarchy, the totals does not seem to react. As far as I can read, this is related the use of sub cubes when filtering in Excel, and this can be fixed by using a dynamic set, but how? I am unsure
how one would use it with this measure.
Thanks in advanceThis used to be a problem with Excel 2003 though I thought it had been fixed with the more recent versions. I've only seen this issue when using named sets in a calculated measure and not when the set is defined within the calculated measure and that's corrected
by declaring EXISTING before the named set reference as below.
SET [Member Descendants] AS
[Calendar].[By Year - Quarter - Month].CurrentMember.CHILDREN
MEMBER [Measures].[Estimate] AS
IIF(
ISLEAF([Calendar].[By Year - Quarter - Month].currentmember),
IIF(
1=1, // Simplified for examples sake
[Measures].[Actual],
[Measures].[Budget]
SUM(
EXISTING [Member Descendants],
[Measures].[Estimate]
EXISTING will force the named set to be evaluated with the context of each cell evaluation.
Martin Mason Wordpress Blog -
WD_BADI_DOMODIFYVIEW - dynamically set screen element as mandatory field
Hi,
I would like to use WD_BADI_DOMODIFYVIEW to dynamically set a standard screen element on my Webdynpro as a mandatory field. Does anyone know which method in which class that I can use to set the status from 'Normal field' to 'required' ?
This is a for standard SRM webdynpro screen. Unfortunately I could not get the configuration to set the standard metadata field as a mandatory field.
Also this standard field does not have an existing binding to a context element to manipulate the status of the field. Hence I need to find a method that can directly change the attribute of this standard screen element to mandatory. I do not want to modify the webdynpro to change the status of the field to 'required'.
<promise removed by moderator>
Thanks
Liam
Edited by: c958209 on Apr 28, 2011 1:32 PM
Edited by: Thomas Zloch on Apr 28, 2011 4:58 PMHi Kiran,
I think I understand what you are suggesting now. The trouble is IF_V_SC_DOFC_I_LIMITEM (the view I'm trying to enhance) does not exist in the BAdI.
When I go to the attributes of the View of the Webdynpro component that I'm trying to enhance I do see WD_THIS refto IF_V_SC_DOFC_I_LIMITEM.
It's just that in the BAdI WD_BADI_DOMODIFYVIEW this WD_THIS is not available and trying to define it like below does not work.
Make Product Category field mandatory
lo_node = wd_context->get_child_node( co_item_data ).
lo_value = lo_node->get_element( ).
Get value of context element SH_CATEGORY_ID
lo_value->get_attribute( EXPORTING name = co_sh_category_id
IMPORTING value = lv_sh_category_id ).
IF lv_sh_category_id IS INITIAL.
DATA: lo_message_manager TYPE REF TO if_wd_message_manager.
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA wd_this TYPE REF TO if_v_sc_dofc_i_limitem. <================ This gives a syntax error "The type IF_V_SC_DOFC_I_LIMITEM is unknown
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
Report message
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = 'Please fill the Document Date'
element = lo_value
attribute_name = 'SH_CATEGORY_ID'.
ENDIF. -
Hi All,
I am working On DFF
I can able to display elements, based on DFF Context.
But I want to Hide the Global Data Element Context Segments by Controller Extension,
not by Personalization.
I am getting error while Rendering False to Global Data Element Context Segments.
Also how can we set the Context based on Reference field.?
Please Help me on this..Hi,
As per OAF development team using java script is not recommended and Oracle does not support any javascript related personalizations.
For custom pages when we are left with no choice we can use javascript. Refer
http://mukx.blogspot.com/2007/07/javascript-in-oa-framework.html
Coming to using javascript in seeded pages, my point of view is:
as long as a specific project has production support team is there we can use javascript for personalizations.
Most of the times we do extend controller for extention requirements in seeded page, but in R11 as per Dev guide "There is no guarantee that controller extensions will survive an upgrade (you should assume that they will not).".
So considering this I use javascript wherever only CO extention is required, since both are not supported by oracle :) .
Regards,
Anand -
Dynamically setting column width doesn't work all the time
I wanted to dynamically set the width of a column in a JTable to be half of the width of a another column. This should happen whenever the frame is resized. But somehow I need to tell this twice to Java. If I don't then sometimes the column width isn't set new.
Is this a Java bug or what?
public void componentResized(ComponentEvent ce)
try
ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
// Again, or it won't work:
ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
catch(SQLException e)
}Is it possible that your call to
ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMinWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
is altering the response created by
ref.table.getColumn(ref.rsmd.getColumnLabel(5)).setMaxWidth(ref.table.getColumn(ref.rsmd.getColumnLabel(1)).getWidth() / 2);
? Have you tried calling them once but in the other order? Or just calling the "setMaxWidth" call twice and leaving out the second "setMinWidth"?
Good luck... :) -
Dynamically set Tab current pages
Heres a quick summary of the situation Ive got.
Lets say I have an application with 4 report pages. Three display some data about rows in my database. All 3 contain the column Control # which is linked to the 4th report which displays more detailed information about that Control # object.
When I click on the Control # link and go to the 4th report, I would like the Tabs current for the 4th report to match the Tabs current of the page I came from. In other words, if I clicked on the Control # link on page 1, I would like the 4th pages current tabs to match page 1s current tabs. The same goes for pages 2 and 3.
Ive tried &(some global variable). and :(some global variable) and v(some global variable) in the Tabs current pages fields but that doesnt work.
Is it possible to do what Im trying to do?Reports 1, 2 & 3 all exist in individual two tab pages. Pages 1 & 2 would have the same parent tab and their own sub tab. Page 3 would have its own parent tab. When in those pages the appropriate tabs are 'current'. When I click on Control # on any page and go to page 4, I would like the source pages tabs to stay 'current' when displaying page 4.
By the way, my actual application has in the neighborhood of a dozen pages which are like reports 1,2,& 3 as I described above. Rather than build a dozen identical (with the exception of current tabs) page 4's, I would rather build one page 4 and dynamically set page 4's current tab to the source page's current tab.
It's a visual reminder to the user as to which page they were on when they clicked the Control # field.
I also have 8 - 10 SVG charts which I have linked to reports. About 6 of them display the same report using different parameters. Again, I would like THAT report to have the same current tab as the source chart (chart clicked on to invoke the report). -
Dynamically Set date not changing in schedule Job
Hi,
I have created a report with "Order Date" as one of the parameters on the selection screen. I have created a variant, say 'X' , to set this date parameter dynamiccaly as "Current date - 31 days".
I have scheduled this program to run in background with the 'X' variant daily at certain time.
Now, for the day on which I created this job , the Order Date is set to correct date . For ex if I am scheduling the job tdy it will be set to 06/10/08. However, for next day , that is tom this date is not getting changed. i.e Tommorrow again Order date is 06/10/08 but it should have been 07/10/08.
So basically this dynamically set date is not chaning in the scheduled job.
Any idea why this is happening and what is the corrective measure for this.
Thanks!There is an INITIALIZATION event in the program.......
Do the processing your date in that event only....
for ex....
select-options: date for order-date.
INITIALIZATION.
date-low = sy-datum or wat ever.
Thanks
Saurabh -
Dynamically Set Subreport Background Color to the Same Value as Main Report Background Color
I have a report that contains a subreport. The main report has groupings in it. I am dynamically setting the background color of the group rows based on an expression. That part is working fine. The problem that I am having is that
I don't know how to get the subreport to "inherit" the background color of the grouping that holds it.
Basically, I have different row shadings on my report differentiating the groupings except for the rows where the subreport shows.
How do I go about setting the subreport background color to equal it's contaiing grouping's background color? Thanks in advance for any and all assistance provided.The parameter method given by gpshukla will send the info to the subreport, but you don't need the color parameter in the main report, only the subreport. The trick is in setting the value of that parameter.
Right-click the cell with the embedded subreport, you can select subreport properties.
Select Parameters and add a parameter.
The name column is the name of the parameter in the subreport (color) and value is the value to set it to.
Set name to "color" (no quotes).
Set Value to the same expression used to set the background color for the row.
In the subreport, click the design surface to select the report (not header or footer).
In the properties pane, select background color and choose expression from the dropdown.
Type =Parameters!color.Value into the expression builder.
This will work assuming that background color in the main report row will not change without also refreshing the subreport.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek. -
Dynamically set maximum row count in Interactive Report
Hi,
Has anyone worked out a way of dynamically setting (e.g. via select list) the maximum row count value for an Interactive Report, taking into account issues with order by when the report is filtered. I'm aware of solutions like this: http://www.talkapex.com/2010/10/apex-reports-no-limit-downloads.html but as far as I can tell this doesn't work when the report is filtered and the IR is rewritten in the background. Data sets then become unreliable because they are reordered.
Thanks,
MikeHi Mike,
You can do that with javascript
gReport.search('SEARCH',100)the 100 you can replace for any number you like.I have a report with filter,sorting and groups and it is gives no problem there.
any number means any number but not higher than the number you set at Maximum Rows Per Page.
You probably can mix the solution from Martin and the above code.
Regards,
Kees Vlek
<tt>Company: http://www.orcado.nl
Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
Twitter: http://www.twitter.com/skier66</tt>
If the question is answered please change it to answered and mark the appropriate post as correct/helpfull.
Edited by: kvlek on 24-apr-2013 12:29
Edited by: kvlek on 24-apr-2013 12:35 -
Error "Lead selection not set for context node"
Hi everyone,
I've got a Tree control in WebDynpro ABAP and I've implemented an "expand all" button.
Here's the coding:
METHOD expand_node_rec.
DATA lo_el_child TYPE REF TO if_wd_context_element.
DATA lo_node_children TYPE wdr_context_child_map.
DATA wa_lo_node_children LIKE LINE OF lo_node_children.
DATA lo_nd_child TYPE REF TO if_wd_context_node.
DATA lo_kschl TYPE klschl.
DATA lv_has_children TYPE boolean.
lo_el_child = node->get_element( ).
lo_node_children = node->get_child_nodes( ).
node->get_attribute( EXPORTING name = 'KSCHL' IMPORTING value = lo_kschl ).
node->get_attribute( EXPORTING name = 'HAS_CHILDREN' IMPORTING value = lv_has_children ).
IF lv_has_children = abap_true.
node->set_attribute( name = 'IS_EXPANDED' value = abap_true ).
ENDIF.
LOOP AT lo_node_children INTO wa_lo_node_children.
lo_nd_child = wa_lo_node_children-node.
me->expand_node_rec( node = lo_nd_child ).
ENDLOOP.
ENDMETHOD.
However I'm getting the error above: "Lead selection not set for context node".
Any suggestions?
Edited by: DEVELOPMENT THEMIS on Jul 7, 2011 6:34 PMhi developement Themis,
I think u didn't diclare "node" as context node. So declare it as a context node before using as a context node..as below
DATA node TYPE REF TO if_wd_context_node.
or u can use "lo_nd_child " as ur context node in ur program in place of "node"
then I think this error will be removed.
thanks,
simadri -
How to set the Context path to AAA/BBB in Weblogic 5.1?
Hi folks,
I want to deploy a web application and set the servlet context as:
AAA/BBB. Put more simply, my application should be accessible via the
following:
http:localhost:7001/AAA/BBB/main.jsp
where http://localhost:7001/AAA/BBB maps to my document root.
One work around is to set the context to AAA:
weblogic.httpd.webApp.AAA=WebAppLocation
And in the deployment descriptor (web.xml) to register all servlets
with a BBB/ prepended to the desired alias:
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>BBB/main.jsp</url-pattern>
</servlet-mapping>
But this solution does not work for me. Parts of the application refer
the context root (AAA) and create URLs relative to that. These URLs
will not have the BBB part. Searching for it in the code and replacing
it is not desirable (we do not own the code). Does anyone have any
suggestions?
Thanks in advance,
Musafir
What you have done for changing the context root to "/" is all fine but it is important to know that there is a ROOT.war in the deploy folder of JBoss which by default gets bound to "/" context. You must be getting the error message like "Web mapping already exists for deployment" when you would be starting your JBoss server after changing your context root to "/". So either you can completely remove the ROOT.war from the deploy folder or change the context-root of ROOT.war by updating its web.xml like:
<web-app>
<display-name>Welcome to JBoss</display-name>
<description>
Welcome to JBoss
</description>
*<context-param>*
*<param-name>context-root</param-name>*
*<param-value>/jboss-root</param-value>*
*</context-param>*
<servlet>
<servlet-name>Status Servlet</servlet-name>
<servlet-class>org.jboss.web.tomcat.service.StatusServlet</servlet-class>
</servlet>
</web-app>
and also update the jboss-web.xml of ROOT.war:
<jboss-web>
<security-domain>java:/jaas/jmx-console</security-domain>
*<context-root>/jboss-root</context-root>*
</jboss-web>
I hope this serves your purpose.
There can be a workaround also by modifying the index.html of ROOT.war in the deploy folder of your server and redirect request to your web application using meta refresh like:
<meta http-equiv="refresh" content="0;URL='/store'"> -
How to do set apps context in java concurrent program
Hi,
Can any body help me in setting apps context in Java Concurrent program. I tried using AppsContext class and methods but did not work.
Thanks for help in advance
PavanGo on Unix box at $JAVA_TOP/oracle/apps/iby/scheduler
You will get class file FDExtractAndFormatting.
Decompile it to get source code.
Thanks, Avaneesh -
How to dynamically set the name of the generated PDF file sent by email
Hello,
I am using Reports 10g and I managed to send PDF reports by email, specifying the recipient, subject, format etc, using the reports servlet URL.
But there is one thing that I cannot find a way to do: I want to dynamically set the name of the attached file. It defaults to the name of the RDF file (eg monthly_sales.pdf). I would like it to be something more meaningful (eg monthly_sales_072010.pdf, where 072010 is the month and year passed by parameters).
Is it possible to do it?
Thanks
LuisUse System.load(...) instead of System.loadLibrary(...).
Maybe you are looking for
-
Adobe Cloud CS6 - Can't install/start AAM and CS6
Since 6 Hours i try to get the CS6 installed - hope anybody can help. - I deinstalled Photoshop CS6 beta and my CS5 completely - I deactivated my firewall - I used Adobe CreativeSuite cleaner - I downloaded the full AAM6.1 - But - when I start the AA
-
Web based worklist not working...
Hello, (on wlpi 2.1 on weblogic sp2) I've created a process that utilizes a stateless session bean. Every thing works fine when using the fat-client worklist. I wanted to use the web-based worklist with my process, so I did the following: 1.) Install
-
IBook Clamshell apple logo glow
Does anybody know how to make a iBook g3 clamshell apple logo glow like this video? http://www.youtube.com/watch?v=aV6k9el17Jg
-
Fast techniques for precisely selecting complex shapes
Are there any fast techniques that Photoshop has for selecting complex shapes, particularly outlines. I find that the Magnetic Lasso tool doesn't seem to work well when the shape is a thin outline nor does the Magic Wand seem to work well if the inte
-
I am trying to download Final Cut Pro, but it keeps telling me there is not enough space on my hard drive even though there is. Help?