Use of Java Code within the generated XML Forms Stylesheets

Hello,
is the use of Java-Code possible with the XSL-Files generated by XML-Forms, as possible in standard XSLs? I know that this would mean a modification.
kind regards,
Marco

Hi Marco,
I "executed" some java code within XSLs file. I have quoted the word executed because I didn't really run java code, but I used a simply trick that I describe you below.
Into your XSLs put an iframe which is hided (it has an height of 0 pixel). As src of the iframe put the address of a portal component which execute your code (in my case calculate some PCD URL of some pages into a defined role). As result of component execution, I use the response.write method in order to execute some jscript code, which is able to interact with the HTML generated by XSLs files, for example in my case response.write put the PCD URL into a drop down list placed into the "edit" form.
This works fine. I don't know if is suitable also for your case, anyway could be a hint, but pay attention to Roland's recommendations.
Ciao
Roberto

Similar Messages

  • Dynamic navigation from inside the java code within the project

    I want to create dynamic navigation in my project.
    On my first page I need to get to a second servlet page by the use of dynamic coding. In normal servlets I would use response.redirect() but I cant here in the creator world and I am stuck on this point.
    Any ideas or directions on how to proceed?
    I know how to use the navigation XML file and know how to modify the file in question.

    Well I sort of worked out what had to be done, and the references that everyone gave me was amazing and I am thankful...
    The JNI does anyone have JNI experience???
    Has anyone got the JNI functionally working within this IDE??

  • Problem with the deleted instance of the subform in the generated XML

    Hi
    I have a dropdown and it has 3 values in it and I have 3 subforms(min count=0, max count=1).
    Based on the selection of the dropdown
    If value is 1, I am adding an instance of subform 1
    If value is 2, I am adding an instance of subform 2 and deleting the instance of subform 1
    and so on.
    This functionality works fine.
    The question is when i generate XML using "submit by email" button, the generated XML also contains the tags of the subforms which are not present in the form and got deleted. They appears as an empty tag in the xml which i do not want in that file if that subform instance got deleted.
    Pls. Help
    Thanks
    Abhiram

    Hi,
    As you know the binding is set in the Object > Bindling palette. You can't change the binding using script at runtime, therefore if objects have a binding Name/Normal or Global, then they will participate in the XML data processing.
    I don't think you can change this in LC Designer/Acrobat. You might be able to process the XML file once you have received it.
    Good luck,
    Niall

  • Creating Java code for the function module

    Hi Colleagues,
    I have a fuction module in ABAP system. Now I want to Generate java code for the FM.
    I cam to know that we can achive that using AXIS, By getting the XML file for the fuction module and generate Java
    Class file using that XML file.
    Can any one tell me how to achive it.
    Or any other way to do that?
    Please provide you valid suggestions.
    Regards,
    Sathya

    Hi,
    You can integrate axis2 in eclipse. I think you have to find the plugin for that.
    After that you can let axis generate the jave code (stubs and proxies) for your web service via the wsdl file.
    Kind Regards,
    Robin

  • Regarding use of java code inside javascript

    Hi ,
    I have doubt regarding how to use java code inside javascript,
    i am giving my application code here
    <%@page import="java.util.*"%>
    <%@ page import="com.suuny.sard.pmt.pat.*"%>
    <SCRIPT LANGUAGE="JavaScript">
    function fun(){
         var ac=document.login.Projectname.options[document.login.Projectname.selectedIndex].value;
         var c = document.login.task1.value;
         alert(ac);
         alert(c);
         return true;
    </SCRIPT>
    <form name="login" action="/pmt/jsp/Leavemanagement/Leave_Ems_HomePage.jsp" method="get" encType="x-www-form-encoded" >
    <table width="100%" Align="Center" cellspacing="0" cellpadding="0" border="0">
    <tr class="tablerow"><td colspan="6" align="center"><font class="pagehead" align="center">Create Tasks</font></td></tr>
         <tr class="tableheader">
              <th>Project
              <th>Task-Id
              <th>TaskName
              <th>Assigned To
              <th>description
              <th>Milestone
         </tr>
         <%
              for(int i=1;i<2;i++){%>
                   <tr class="tablerow"><td align="center">
                   <select class="SELECT" NAME="Projectname" VALUE=" " onchange="return fun();" >
                   <!--<option value=""> </option>-->
                   <%
                        ArrayList ar =null;
                        ArrayList projectids=null;
                        Hashtable ht = new Hashtable();
                        ProjectNames pnames=new ProjectNames();
                   ht = pnames.getProjectNames();
                        ar=(ArrayList)ht.get("projects");
                        projectids=(ArrayList)ht.get("projectIds");
                        for(int j=0;j<ar.size();j++){
                        out.println("<option value=\""+projectids.get(j)+"\">"+ar.get(j)+"</option>");
                   %>
    </select>
         <%
                   out.println("<td align=\"center\"><input type=\"text\" name=\"task"+i+"\"value=\"\" size=\"25\"></td>");
                   out.println("<td align=\"center\"><input type=\"text\" name=\"taskname"+i+"\"value=\"\" size=\"25\"></td>");
              %>
              <td align="center">
                             <select class="SELECT" NAME="Projectname1" VALUE=" ">
                             <!--<option value=""> </option>-->
                             <%
                                  ArrayList ar1 =null;
                             ar1 = pnames.getProjectResource("VXML02");
                                  for(int j=0;j<ar1.size();j++){
                                  out.println("<option value=\""+ar1.get(j)+"\">"+ar1.get(j)+"</option>");
                             %>
    </select>
              <%
                   out.println("<td align=\"center\"><input type=\"text\" name=\"description"+i+"\"value=\"\" size=\"25\"></td>");
                   out.println("<td align=\"center\"><input type=\"text\" name=\"milestone"+i+"\"value=\"\" size=\"25\"></td><tr>");
              out.println("<tr class=\"tablerow\"><td colspan=\"6\" align=\"center\"><input class=\"txtbuttonsmall\" type=\"submit\" value=\"save\"></td>");
         %>
    </Table>
    </form>
    My question is :
    I selected one project from first combo box ,i need project members corresponding to the project.
    In my code "pnames.getProjectResource("VXML02");" in this function iam passing one static projrct value,but i need dynamically selected project from first combo box(<select class="SELECT" NAME="Projectname" VALUE=" " onchange="return fun();" >),so please help me guys.

    Hi Marco,
    I "executed" some java code within XSLs file. I have quoted the word executed because I didn't really run java code, but I used a simply trick that I describe you below.
    Into your XSLs put an iframe which is hided (it has an height of 0 pixel). As src of the iframe put the address of a portal component which execute your code (in my case calculate some PCD URL of some pages into a defined role). As result of component execution, I use the response.write method in order to execute some jscript code, which is able to interact with the HTML generated by XSLs files, for example in my case response.write put the PCD URL into a drop down list placed into the "edit" form.
    This works fine. I don't know if is suitable also for your case, anyway could be a hint, but pay attention to Roland's recommendations.
    Ciao
    Roberto

  • Invoke Java code within BPM process

    Hi,
    I have a use case where I need to retrieve a property from database and set the value to a process variable. Is there a way I can achieve this?
    Also, is there a way to invoke a piece of java code from the automatic activity within a BPM process?
    Thanks,
    Suren.

    The best way to do this is to use the spring component. You will need your java code setup as a spring bean in the spring context file and then it can be exposed to the BPM process as an sca service.
    http://docs.oracle.com/cd/E21764_01/integration.1111/e10224/sca_spring.htm

  • Provide the java code for the following scenario.

    Hi Experts,
    I have tried with all the combinations for this scenario. As per my understanding i require java code for the following scenario
    so that it becomes easy........
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
    So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
    Kindly provide the java code.
    Thanq very much in advance..

    what i have understood from ur example is that u want to generate an idoc for unique combination of  Order-no and Mat_No
    if yes then chk the below mapping..
    change the context of Order_No, Date, Mat_No and Quantity to Record (right click-> context)
    1)
    Order-no
    ----------------------concat[;]---sort----splitbyvalue(valuechanged)-----collapse context---IDoc
    Mat_No
    2)
    Order-no
    --------concat[;]---sort----splitbyvalue(value changed)---collapse context---UDF1--splitbyvalue(each value)--Delivery_Order_No
    Mat_No
    3)
    Order-no
    -----------concat[;]---sortbykey----------------------- \
    Mat_No                       /                            \
    Date--------------- /                                       \
    ----------------------------------------------------------FormatByExample-----collapsecontext---splitbyvalue(each value)----Recv_Date
    Order-no                                                 /
    -----------concat[;]---sort----splitbyvalue(value changed)
    Mat_No
    4)
    Order-no
    --------concat[;]---sort----splitbyvalue(value changed)---collapse context-UDF2--splitbyvalue(each value)--Material_Num
    Mat_No
    5)
    Order-no
    -----------concat[;]---sortbykey
    Mat_No                       /
    Quantity --------------- /
    ----------------------------------------------------------FormatByExample-----SUM(under statistic)----Recv_Quantity
    Order-no
    -----------concat[;]---sort----splitbyvalue(value changed)
    Mat_No
    UDF1:
    String [] temp= a.split(";");
    return temp[0];
    UDF2:
    String [] temp= a.split(";");
    return temp[1];

  • Access ABAP tables using NWDS Java Code

    All,
    I am planning to write a program to autmatically update is_url entries in sxmb_admin using a Java program.
    Is there a way we can access the ABAP tables using standalone Java Code? would it something like dblookup that we use in the mappings?
    Your Thoughts....
    Thanks.

    Hi Vicky - Interesting..Seems like you are trying to automate every single thing
    However you can make use of Jco to connect to ABAP tables..
    Check the below thread..
    Help on accessing tables of SAP from the Java Application
    I assume the table name is "SXMSCONFVLV" which you might have to update but not sure..

  • How to view the java code of the message mapping,

    Hi Experts,
    <b>how to view the java code of the message mapping,</b>
    how to get the background java code of the message mapping(graphical mapping).
    And where to view it?

    Hi sowmya,
    Open any  Message mapping in IR. Press <b>CtrlShift0(zero)</b> to open a new menu.
    There you will find an option "Is Java Source Code Available?"
    There will be an export button nearby. Use it to get the code.
    Open it in a zip , you will see the hide java code.
    The JAVA code for graphical msg mapping is in below folder:
    \usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
    Here all the mapping jars are there in this folder.
    Just decompile these jars and you can see the code.

  • Advice needed for changing code within the Web IC...

    Hi,
    I need to change some code within the GET_QUERY_RESULT Method, which is found:
    BSP->Z_CRM_IC
    View->AuiSearch
    Controller class ZL_CRM_IC_AuiSearch_impl
    Method do_handle_event
    Method eh_onsearch
    Method get_query_result
    At present the method get_query_result belongs to class CL_CRM_AUI_QUERY_SERVICE.
    I can create a subclass from this and call it ZL_CRM_AUI_QUERY_SERVIC, then redefine the method get_query_class, and then make the appropriate changes. But that may be all uneccessary. What I don't know is how to ensure this modified code can be called.
    I have already made changes for method DO_INIT_CONTEXT, hence the reason the controller class ZL_CRM_IC_AUISEARCH_IMPL is identified. But this was simple because the view linked directly to this whereas you can see the code I need to change is further down in process chain.
    I know that method get_query_result calls a number of BADI's, but these BADI's are too low for the information that I need and therfore really need to make my code changes in the get_query_result method.
    I have been reading as much as I can on this subject, but without much success and therefore really count on experienced developers like yourselves to steer me in the right direction, or give advice.
    Jas

    I will not suggest to put your Enhancements into CL_CRM_AUI_QUERY_SERVICE.
    Rather in  Component BT  -> Class CL_CRM_BTIL .  AUi Query Service will Internally call the BOL Component ( get query result )
    In your Framework Profile Config  , you specify the Component Set  . Ex: ALL
    Component set have a List of Component Ex BP , BT .
      SPRO-> CRM -> CRM Cross Application Components -> Generic Interaction layer -> Basic Settings
    Now you can have your Custom , Component Set ( Ex : ZALL ) and Component ( ( Ex ; ZBT , Totally advisable for CIC Development Framework )
    Have BT Copied into ZBT and  Specify  ZL_CRM_BTIL (  Inherited from CL_CRM_BTIL )
    And in your Custom Component Set , Specify ZBT instead of BT . 
    Now Specify your Custom Component Set in your Framework Profile .
    Now you got the Enhancement Spot in  ZL_CRM_BTIL->GET_QUERY_RESULT
    Let me know if it make sense

  • How to get the java code of the message mapping

    how to get the java code of the message mapping,
    I mean to ask how to get the background java code of the message mapping(graphical mapping).
    And where to view it?

    Hi Satya,
    The JAVA code for graphical msg mapping is in below folder:
    \usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
    Here all the mapping jars are there in this folder.
    Just decompile these jars and you can see the code.
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

  • Having problem buying online.need your help since it's my first time here.apple is asking for my billing address but when i enter my address here in qatar,it's saying i should enter a valid zip code within the u.s.does it mean i can't buy online

    having problem buying online.need your help since it's my first time here.apple is asking for my billing address but when i enter my address here in qatar,it's saying i should enter a valid zip code within the u.s.does it mean i can't buy online even if it wil be shipped within u.s. only?

    To buy in for delivery in Qatar, you should be starting from the Apple Qatar site:
    http://www.apple.com/qa/
    Do you have an Apple-ID? if you do, then you should not have to enter your Address again, and may be able to sidestep the US Zip Code issue.

  • How to call web-service using only java code

    Hello, how to call web-service using only java code. I can call it from BPM process or Web Dynpro Java Application, but if I need to call it from ejb component?

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • How  to get the java code of the standard functions

    How  to get the java code of the standard functions in xi
    Example , hoh get the java code for a node function - removeContext.

    hi
    Click on the Standard Function.
    Hold Ctrl+Shift
    right click on the standard function to view the context menu. You will see options to view the source code by exporting
    regards
    krishna

  • Hi, folks can some body help me¡  How  I can  use  de second  code  to  the  Itunes card  to  use  the  Itunes card.... My  number is vanished, how  i can submit  my  Itunes card?

    Hi, folks can some body help me¡  How  I can  use  de second  code  to  the  Itunes card  to  use  the  Itunes card.... My  number is vanished, how  i can submit  my  Itunes card?

    iTunes Store: Invalid, inactive, or illegible codes
    http://support.apple.com/kb/TS1292

Maybe you are looking for