on 12-19-2005 6:23 AM
Hi,
I want a string to validate. I declared a simple type in dictionary for that string with fixed length as '4' and it is working fine.
But the problem I'm facing is that when I want to clear(Clicking Clear Button) by entering less than 4 characters in that field, it is validating and giving message as ' Length of String " " has not expected fixed length 4'.
I want this validation happen only when I click actions like save and but should not work for actions like clear.
Is there any ways that i can bypass this validation some times?? or how can i clear that field??
regards,
Sridhar
In summary: Web Dynpro does <b>NOT</b> support any form of custom JavaScript during rendering. It is a closed rendering model. This has positive and negative sides. Let us accept the status-quo as it will definitely not be changed in any (near) future, and further debate about why it is a "good thing" will not change our opinion on this topic. See also email extract below.
As such, we consider this topics now as closed.
regards, brian
EXTRACT FROM AN EMAIL WRITTEN:
Yes, we are aware, and have been for a long time that if you should load JavaScript into an <iframe> you can hack parts of the rendered Web Dynpro pages. However, this is not kindergarten. If you shoot yourself in the foot, it is going to hurt, and we can not help. Our basic recommendation at this stage will always be: never do it, you will regret it!
Here some basic aspects for you to keep in mind:
(1) Already the one example you have made available for testing failed with JavaScript errors in my browser. So any hack you attempt will have to be tested for scenarios: different browsers (and versions thereof), right-to-left rendering, different rendering when accessibility mode is active.
(2) The HTML that is rendered changes effectively per service pack, expect at least dramactic change after about three service packs.
(3) Also the rendering framework(s) we use change with service packs, for example suddenly a different technique is used to DOM inject rendered code, etc.
(4) In later service packs, depending on rendering, we start to use very short (cryptic) ids, that are generated on the fly. These have no relationship to the IDs you use/see in the workbench. So you have no way in the browser to now decide what controls you wish to influence.
(5) iframe control is already flagged as deprecated. There are also techniques we can use to prevent you from using JavaScript from your iframe to ours (still under consideration.)
In principle, using such an approach in a customer solution is gauranteed to blowup sooner than later. It is not industrial strength, and will just not fly.
We can understand that when Web Dynpro "works as designed" it is not always "works as expected". And it is true that new features you require are far in the future. But nevertheless, it is recommended to take the time to write us the problems you face. Maybe if you describe specific problems on the forum, people have other alternative ideas. Or update Armin's thread on things you would like to place on the wish list. We can not promise, but we do read the list!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sridhar,
You have 2 options for this:
1) Use non-validating action handler(search doesn`t work on SDN, so I can`t find appropriate article) and do all validation there.
2) Create context attribute(needExplicitClear). In action handler set to true. In wdDoModifyView check whethre variable is true and put something like:
final IWDInputField inputField = (IWDInputField)view.getElement("inputField");
inputField.setValue("");
//set needExplicitClear to false
And you have to set needExplicitClear to false in wdDoInit.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sridhar,
If u r using WebDynpros we use Message pools to sort out these issues.Check the URL Below which will be of great use.
http://help.sap.com/saphelp_nw04s/helpdata/en/d1/1937e802d4ef4597fa14c48e66ca5d/frameset.htm
If u r using JSPDynpages we need to write the java script in Scripts Tag.Call the function into the controller of the Action Button Click and then ur issue can be easily solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gotcha
Javascript is not part of the Web Dynpro programming model (for good reasons IMHO). There are Web Dynpro clients that do not support Javascript at all (e.g. smart clients, some Mobile clients) so using Javascript inside an application would restrict it to the browser based clients.
Armin
I don't understood very well this choice, it's true that smart clients and some Mobile clients don't support very well javascript; but a developer knows for what client the Web Dynpro will be realized, better surely he knows if he is developing a Web Dynpro for smart clients and some Mobile clients.
As we have in java, there is "J2SE" and there is "J2ME".
By the way, i don't think that IFRAME could be deprecated so soon, this is not funny.
SAP tend to maintain the versioning for at least 3 release, i know (see BAPI).
There is some official announcement about deprecation of IFRAME, i understand that you are a SAP AG employee, but i need more confimation on what you say to me ?
EPCF will be improved?
Thanks and bye
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.