ValueChanged getting fired twice !!
When, in a JTable, a row is selected programaticaly, then valueChanged method is fired twice. Although this method always gets fired twice once while its adjusts data and then again after its done with adjusting.
To cope up with this problem, getValueIsAdjusting() is checked for false.
But when the row is selected programatically then the getValueIsAdjusting() is always false resulting twice execution.
let me explain again what i am doing...
quey is fire several time to populate the JTable. After each query is fired following code is executed
dbTable[0].getSelectionModel().setLeadSelectionIndex(0);
when query if fired for the first time then it works fine i.e. valueChanged is executed once only, but when query is fired again then valueChanged is executed twice
Similar Messages
-
OnSelect event for dropdownbykey, getting fired twice in IE8
When you click on key of dropdown , the event "On Select" getting fired twice in IE8.
If I try the application using Firefox, it's ok.
Someone resolve apply the oss note 1461842 and 1411235, but in both notes there's nothing about dropdownbykey.
Thanks a lot, !!!>
Baskaran Senthivel wrote:
> Hi,
>
> If i am not wrong IE8 is not in the supported list of browsers.
IE8 is supported. You can always check the latest supported browsers from the PAM (Platform Availability Matrix) http://service.sap.com/pam
IE8 does require one of the later Support Package levels, however. See the PAM for the details.
As far as the notes you reference, they might well fix your problem. The Unified Rendering fix notes often don't list all the specific issues they address. They simply list the patch level of the UR. This problem does sound like a client side/UR problem. -
Help - valueChanged(TreeSelectionevent) firing twice
Hi,
I have a Jtree in which I need to display directories and the files in them.
I need to be able to choose multiple leafs(which contains file names) only if the selected nodes represents file names with the same extension, otherwise select only the last node which broke the uniformity.
For this I have implemented a selectionmodel class in which I iterate through all the nodes and call the super.addSelectionPaths(TreePath[]) method.
My problem now is that the valueChanged() method in the listener class is fire twice for every selection.
I have no idea why is it happening like that.
Can anyone please help me out?Hi,
Thank you for going through my problem.
I have got the solution now.
The problem was that since I was overriding two methods viz. setSelectionPaths() and addSelectionPaths(), the first time a node is selected both the methods are triggered, and the subsequent selections call only the addSelectionPaths() methods.
Thanks -
Why listener methods are getting called twice ?
Hi Group,
I have a doubt, i need to know logic behind it.
Lets consider, JComboBox,
For an item state change of JComboBox,
itemStateChanged method gets called twice.
Its similar with valueChanged getting called twice
on List Selection Event.
Why does it call twice ? Is there any way, I can
have invocation only once (except flagging mechanism)?
with regards,
vikram.http://java.sun.com/j2se/1.3/docs/api/java/awt/event/ItemListener.html
tells the following:
public void itemStateChanged(ItemEvent e)
Invoked when an item has been selected or deselected. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
So the listener is notified for both items: losing and gaining selection.
If you are only interested in listening to either selection or deselection event you can check which was the cause for the method call by examing the ItemEvent parameter i.e. item_event.getStateChange() == ItemEvent.DESELECTED or ItemEvent.SELECTED and then decide whether you are interested in the event at all.
I don't know how to stop JComboBox from launching both select and deselected events. -
DimensionChangeEvent firing twice in a row
The DimensionChangeEvent seems to fire twice in a row.
Once for the width and again for the height.
My thinking it should only fire once.
What is the use case for this behavior?
pPlayer.addEventListener( DimensionChangeEvent.DIMENSION_CHANGE, mDimensionChange );
============ First event ================
mDimensionChange [Event type="dimensionChange" bubbles=false cancelable=false eventPhase=2]
evt.newWidth = 600
evt.newHeight = 0
evt.oldWidth = 0
evt.oldHeight = 0
evt.currentTarget.width = 600
evt.currentTarget.height = 0
evt.currentTarget.view.calculatedWidth = 600
evt.currentTarget.view.calculatedHeight; = 800
============ Second event ================
mDimensionChange [Event type="dimensionChange" bubbles=false cancelable=false eventPhase=2]
evt.newWidth = 600
evt.newHeight = 800
evt.oldWidth = 600
evt.oldHeight = 0
evt.currentTarget.width = 600
evt.currentTarget.height = 800
evt.currentTarget.view.calculatedWidth = 600
evt.currentTarget.view.calculatedHeight; = 800====== firing twice code ============
pPlayer.addEventListener(ViewEvent.DIMENSION_CHANGE, mDimensionChange);
====== code per your request ============
I now get a compiler error on the addEventListener:
pPlayer.addEventListener(ViewEvent.MEDIA_SIZE_CHANGE, mDimensionChange);
1119: Access of possibly undefined property MEDIA_SIZE_CHANGE through a reference with static type Class.
The online ViewEvent docs don't show a MEDIA_SIZE_CHANGE:
DIMENSION_CHANGE
Constant
public static const DIMENSION_CHANGE:String = "dimensionChange"
The ViewEvent.DIMENSION_CHANGE constant defines the value of the type property of the event object for a dimensionChange event.
VIEW_CHANGE
Constant
public static const VIEW_CHANGE:String = "viewChange"
Language Version:
ActionScript 3.0
Product Version:
OSMF 1.0
Runtime Versions:
Flash Player 10, AIR 1.5
The ViewEvent.VIEW_CHANGE constant defines the value of the type property of the event object for a viewChange event. -
Does The Query get Fired Again
Does the query get fired again when i query a existing view
1. create view abc as select name from Table
2. select name from abc
Table is a really large table wid many columns and many rows
Lookin for a better performance coz i need names in one procedure and again need the same names for deletion in another procedure
I dont want to fire the same query twice dats y.> there are like 20000 rows out of wch i need 2 retrieve 9000 or 10000 rows dependin on
the constraints
Go slow on the I'M SPEAK please... much better to deal with technical issues when using proper English.
A 20,000 rows table is tiny and running a SQL that returns 10,000 or so rows, should be execute in seconds.. the slowest part of the operation should be shipping that 10,000 rows to the client (across the network) in case of a remote client.
Maybe if you can describe the physical structure of the table (heap, index, partitioned?) and pinpoint just where the performance problem is (execution plan or an SQL*Plus autotrace), we could comment on why the performance seems (or maybe truly is) slow. -
Database call fired twice when using actionListener in dataTable
Hi all,
I have a question regarding the request bean lifecylce in the current use case (using Sun JSF 1.2)
I have a managed bean in request scope that contains an ArrayList which is used as the data provider in a dataTable on a faces page.
The bean contains an init() method to populate the ArrayList using a database call.
The dataTable also contains a column with a commandLink that calls a method via actionListener inside the managed bean to delete the current row.
When I click the link the action gets called and deletes the row from the database. I also reload the data from the database and assign it to my ArrayList.
However, the init Method is also called before the action is executed. So the database call is fired twice when hitting the link:
- First time in the init() method of the bean
- Second time in the actionListener method when reloading the data
I can not remove the call from the actionListener, because the data has not deleted yet.
Question:*
How can I make sure the database call is fired once only? (and also making sure the ArrayList is populated appropriate)
Maybe I am doing something wrong here? Thanks in advance for any help.
Maik
This is the request scope bean:
public class UserBean implements Serializable {
private List all;
private Long userId = null;
@PostConstruct
public void init() {
if(all == null) {
new ArrayList();
loadUserList();
* Constructor
public UserBean() {
super();
* @return the userId
public Long getUserId() {
return userId;
* @param userId
* the userId to set
public void setUserId(Long userId) {
this.userId = userId;
* @param all
* the all to set
public void setAll(List all) {
this.all = all;
public List getAll() throws GeneralModelException {
return all;
public void loadUserList() {
EntityManager em = Contexts.getEntityManager();
Query q = em.createNamedQuery("user.findAll");
all = q.getResultList();
public void deleteAction(ActionEvent ae) {
EntityManager em = Contexts.getEntityManager();
Query q = em.createNamedQuery("user.byId");
q.setParameter("id", userId);
try {
User user = (User) q.getSingleResult();
if (user != null) {
em.remove(user);
loadUserList();
} catch (NoResultException e) {
// TODO
}No, I do not call the init() method.
Basically the init() is called before the deleteAction() so the ArrayList still contains the old value, unless a second database call is triggered after the entity has been deleted.
Maybe I am missing something here...
See also here (JSF 1.2 RI - Bean Instantiation and Annotation)
[http://weblogs.java.net/blog/jhook/archive/2007/05/jsf_12_ri_backi.html]
Here is the init() call stack trace
Daemon Thread [http-8080-2] (Suspended (breakpoint at line 32 in UserBean))
UserBean.init() line: 32
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
DefaultAnnotationProcessor.postConstruct(Object) line: 79
Tomcat6InjectionProvider.invokePostConstruct(Object) line: 118
ManagedBeanBuilder(BeanBuilder).invokePostConstruct(Object, InjectionProvider) line: 223
ManagedBeanBuilder(BeanBuilder).build(InjectionProvider, FacesContext) line: 108
BeanManager.createAndPush(String, BeanBuilder, ELUtils$Scope, FacesContext) line: 368
BeanManager.create(String, FacesContext) line: 230
ManagedBeanELResolver.getValue(ELContext, Object, Object) line: 88
FacesCompositeELResolver(CompositeELResolver).getValue(ELContext, Object, Object) line: 53
FacesCompositeELResolver.getValue(ELContext, Object, Object) line: 72
AstIdentifier.getValue(EvaluationContext) line: 61
AstValue.getTarget(EvaluationContext) line: 59
AstValue.setValue(EvaluationContext, Object) line: 129
ValueExpressionImpl.setValue(ELContext, Object) line: 249
JspValueExpression.setValue(ELContext, Object) line: 85
RestoreViewPhase.doPerComponentActions(FacesContext, UIComponent) line: 240
RestoreViewPhase.doPerComponentActions(FacesContext, UIComponent) line: 245
RestoreViewPhase.doPerComponentActions(FacesContext, UIComponent) line: 245
RestoreViewPhase.execute(FacesContext) line: 195
RestoreViewPhase(Phase).doPhase(FacesContext, Lifecycle, ListIterator<PhaseListener>) line: 100
RestoreViewPhase.doPhase(FacesContext, Lifecycle, ListIterator<PhaseListener>) line: 104
LifecycleImpl.execute(FacesContext) line: 118
FacesServlet.service(ServletRequest, ServletResponse) line: 265 -
Re: Arrears is getting formed twice during retro run
Hi Team,
Request your Kind help urgently.
In one of my support client I am facing a problem with deduction Wage type.
Scenario is: An employee is eligible to purchase the company share up to 10% .
- The eligibility will be maintained in I T14 with a wagetype using %
- It will calculate on 10% of basic every month and share will be deducted from his pay.
- But if any Loss of pay is there it will calculate as per is working days.
For example,
- In case of changes in the basic in the month of May which is updated in the month of July, when you run the July payroll from payroll driver is running retro for both period that is May to July and gives the output correctly.
And executed the regular payroll until December.
But in January when updated IT0581 from 01/04/2010 to 31/12/9999, here when you run the January payroll run, again share purchase amount is getting calculated (twice) which should not happened, since share purchase has already calculated in the month of July(May to July) and the same amount is deducted (twice)
The calculation is happening when process of arrears is formed
Please let me know how can I stop system calculating twice share purchase. Should I write any rule or something else can be done.
Thanks & Exepcting your help
VidyaCould this help you friend:
If you whish the payroll system only to evaluate certain aspect of the payroll in orginal period then in the particular payroll scheme where it is evaluted add an IF statement in Function and the "O" value in the PAR2, next line to process your PCR and ENDIF statement after that.
So if period is orginal then evaluate whatever. Else. Read from previous result. Endif.
Greetz. -
Can someone please tell me why when i order an app on my sons ipod, do I get charged twice for it? When I tried do report a problem with the charge, it said that I can not get a refund on that item. This is the second time this has happened to me. Does it have anything to do with having more then one ipod linked to the same account? Thanks for any help you can give me!!!
It has nothing to do with have more than one device using that account.
After you purchase it once, you redownload it on other devices by the following, not like purchasing a new app.
Downloading past purchases from the App Store, iBookstore, and iTunes Store
If you really got charged twice for purchases the same app twice with the same account contact iTunes again by:
Apple - Support - iTunes - Contact Us
Make sure that they are really the same app first. -
I have a simple web page with two form elements say, two text box and submit button. when submitting my form, i didn't get the form data in my action page. This occurs only in Firefox 3.6.13 several times. Not always.
May be form get submitted twice?
Note: Remember, i am not facing this issue. However my friend is facing this issue.I have a simple web page with two form elements say, two text box and submit button. when submitting my form, i didn't get the form data in my action page. This occurs only in Firefox 3.6.13 several times. Not always.
May be form get submitted twice?
Note: Remember, i am not facing this issue. However my friend is facing this issue. -
Event handler getting fired on all list and libraries
I have created an event handler and add it to a custom content type. Some how this event handler is getting fired on each every list which are there inside a site. Below is my content type declaration with fields and event handler. This content type
is being activated using a featur scope at "Site".
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Document (0x0101) -->
<ContentType ID="0x01010069131024FE3C485FAEF6C36926B5FD67" Name="CIB Document" Group="CIB Content Types" Description="CIB Content Types" Inherits="FALSE" Version="0">
<FieldRefs>
<RemoveFieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Hidden="TRUE" Name ="Title"></RemoveFieldRef>
<FieldRef Name="Metier"
ID="{F3ABF2F2-437B-4403-8A11-BEAE9F507009}"
DisplayName="Metier"
Sealed="TRUE"
Required="FALSE" />
<FieldRef Name="Department"
ID="{0B11D33C-B8D1-485F-A483-755BFE55C2B9}"
DisplayName="Department"
Sealed="TRUE"
Required="FALSE" />
<FieldRef Name="Owner"
ID="{FC6FE3D4-5EEE-4812-A77C-499AB9927D1A}"
DisplayName="Owner"
Sealed="TRUE"
Required="FALSE" />
<FieldRef Name="ExpiryDate"
ID="{D68E037B-63A2-42FF-8150-412972CB062F}"
DisplayName="Expiry Date"
Sealed="TRUE"
Required="FALSE" />
<FieldRef Name="SecurityStatus"
ID="{5954E9C2-921B-46FB-8A7B-2BC0F62BD011}"
DisplayName="Security Status"
Sealed="TRUE"
Required="FALSE" />
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">
<spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events">
<Receiver>
<Name>CIBDocumentHandlerItemAdding</Name>
<Type>ItemAdding</Type>
<Assembly>Common.SharePoint.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=68d03adf96d84a47</Assembly>
<Class>Common.SharePoint.Web.Handlers.CIBDocumentHandler</Class>
<SequenceNumber>10500</SequenceNumber>
</Receiver>
</spe:Receivers>
</XmlDocument>
</XmlDocuments>
</ContentType>
</Elements>You need to add the ListTemplateId or ListUrl to the Receiver element,
E.g. If you had a list definition with the template ID 10500, then your event receiver XML would look like this:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="10500" >
<Receiver>
<Name>CIBDocumentHandlerItemAdding</Name>
<Type>ItemAdding</Type>
<Assembly>Common.SharePoint.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=68d03adf96d84a47</Assembly>
<Class>Common.SharePoint.Web.Handlers.CIBDocumentHandler</Class>
<SequenceNumber>10500</SequenceNumber>
</Receiver>
</Receivers>
</Elements>
Regards, Matthew
MCPD | MCITP
My Blog
Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful. -
For example, I chose to open a .pdf document I received as an attachment with Adobe Reader or iBooks, and now the document is available anytime I open Adobe Reader or iBooks. My question is if these applications are able to open the document anytime they want then the document must be available somewhere on the device, where do they get saved? And do they get saved twice if I opened the same document once with iBooks and once with Adobe Reader?
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
*Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
Do a malware check with some malware scanning programs on the Windows computer.<br>
Please scan with all programs because each program detects different malware.
Make sure that you update each program to get the latest version of their databases before doing a scan.
*Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
*SuperAntispyware:<br>http://www.superantispyware.com/
*Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
*Windows Defender: Home Page:<br>http://www.microsoft.com/windows/products/winfamily/defender/default.mspx
*Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
*AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
*Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
You can also do a check for a rootkit infection with TDSSKiller.
*Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
See also:
*"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked -
WDDOMODIFY is getting called twice.
Hi,
I am facing a problem where wddomodify is getting called twice when I am selecting a value from a drop down. While for other drop downs on the same view WDDOMODIFY is not even getting called. I would appreciate, if anyone of you can provide any info regarding the same.
Thanks,
VisheshDATA LO_ND_IMPORTING_CREATE TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_IMPORTING_CREATE TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_IMPORTING_CREATE TYPE WD_THIS->ELEMENT_IMPORTING_CREATE.
DATA LV_DOC_TYPE TYPE WD_THIS->ELEMENT_IMPORTING_CREATE-DOC_TYPE.
navigate from <CONTEXT> to <IMPORTING_CREATE> via lead selection
LO_ND_IMPORTING_CREATE = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_IMPORTING_CREATE ).
get element via lead selection
LO_EL_IMPORTING_CREATE = LO_ND_IMPORTING_CREATE->GET_ELEMENT( ).
get single attribute
LO_EL_IMPORTING_CREATE->GET_ATTRIBUTE(
EXPORTING
NAME = `DOC_TYPE`
IMPORTING
VALUE = LV_DOC_TYPE ).
DATA LO_ND_IF_EDITABILITY TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_IF_EDITABILITY TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LV_EDIT_SUB_TYPE TYPE WD_THIS->ELEMENT_IF_EDITABILITY-EDIT_SUB_TYPE.
DATA LV_EDIT_PARENT TYPE WD_THIS->ELEMENT_IF_EDITABILITY-EDIT_PARENT.
DATA LV_DROPDOWN TYPE REF TO CL_WD_DROPDOWN_BY_KEY.
DATA LV_INPUTFIELD TYPE REF TO CL_WD_INPUT_FIELD .
navigate from <CONTEXT> to <IF_EDITABILITY> via lead selection
LO_ND_IF_EDITABILITY = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_IF_EDITABILITY ).
get element via lead selection
LO_EL_IF_EDITABILITY = LO_ND_IF_EDITABILITY->GET_ELEMENT( ).
LO_EL_IF_EDITABILITY->GET_ATTRIBUTE( EXPORTING NAME = `EDIT_SUB_TYPE`
IMPORTING VALUE = LV_EDIT_SUB_TYPE ).
LO_EL_IF_EDITABILITY->GET_ATTRIBUTE( EXPORTING NAME = `EDIT_PARENT`
IMPORTING VALUE = LV_EDIT_PARENT ).
DATA LO_ND_FUNCTIONALITY TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_FUNCTIONALITY TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_FUNCTIONALITY TYPE WD_THIS->ELEMENT_FUNCTIONALITY.
DATA LV_OPTION_CHANGED TYPE WD_THIS->ELEMENT_FUNCTIONALITY-OPTION_CHANGED.
DATA LV_OPTION_SELECTED TYPE WD_THIS->ELEMENT_FUNCTIONALITY-OPTION_SELECTED.
navigate from <CONTEXT> to <FUNCTIONALITY> via lead selection
LO_ND_FUNCTIONALITY = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_FUNCTIONALITY ).
get element via lead selection
LO_EL_FUNCTIONALITY = LO_ND_FUNCTIONALITY->GET_ELEMENT( ).
get single attribute
LO_EL_FUNCTIONALITY->GET_ATTRIBUTE(
EXPORTING
NAME = `OPTION_CHANGED`
IMPORTING
VALUE = LV_OPTION_CHANGED ).
LO_EL_FUNCTIONALITY->GET_ATTRIBUTE(
EXPORTING
NAME = `OPTION_SELECTED`
IMPORTING
VALUE = LV_OPTION_SELECTED ).
DATA LO_EL_CONTEXT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_CONTEXT TYPE WD_THIS->ELEMENT_CONTEXT.
DATA LV_SET_STATE TYPE WD_THIS->ELEMENT_CONTEXT-SET_STATE.
get element via lead selection
LO_EL_CONTEXT = WD_CONTEXT->GET_ELEMENT( ).
get single attribute
LO_EL_CONTEXT->GET_ATTRIBUTE(
EXPORTING
NAME = `SET_STATE`
IMPORTING
VALUE = LV_SET_STATE ).
IF LV_SET_STATE = 'X'.
IF LV_DOC_TYPE = 'ABC' AND LV_EDIT_SUB_TYPE IS INITIAL.
LO_EL_IF_EDITABILITY->SET_ATTRIBUTE(
NAME = `EDIT_SUB_TYPE`
VALUE = 'X' ).
LV_DROPDOWN ?= VIEW->GET_ELEMENT('DRPDWN_SUBTYPE_CHANGE').
CALL METHOD LV_DROPDOWN->SET_STATE
EXPORTING
VALUE = 01
ELSE.
LO_EL_IF_EDITABILITY->SET_ATTRIBUTE(
NAME = `EDIT_SUB_TYPE`
VALUE = '' ).
LV_DROPDOWN ?= VIEW->GET_ELEMENT('DRPDWN_SUBTYPE_CHANGE').
CALL METHOD LV_DROPDOWN->SET_STATE
EXPORTING
VALUE = 00
ENDIF.
IF LV_EDIT_PARENT IS INITIAL AND
( LV_DOC_TYPE = '123' OR LV_DOC_TYPE = 'qwerty').
LO_EL_IF_EDITABILITY->SET_ATTRIBUTE(
NAME = `EDIT_PARENT`
VALUE = 'X' ).
LV_DROPDOWN ?= VIEW->GET_ELEMENT('DRPDWN_PARENT_CHNG_DOCTYPE').
CALL METHOD LV_DROPDOWN->SET_STATE
EXPORTING
VALUE = 01
LV_INPUTFIELD ?= VIEW->GET_ELEMENT('IF_PARENT_CHNG_DOCNUM').
CALL METHOD LV_INPUTFIELD->SET_STATE
EXPORTING
VALUE = 01
ELSE.
LO_EL_IF_EDITABILITY->SET_ATTRIBUTE(
NAME = `EDIT_PARENT`
VALUE = '' ).
LV_DROPDOWN ?= VIEW->GET_ELEMENT('DRPDWN_PARENT_CHNG_DOCTYPE').
CALL METHOD LV_DROPDOWN->SET_STATE
EXPORTING
VALUE = 00
LV_INPUTFIELD ?= VIEW->GET_ELEMENT('IF_PARENT_CHNG_DOCNUM').
CALL METHOD LV_INPUTFIELD->SET_STATE
EXPORTING
VALUE = 00
ENDIF.
LO_EL_CONTEXT->SET_ATTRIBUTE( NAME = `SET_STATE`
VALUE = ' ' ).
ENDIF.
LO_EL_CONTEXT->GET_ATTRIBUTE(
EXPORTING
NAME = `SET_STATE`
IMPORTING
VALUE = LV_SET_STATE ).
IF LV_OPTION_CHANGED = 'X' AND LV_OPTION_SELECTED = 'C'.
DATA LO_ND_ZGGL TYPE REF TO IF_WD_CONTEXT_NODE.
DATA LO_EL_ZGGL TYPE REF TO IF_WD_CONTEXT_ELEMENT.
navigate from <CONTEXT> to <ZGGL_RICEFTOOL> via lead selection
LO_ND_ZGGL = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_ZGGL).
LO_ND_ZGGL->INVALIDATE( ).
get element via lead selection
LO_EL_ZGGL = LO_ND_ZGGL->GET_ELEMENT( ).
LO_ND_IMPORTING_CREATE->INVALIDATE( ).
LO_EL_IMPORTING_CREATE = LO_ND_IMPORTING_CREATE->GET_ELEMENT( ).
LO_EL_IMPORTING_CREATE->SET_ATTRIBUTE( NAME = `VISIBILITY_GROUP`
VALUE = '2' ).
LO_EL_IMPORTING_CREATE->SET_ATTRIBUTE( NAME = `VISIBILITY_TABLE`
VALUE = '1' ).
LO_EL_IMPORTING_CREATE->SET_ATTRIBUTE(
NAME = `ACTION_RDBTN`
VALUE = 'C' ).
LO_EL_IF_EDITABILITY->SET_ATTRIBUTE(
NAME = `EDIT_CREATE`
VALUE = ' ' ).
LO_EL_IF_EDITABILITY->SET_ATTRIBUTE(
NAME = `EDIT_DISPLAY`
VALUE = 'X' ).
LO_EL_FUNCTIONALITY->SET_ATTRIBUTE( NAME = `OPTION_CHANGED`
VALUE = ' ' ).
ENDIF. -
Rules are not getting fired - urgent
Hello
I am a newbie to the oracle rules engine (10.1.3) and introducing the rules engine in our architecture.
I have started to fire a simple rule but looks like the rules are not getting fired.
Here is my code snipped: I am setting a value in the fact if another value is null.
==========
RuleDictionary rDict = RuleFactory.getRuleDictionary(RadiusConstants.RADIUS_REPOSITORY, RadiusConstants.RADIUS_DICTIONARY, RadiusConstants.DICTIONARY_VERSION);
RuleSession ruleSession = new RuleSession();
ruleSession.executeRuleset(rDict.dataModelRL());
ruleSession.executeRuleset(rDict.ruleSetRL(taskName));
RuleMessage ruleMessage = new RuleMessage();
ruleSession.callFunctionWithArgument("assert", moduleVo);
ruleSession.callFunction("run");
ruleSession.callFunctionWithArgument("assert", moduleVo);
// ruleSession.callFunctionWithArgument("assert", moduleVo);
System.out.println(" Module Status " + moduleVo.getStatus());
========
Any help is greatly appreciated. I am not sure if I am missing. I am suing rule author to create the rules.
I am asserting the fact in the rules engine. Here is the RL file generated from the rule author.
==================
ruleset MODULE_CREATE
2.
3. {
4.
5. rule ModuleId_Null
6. {
7. priority = 0;
8. if
9. (
10. (
11. fact gov.sec.radius.admin.service.module.vo.ModuleVO v0_ModuleVO && (
12. (v0_ModuleVO.moduleId == null)))
13. )
14.
15. {
16. v0_ModuleVO.status = "P";
17. assert(v0_ModuleVO);
18. }
19. } //end rule ModuleId_Null;
20. }// end ruleset MODULE_CREATE
=================
thanks very much in advance
YugandharYou need to specify the ruleset or rulesets that should be run. If there is only one, you can do:
ruleSesion.callFunctionWithArgument("run", taskName);
or
ruleSesion.callFunctionWithArgument("pushRuleset", taskName);
ruleSession.callFunction("run");
If there are multiple rulesets you want to run in order, then call pushRuleset in stack-order that you want their actions executed. -
User Exit EXIT_SAPFP50M_002 getting called twice
Hi,
I've created a custom infotype - 9002 & am doing processing in the user exit - EXIT_SAPFP50M_002 (as suggested [here|http://sapdev.co.uk/enhance/enhance_hrpbopai.htm]). Specifically, I'm inserting one more record into the infotype. To insert records, I'm making use of the FM - HR_INFOTYPE_OPERATION. This call is in a Z report & I'm invoking it through SUBMIT & RETURN.
My problem is that this FM is calling my exit (the one mentioned above) again! (I can see this as I've set a breakpoint in the include ZXPADU02) Since the data is same, all checks are getting passed & the same code is getting executed twice.
I'm trying to use SET & GET PARAMETER calls to prevent the second execution; which doesn't seem to be the best approach.
Is there any other way to circumvent the second call? Any help would be appreciated.
Thanks,
KKRDear KKR,
Hope you had a look at the Include LXPADF01 for the Sample Code for Infotype 0008.
Look at it it migh give you more clue of how to use the Function Exit EXIT_SAPFP50M_02.
Moreover if you have a look at the FM HR_INFOTYPE_OPERATION - you can see that there is a further check function HR_INFOTYPE_CHECKEXISTENCE which is being used which also calls your Function Exit - So this is the reason why your Function gets executed Twice.
I Hope this information helps you to some extent.
Encourage others to answer your queries by suitably rewarding them
Thanks
Venugopal
Maybe you are looking for
-
The newest iTunes version has no Help option. Why? And, no ability to find out the version number. The new iTunes, when in album view in Windows 7, has NO SCROLLBARS, so it is impossible to scroll the albums. Why? Answer these questions, as I am a
-
B110a won't upgrade nor show ePrint email
Hi there, I'm having a difficulty getting my B110a printer to work through ePrint. The printer is connected to the WiFi and can print any document from any computer within that network no problem. I wanted to start using ePrint though, so wanted to c
-
Javascript problem on Mac OS 10.7.3 w/Safari 5.1.5
I've seen this problem going back on the forums to 2010, but no solution as far as I can tell. I have an i7 27" iMac running 10.7.3 with Safari 5.1.5. This problem just presented itself upon updating to Safari 5.1.5. This also happens with Firefox. I
-
Simple code to send ALV display as XLS attachment to SAP inbox
Hi All, Simple code to send ALV display as XLS attachment to SAP inbox. Also i need to send only 200 records per attachement. So in this case i need send multiple attachment per mail Thanks, Lokesh
-
Internet explorer 6 standalone version
Does anyone know where i can get "internet explorer 6 standalone version"? If anyone has any links or advice on this it would be good thanks