UWL and Javascript / Detection of application attributes

I have the need to write a Javascript, that can identify within an uwl task, which transaction the task is.
Attributes like "Travel Management"  or "WF Item"
I know I can do this via java, but I need this in javascript. Is there a call within Javascript, where I can access the portal attributes of 'self' ?
thx and points will be rewarded

Nobody any idea?     

Similar Messages

  • Can I package an app using just html and javascript and not flash ?

    Hi :
    Sorry for the question, but I'm a little confused. 
    I know I can use javascript with adobe air, I made some test and works great, but I'm not sure if my app will work in an iphone after I build the package.
    Thanks in advanced.

    No, that's not supported in this version of PFI.  From the Developer Guide: "You cannot write HTML- and JavaScript-based AIR applications for the mobile device profile."

  • Hi, We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1. When we try to download a file(.pvw file) in that application safari throws "Download failed" error. Please suggest what needs to be done.

    Hi,
    We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1.
    When a file url is clicked instead of asking for Save or Open or Cancel options, the file gets opened on IPad by default.
    Is this default behaviour which cannot be changed or can it be configured to ask user preference?
    When we try to download a file(.pvw file -> a model file) in the above application, safari throws "Download failed" error.
    Please suggest what needs to be done.
    Regards,
    Pramod

    Safari on an iPad in general does not allow downloading of files. That's a safety precaution in the iOS SDK to keep unauthorized content off of iOS devices. Safari will open from the web site file types that it can handle, but direct downloading isn't normal behavior, and I don't believe the behavior can be changed, though you can try asking in the developer forum, either here or the one to which you have access as a member of Apple's iOS developer program.
    Regards.

  • UWL and notification service

    I am currently investigating UWL and its features.
    The scenario I am facing is a portal application where users need to be notified on a portal iview (a customized UWL based iview?) about events like file uploading in a KM folder(s) or they would get a custom notification due to a specific business rule. Previously I did some "experiments" by using the RecentNotification iView with not satisfactory results...
    Do you think UWL could be the solution for our needs? I found that docs and infos on SAP sdn are a bit limited and "messy" about this subject so... any suggestion would be much appreciated. Best scenario could be a step-by-step tutorial.
    thanks in adavance for yr support
    From Italy
    Massimiliano Turco

    Hi Max!
    Basicly yes, chapter 6.4 describes the basics of a repository service. However, this isn't too detailed for someone seeking a solution.
    Here's an example of a repository service:
    package com.xxx;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.StringTokenizer;
    import com.sap.netweaver.bc.rf.util.event.IEventBroker;
    import com.sapportals.portal.prt.logger.ILogger;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    import com.sapportals.wcm.WcmException;
    import com.sapportals.wcm.crt.component.IReconfigurable;
    import com.sapportals.wcm.crt.component.StartupException;
    import com.sapportals.wcm.crt.configuration.ConfigurationException;
    import com.sapportals.wcm.crt.configuration.IConfiguration;
    import com.sapportals.wcm.repository.IResource;
    import com.sapportals.wcm.repository.manager.IRepositoryManager;
    import com.sapportals.wcm.repository.manager.IResourceEvent;
    import com.sapportals.wcm.repository.manager.IResourceEventReceiver;
    import com.sapportals.wcm.repository.manager.ResourceEvent;
    import com.sapportals.wcm.repository.service.AbstractRepositoryService;
    import com.sapportals.wcm.repository.service.ServiceNotAvailableException;
    import com.sapportals.wcm.util.events.IEvent;
    * Class <code>XXXRepositoryService</code> implements a respository service
    * that listens for several events on a defined directory.
    public class XXXRepositoryService extends AbstractRepositoryService implements IReconfigurable, IResourceEventReceiver {
       * The name of the configuration attribute that defines the maximum number of
       * news articles to aggregate.
      public static final String CONFIG_ARTICLECOUNT = "articleCount";
       * The name of the configuration attribute that defines the destination
       * directory in KM.
      public static final String CONFIG_KMDESTDIR = "kmDestDir";
       * The name of the configuration attribute that defines the destination file
       * in KM.
      public static final String CONFIG_KMDESTFILE = "kmDestFile";
       * The name of the configuration attribute that defines the news directory
       * in KM.
      public static final String CONFIG_KMXXXDIR = "kmNewsDir";
       * The name of the configuration attribute that defines the KM service user.
      public static final String CONFIG_KMUSER = "kmUser";
       * The name of the configuration attribute that defines the supported
       * languages.
      public static final String CONFIG_LANGUAGES = "languages";
      // the logger for this service
      private static final ILogger _LOGGER = PortalRuntime.getLogger();
      // The type/name of the repository service.
      private static final String _TYPE = "com.xx.XXXRepositoryService";
      // The destination directory in KM.
      private String _kmDestDir;
      // The destination file in KM.
      private String _kmDestFile;
      // The news directory in KM.
      private String _kmNewsDir;
      // The KM service user unique name.
      private String _kmUser;
      // The supported languages.
      private String[] _languages;
         // Storing repository managers for later unregistering
         private Collection registeredRepositoryManagers = null;
       * Create a new instance of <code>NewsRepositoryService</code>
      public XXXRepositoryService() {
        super();
         _LOGGER.info(_TYPE + ": constructor called.");
       * (non-Javadoc)
       * @see com.sapportals.wcm.repository.service.IRepositoryService#getServiceType()
      public String getServiceType() {
        return _TYPE;
       * (non-Javadoc)
       * @see com.sapportals.wcm.util.events.IEventReceiver#received(com.sapportals.wcm.util.events.IEvent)
      public void received(IEvent event) {
        try {
              _LOGGER.info(_TYPE + ": event received, checking...");
          if ((event != null) && (event instanceof IResourceEvent)) {
            final IResourceEvent resourceEvent = (IResourceEvent) event;
            final IResource eventObject = resourceEvent.getResource();
            final String eventPath = eventObject.getRID().getPath();
            if ((eventObject != null) && (eventPath.startsWith(_kmNewsDir)) && (!eventPath.startsWith(_kmDestDir))) {
              ManageNewsAggregation.work(ManageXXX.getEP5serviceUser(_kmUser), _kmNewsDir, _kmDestDir, _kmDestFile, _articleCount, _languages);
              _LOGGER.info(_TYPE + ": xxx successfully");
        } catch (Throwable t) {
          _LOGGER.severe(t, _TYPE + ": unable to handle event " + event.getDescription() + " caused by " + t.getMessage());
       * (non-Javadoc)
       * @see com.sapportals.wcm.crt.component.IReconfigurable#reconfigure(com.sapportals.wcm.crt.configuration.IConfiguration)
      public void reconfigure(IConfiguration config) throws ConfigurationException {
        stateHandler.preReconfigure();
        try {
          parseConfig(config);
        } catch (ConfigurationException ex) {
          stateHandler.postReconfigure(ex);
          throw ex;
        this.config = config;
        stateHandler.postReconfigure();
       * (non-Javadoc)
       * @see com.sapportals.wcm.repository.service.AbstractRepositoryService#startUpImpl(java.util.Collection)
      protected void startUpImpl(Collection repositoryManagers) throws ConfigurationException, StartupException {
         _LOGGER.info(_TYPE + ": parsing config...");
        parseConfig(config);
         _LOGGER.info(_TYPE + ": done parsing config.");
        try {
              _LOGGER.info(_TYPE + ": startUpImpl(): iterating repository managers: " + repositoryManagers.size());
          Iterator itRepMan = repositoryManagers.iterator();
          while (itRepMan.hasNext()) {
            IRepositoryManager repMan = (IRepositoryManager) itRepMan.next();
            registerMeFor(repMan);
              _LOGGER.info(_TYPE + ": registered for repository manager: " + repMan.getID());
          _LOGGER.info(_TYPE + ": startup completed");
          registeredRepositoryManagers = repositoryManagers;
        } catch (WcmException e) {
          _LOGGER.severe(e, _TYPE + ": error during startup");
          throw new StartupException(e.getMessage(), e);
       * (non-Javadoc)
       * @see com.sapportals.wcm.repository.service.AbstractRepositoryService#shutDownImpl()
      protected void shutDownImpl() {
         try {
              _LOGGER.info(_TYPE + ": shutDownImpl(): iterating repository managers: " + registeredRepositoryManagers.size());
           Iterator itRepMan = registeredRepositoryManagers.iterator();
           while (itRepMan.hasNext()) {
              IRepositoryManager repMan = (IRepositoryManager) itRepMan.next();
              unregisterMeFrom(repMan);
              _LOGGER.info(_TYPE + ": unregistered from repository manager: " + repMan.getID());
           _LOGGER.info(_TYPE + ": shutdown completed");
         } catch (WcmException e) {
           _LOGGER.severe(e, _TYPE + ": error during shutdown");
        _LOGGER.info(_TYPE + ": stopped");
       * (non-Javadoc)
       * @see com.sapportals.wcm.repository.service.AbstractRepositoryService#addRepositoryAssignment(com.sapportals.wcm.repository.manager.IRepositoryManager)
      protected void addRepositoryAssignment(IRepositoryManager mgr) throws ServiceNotAvailableException {
        try {
          registerMeFor(mgr);
        } catch (WcmException e) {
          throw new ServiceNotAvailableException("Cannot register repository service " + _TYPE + " caused by: " + e.getMessage());
       * (non-Javadoc)
       * @see com.sapportals.wcm.repository.service.AbstractRepositoryService#removeRepositoryAssignment(com.sapportals.wcm.repository.manager.IRepositoryManager)
      protected void removeRepositoryAssignment(IRepositoryManager mgr) throws WcmException {
        unregisterMeFrom(mgr);
        _LOGGER.info(_TYPE + ": removed registration from repository manager: " + mgr.getID());
       * Register this repository service for the specified repository manager.
       * @param mgr The repository manager.
       * @throws WcmException When the service cannot be registered.
      private void registerMeFor(IRepositoryManager mgr) throws WcmException {
        // register for all events
        mgr.getEventBroker().register(this, ResourceEvent.CREATE_CHILD_TEMPLATE, IEventBroker.PRIO_MIN, true);
        mgr.getEventBroker().register(this, ResourceEvent.SET_TEMPLATE, IEventBroker.PRIO_MIN, true);
        mgr.getEventBroker().register(this, ResourceEvent.COPY_TEMPLATE, IEventBroker.PRIO_MIN, true);
        mgr.getEventBroker().register(this, ResourceEvent.MOVE_TEMPLATE, IEventBroker.PRIO_MIN, true);
        mgr.getEventBroker().register(this, ResourceEvent.RENAME_TEMPLATE, IEventBroker.PRIO_MIN, true);
        mgr.getEventBroker().register(this, ResourceEvent.DELETE_TEMPLATE, IEventBroker.PRIO_MIN, true);
       * Unregister this repository service from the specified repository manager.
       * @param mgr The repository manager.
       * @throws WcmException When the service cannot be unregistered.
      private void unregisterMeFrom(IRepositoryManager mgr) throws WcmException {
        // unregister all events
        mgr.getEventBroker().unregister(this, ResourceEvent.CREATE_CHILD_TEMPLATE);
        mgr.getEventBroker().unregister(this, ResourceEvent.SET_TEMPLATE);
        mgr.getEventBroker().unregister(this, ResourceEvent.COPY_TEMPLATE);
        mgr.getEventBroker().unregister(this, ResourceEvent.MOVE_TEMPLATE);
        mgr.getEventBroker().unregister(this, ResourceEvent.RENAME_TEMPLATE);
        mgr.getEventBroker().unregister(this, ResourceEvent.DELETE_TEMPLATE);
       * Parse the configuration object and extract the desired attributes.
       * @param config The configuration object.
       * @throws ConfigurationException
      private void parseConfig(IConfiguration config) throws ConfigurationException {
        String tmp = null;
        //     KM service user
        _kmUser = config.getAttribute(CONFIG_KMUSER);
        // news directory     
        tmp = config.getAttribute(CONFIG_KMNEWSDIR);
        if ((tmp == null) || (tmp.length() < 1))
          throw new ConfigurationException("Attribute " + CONFIG_KMXXXDIR + " must not be empty");
        else
          _kmNewsDir = tmp;
        // destination directory
        tmp = config.getAttribute(CONFIG_KMDESTDIR);
        if ((tmp == null) || (tmp.length() < 1))
          throw new ConfigurationException("Attribute " + CONFIG_KMDESTDIR + " must not be empty");
        else
          _kmDestDir = tmp;
        // destination file
        tmp = config.getAttribute(CONFIG_KMDESTFILE);
        if ((tmp == null) || (tmp.length() < 1))
          throw new ConfigurationException("Attribute " + CONFIG_KMDESTFILE + " must not be empty");
        else
          _kmDestFile = tmp;
        // article count
        tmp = config.getAttribute(CONFIG_ARTICLECOUNT);
        try {
          _articleCount = Integer.parseInt(tmp);
        } catch (NumberFormatException e) {
          _articleCount = 0;
          throw new ConfigurationException("Attribute " + CONFIG_ARTICLECOUNT + " must be a valid number");
        // languages
        tmp = config.getAttribute(CONFIG_LANGUAGES);
        if ((tmp == null) || (tmp.length() < 1))
          throw new ConfigurationException("Attribute " + CONFIG_LANGUAGES + " must not be empty");
        else {
          StringTokenizer st = new StringTokenizer(tmp, ",");
          _languages = new String[st.countTokens()];
          int i = 0;
          while (st.hasMoreTokens()) {
            _languages[i++] = st.nextToken();
         _LOGGER.info(_TYPE + ": configuration is _kmUser=" + _kmUser);
         _LOGGER.info(_TYPE + ": _kmNewsDir=" + _kmNewsDir);
         _LOGGER.info(_TYPE + ": _kmDestDir=" + _kmDestDir);
         _LOGGER.info(_TYPE + ": _kmDestFile=" + _kmDestFile);
         _LOGGER.info(_TYPE + ": _articleCount=" + _articleCount);
    This code registeres certain event handlers in the KM, on which the received-method is called. Depending on the event type you may start some processing like creating notifications.
    Many links about implementing repository services can be found here: https://www.sdn.sap.com/irj/sdn/thread?threadID=45636.
    Cheers,
      Jürgen

  • SSO and JavaScript

    Hi all,
    does any one of you know about any restriction or any other issue involving SSO and JavaScript?
    We have a web app in an OC4J instance, which uses JSP and JavaScript.
    When SSO is disabled for the application, everything goes well. But when SSO is active, the page loads a lot slower, and the IE browser always shows the error icon when any component tries to execute Javascript.
    Any ideas about this issue?
    Oracle AS 10g (9.4.1)
    Win 2000 SP4
    IE 6.0 SP1
    Thanks a Lot in advance.
    Have a nice day.
    Jaime

    It is simpler to do from server side as follows. Place below line
    inside Page_Load event of any portal component:
       Write(this.Request.Cookies.Get("MYSAPSSO2").Value);

  • How Can I Set a Javascript Value into an Attribute of BSP PAGE

    Hi
    Can anyone tell me.
    How Can I Set a Javascript Value into an Attribute of BSP PAGE

    Hi Mithlesh,
    javascript runs on client side and you cannot assign the value to a Page attribute directly.
    As a workaround,you can use an Inputfield,hidden if required,and set the value using javascript.Then the form will have to be submit to be able to read the value in onInputProcessing and then can be assigned to any variable.
    In Layout
    <head>
    <script language="javascript">
    function pass()
       txt1 = document.getElementById("ip_mrf");
       txt.value = "hello" ;
    </script>
    </head>
    <htmlb:inputField  id="ip_mrf"
                               value="<%=mrf_number%>"
                               visible="FALSE"/>
    in onInputProcessing
    cha1 = request->get_form_field( 'ip_mrf' ).
    where cha1 is the page attribute
    hope this helps,
    Regards,
    Siddhartha
    Message was edited by: Siddhartha Jain

  • How to add 1 more column in standard portal UWL and map the values.

    Hi
    I have one issue/requirement, please help me out on that also.
    In portal UWL, i want to add one more column TICKET ID COLUMN, and ticket id value I  will be putting as work item ID of abap Workflow, so whenever  approver opens his portal UWL, in first column i want to show ticket ID say 00012345, so how to add this ticket ID column in standard portal UWL and how to put/map  value of work item in that column.
    My idea behind this is, when ever say employee wants to know the status about his ticket ID, he can simply ask his manager regarding the ticket status by referring to that ticket ID which manager can easily find in his portal UWL in that extra TICKET ID COLUMN .
    Do I have to change anything in SAP inbox also ? Do i have to add 1 more colum in sap R/3 inbox also ? and will adding 1 more colum in sap inbox (R/3 inbox), will create automatically one more ticket ID colum in portal UWL also ?
    please let me know , as i do not want to add 1 extra column in R/3 inbox, just i want in portal UWL extra ticket ID column should come and i want to put workitem ID generated at the start of workflow, in that colum in portal UWL
    please help me on this.
    Thanks...
    Edited by: User Satyam on May 29, 2011 6:16 AM

    Hi Satyam,
    These are called custom attributes.  Here is a powerpoint that may be able to assist you with the documentation that the other poster gave you too.
    Always remember too when you make a change on the backend R/3 side, you must reregister your UWL connector.  And yes, the column must be available on the backend R/3 side.  We can't create on the fly columns in the UWL, that have no reference to the backend system in this case.
    Beth Maben
    EP - Senior Support Consultant II
    AGS Primary Support
    Global Support Centre Ireland
    Please see the UWL Wiki @
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/bpx/uwl+faq  ***

  • UWL and webDynpro For Java

    Hi
      Experts
        I am making webDynpro application in which I have to give a form with in UWL of Portal.In that one form will be appear in user 's UWL and if it clicks on <b>ok</b> then all data will be get saved and this form will be go to another user 's UWL for cross checking the input and go on.. till HOD.
    Is this possible? How can I Make It?
    I have only knowledge of webdynpro for java.
    (Don't know anything of ABAP)
    Please Help Me.....
    Regards
    Sunny.

    Hi
    Some useful links are
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3f07a7a-0601-0010-ebbd-b9cfb445b814">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3f07a7a-0601-0010-ebbd-b9cfb445b814</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/50d74ada-0c01-0010-07a8-8c118d408e59">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/50d74ada-0c01-0010-07a8-8c118d408e59</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/43/e085d6421a4d9de10000000a155369/content.htm">help.sap.com/saphelp_nw04s/helpdata/en/43/e085d6421a4d9de10000000a155369/content.htm</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/259865cb-0701-0010-9a9e-d156765ec089">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/259865cb-0701-0010-9a9e-d156765ec089</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/da/a680415dc6050de10000000a1550b0/content.htm">help.sap.com/saphelp_nw04s/helpdata/en/da/a680415dc6050de10000000a1550b0/content.htm</a>
    Thanks
    SMitha

  • HELP PLASE ! JavaBean and Javascript in frames :)

    Hello,
    First please excuse me for my bad english I'm French think you in advance for your patience and your help ! :)
    To resum the problem :
    I have 2 frames, a menu frame and a main frame
    I use a javabean wich is saved in application variable.
    When the pages of main frame use the javabean there is no probleme.
    BUT when menu frame calls pages of main frame it don't restore the javabean, it looks like je page called by menu frame, which operates on the javabean, wasn't called, and the changes I do in this page aren't saved
    Menu frame uses javascript to calls main frame pages so I think the problem is conjonction of frame and javascript.
    But I have no choice because it's volonty of my boss, so please help me ! :)
    More precisly :
    the javabean : NavigationBean
    page frame menu : menu_page.jsp
    main pages which use javabean : pageA.jsp, pageB.jsp, pageC.jsp
    pageA.jsp has reference on pageB.jsp which has reference on pageC.jsp
    Traitement of the javabean NavigationBean in pageA.jsp, pageB.jsp and pageC.jsp :
    <jsp:useBean      id="gestionNavigation"
              class= "NavigationBean"          
              scope="application">                         
    </jsp:useBean>
    <jsp:setProperty      name="gestionNavigation"
                   property="request"
                   value="<%=request%>" />     
    (it needs response and request to run)
    <jsp:setProperty      name="gestionNavigation"
                   property="response"
                   value="<%=response%>" />
    <jsp:setProperty      name="gestionNavigation"
                   property="pageActuelle"
                   value="<%=urlActuelle%>" />
    (it saves in NavigationBean object the url where user is)
    In pageA I clean all NavigationBean so all pages saved are deleted
    if user go DIRECTLY on pageA.jsp, all is ok :
    user go on
         pageA -> pageB -> pageC
    and NavigationBean save
         pageA -> pageB -> pageC
    That's good ! :)
    BUT if after user go on menu frame it's wrong !
    user go on
         pageA -> pageB -> pageC -> menu_page.jsp -> pageA -> pageB
    BUT NavigationBean save
         pageA -> pageB -> pageC -> pageB
    instead of
         pageA -> pageB
    To resume, for NavigationBean when user go directly on main pages there is no problem, but when it uses menu frame it doesn't save that user go on pageA
    I clean NavigationBean on pageA, but instead of this problem it doesn't clean and retrieve old datas
    It looks like that when user uses menu FRAME it uses an old NavigationBean object, but when it go directly on pages of main frame it runs !
    And I use scope application so don't understand, I have tried session scope but no change :(
    I have tried using "response.encondeURL" but no change
    Think you in advance for your help, and good luck from Paris for all New York people ! :)
    David

    It sounds like what might be happening is when the user goes 'back' to the menu, they're not requesting the page from the server. So, they're either getting the old page cached by the browser. Maybe. If you reload the menu page manually, does it work?

  • Link in new tab opens blank and "javascript:subValue(1)" is seen in the address bar.

    On a specific website, when I left click a link it opens but when trying to open the link in a new tab, the new tab opens blank and "javascript:subValue(1)" is seen in the address bar. This website hosts many, many images which I hope to download using a bulk image save addon but those images must first be in separate tabs. Opening these links in new tabs is vital to the process.

    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • About XML/XSL and Javascript : Plz Help Urgent

    Hai , I am developing one module which invloves XML database ,XSL and Javascript.
    In this I want to transform XML data to XHTML form using XSLT .,
    I have done this ,(using xsl templates ,In my form two radio buttons one dropdown box and two text boxes are there .).
    All the information which ever is displayed coming from XML .,
    But I want to validate this elements (which are in xslt ,ie checking text box is empty or not ..)
    Where I have to add script in XSL .,
    Plz give simple example on this ,
    I am sending this code ,plz have a look at this ,,
    XML -----+ ---XSLT---------------> XHTML(HTML) (where validation is required)*
    Hotels.xml
    ==============>
    <Services>
         <Service>
              <Hotels type="radio" title="Hotel" groupname="service" default="true"/>
              <HotelsFlights type="radio" title="Flight+Hotel" groupname="service"/>
         </Service>
         <Hotels>
              <Destination title_d="Destination :">          
                   <DestinationPlace type="OPTION" id="" title_d="Select Destination" value_d="Select Destination" defalut="true"/>
                   <DestinationPlace type="OPTION" id="" title_d="Aruba" value_d="Aruba" />
              </Destination>
              <HotelChoice title_hc="Hotels :">
                   <choice type="OPTION" id=" " title_h="AmsterDam Manor Beach" value_h="AmsterDam Manor Beach"/>
                   <choice type="OPTION" id=" " title_h="Wyndham Aruba Beach" value_h="Wyndham Aruba Beach"/>
              </HotelChoice>
              <Dates>
                   <CheckIn type="INPUT" title_dt="Check In :" id="chkin" name="chkin" size_dt="10" maxlength="10">mm/dd/yyyy</CheckIn>
                   <CheckOut type="INPUT" title_dt="Check Out :" name="chkout" size_dt="10" maxlength="10">mm/dd/yyyy</CheckOut>
              </Dates>
              <RoomNos title="No.of Rooms :">
                   <room type="OPTION" id="" titl="1" valu="1"/>
                   <room type="OPTION" id="" titl="1" valu="2"/>
                   <room type="OPTION" id="" titl="1" valu="3"/>
              </RoomNos>
              <Submit tile="Search :" type="submit" id="search" value="Search"/>
         </Hotels>
    </Services>
    Hotels.xsl-
    ------------->
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
         <html>
         <head>
         <script language="javascript">
         function RadioFunc()
              var result;
              alert(" Radio ");
              result +=document.write("<TABLE >");
              result +=document.write("<TR><TD>"+'Praveen'+"</TD></TR>");
              result +=document.write("</TABLE>");
              alert("Result "+result);
         function validateForm()
              alert("Before validating");
              var chkindate= document.getElementById(chkin).value;
              alert(chkindate);
         </script>
         </head>
         </html>
         <xsl:apply-templates/>
    <xsl:if test="@value_d='Select Destination'">
                        alert("Please Enter Destination");
              </xsl:if>
    </xsl:template>
    <xsl:template match="Services" >
         <form name="myform" action="two.jsp" method="get" >
              <table bgcolor="lightgreen" width="350" height="200" border="1" >
              <tr><td><xsl:apply-templates/></td></tr>
              </table>
         </form>
    </xsl:template>
    <xsl:template match="Service">
         <table border="0" align="center" valign="top"><tr>
         <xsl:for-each select="*">
              <td align="left"><xsl:value-of select="@title"/></td>
              <td align="center">
              <input type="{@type}" onClick="RadioFunc()">
                   <xsl:attribute name="Name">
                        <xsl:value-of select="@groupname"/>
                   </xsl:attribute>
                   <xsl:attribute name="value">
                        <xsl:value-of select="@value"/>
                   </xsl:attribute>
                   <xsl:if test="@default='true'">
                        <xsl:attribute name="checked"/>
                   </xsl:if>
              </input>
              </td>
         </xsl:for-each>
         </tr></table>
    </xsl:template>
    <xsl:template match="Hotels/Destination">
    <xsl:value-of select="@title_d"/>
         <SELECT id="dest" name="dest">
         <xsl:for-each select="*">
              <xsl:element name="{@type}">
                   <xsl:value-of select="@value_d"/>
              </xsl:element>
         </xsl:for-each>     
         </SELECT>
    </xsl:template>
    <xsl:template match="Hotels/HotelChoice">
    <xsl:value-of select="@title_hc"/>
    <SELECT id="hcid" name="hcid">
         <xsl:for-each select="*">
              <xsl:element name="{@type}">
                   <xsl:value-of select="@value_h"/>
              </xsl:element>
         </xsl:for-each>
    </SELECT>
    </xsl:template>
    <xsl:template match="Hotels/Dates">
    <table><tr>
    <xsl:for-each select="*">
              <td>
                   <xsl:value-of select="@title_dt"/>
              </td>
              <td>
              <xsl:element name="{@type}" >
                   <xsl:attribute name="size">
                        <xsl:value-of select="@size_dt"/>
                   </xsl:attribute>
                   <xsl:attribute name="maxlength">
                        <xsl:value-of select="@maxlength"/>
                   </xsl:attribute>
                   <xsl:attribute name="value">
                        <xsl:value-of select="text()"/>
                   </xsl:attribute>
              </xsl:element>
              </td>
    </xsl:for-each>
    </tr></table>
    </xsl:template>
    <xsl:template match="Hotels/RoomNos">
    <table align="center"><th>Travellers</th>
    <tr><td><xsl:value-of select="@title"/></td>
    <td><SELECT id="rooms" name="rooms">
              <xsl:for-each select="*">
                   <xsl:element name="{@type}">
                        <xsl:value-of select="@valu"/>
                   </xsl:element>
              </xsl:for-each>     
    </SELECT>
    </td></tr>
         </table>
    </xsl:template>
    <xsl:template match="Hotels/Submit">
         <table align="center" border="0" >
         <tr>
         <td align="center">
              <input type="{@type}" onclick="validateForm();">
                   <xsl:attribute name="value">
                        <xsl:value-of select="@value"/>
                   </xsl:attribute>
              </input>
         </td>
         </tr>
         </table>
    </xsl:template>
    </xsl:stylesheet>
    ======================================================

    Hi
    This is not the forum for this type of question ...sorry. Try the XMLDB forum, XML DB
    Tim

  • How to call javascript from java application

    How can we call a function written in javascript from java application (core java not applet)? How will java identify javascript?
    Is there any such options ?

    Try creating a page called launcher.html (for example). That does this:
    <html>
    <head>
    <script language="javascript">
    windowHandle=window.open("http://www.javasoft.com", "", "height=700,width=1000,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,top=5,left=5");
    </script>
    </head>
    </html>Now you launch IE (or whatever) with this page using the Runtime class. After x seconds (after the second window has been launched) try killing the process. Hopefully it will kill the original window you opened and not the window you popup (the one without toolbars etc)
    It might kill both windows but I can't be bothered to test it. If it does you'll have to try and find a workaround.

  • UWL and WD abap integration

    Hi,
    I am trying to integrate UWL and web dynrpo abap. I have set the visualization paramaters in the transaction SWFVISU. So when I click on the link in UWL the web dynpro abap applications opens.
    To access the parameter I go to the default window plug.
    But the  problem I am facing here is that I need the UI of flex for my application. To pass value to flex I need the parameter in the WDDOINIT of the view. Can anyone suggest what is to done here as the default window plug executes after WDDOINIT of the view.
    Thanks
    Prashant
    Edited by: Prashant_chauhan06 on Jan 31, 2012 12:43 PM

    correct me if i am wrong...
    first wddoini then default window then wddomodifyview method willl trigger..
    so you can write ur code in wddomodifyview
    Regards
    Srinivas

  • 8900 Curve - HTML 4.01 and JavaScript 1.5

    Hi. I am trying to run a chess Web app (www.gameknot.com) that requires HTML 4.01 and JavaScript 1.5, so far unsuccessfully when it comes to moving pieces. Does my 8900 Curve support HTML 4.01 and JavaScript 1.5? Thank you. Jeff

    Hi Jeff. I'm also trying to make JS works, in my case using a PhoneGap application so it browses local html/JS instead of www (but it's html&javascript after all). I had some troubles when it comes to move items like small images even though the other JS functions seem to work fine. It seems we need to focus on which properties/functions related to positionning are available on the BB browsers.
    Rodrigo Bravo
    http://www.wilkonit.com

  • How can I stop my SSD from detecting my applications on my HDD?

    I just installed a SSD as my primary drive, and removed my optical bay and moved my HDD to that slot. I installed Yosemite on my SSD and everything is working fine, except that the Mac App store detects the applications on my HDD and keeps opening them from my HDD instead of letting me install them to my SSD. Yes, my SSD is set-up as the boot disk. If it helps, I just want to use my SSD for applications and my HDD for storing files.

    Disabling Spotlight causes it to be reindexed when you reboot to that OS (or kills searching in the other OS).
    Eject the second HD. You can setup an automator action or Applescript to do this on login.
    If you rarely need to use the second HD it is better to setup /etc/fstab to never mount the second HD on boot. You can still mount the disk manually via Disk Utility. Ask if you think this is something you want help to setup.

Maybe you are looking for