Displaying same JSP page with different views based on BOB and B2B scenario

Hi Experts,
I have a requirement where, in the orderstatusdetails.jsp i want to add a button only for a BOB(OOB) scenario but not for the B2B scenario. I know how to display diffenretly by adding the code       
mybom.getShop().getscenario()
in the action class i use and putting the codintion OOB or B2B but How can i code in JSP for this requirement? Can you please help me how to do it?
Thanks a lot in Advance!!!!!
Regards,
Lakshman.

Hello LRG,
Almost anything you can do in a Java class can be done in a JSP - but it is always recommended you do less of coding in the JSP. But this is an exception you can do in the JSP
All the inport classes required for this piece of code you have referred can be added to the page import in JSP. For example if you need the class UserSessionData then
<%@ page import=u2018com.sap.isa.core.UserSessionDatau2019 %>
will do the job in the JSP. Once you have all the required imports then it is just a matter of adding the piece of code in a Java scriptlet to get the scenario.
<%
//Code copied from the message reply by Michael Meyer
UserSessionData dt = UserSessionData.getUserSessionData(request.getSession());
BusinessObjectManager mgm = (BusinessObjectManager)dt.getBOM(BusinessObjectManager.ISACORE_BOM);
String scenario = mgm.getShop().getScenario();
%>
After this, is determined in any page, use the variable scenario, use it in a if clause and surround the button with that if clause.
<% if (scenario == BOBSCENARIO) { %>
  //HTML code in the JSP here for the button when the scenario is BOB
<% } else { %>
  //More HTML JSP code if the scenario is not BOB
<% } %>
Hope this is what you wanted.
Easwar Ram
http://www.parxlns.com

Similar Messages

  • How To Customize displaying  of JSP page From Backing Bean

    I would like to customize the displaying of jsp page from backing bean based on user Roles
    For example
    - if the Role is Admin then backing bean should display Admin.jsp
    - if the Role is Guest then backing bean should display Guest.jsp
    Any pointers/suggestions will be highly appreciated
    Regards
    Bansi

    Thanks to all for providing thoughts
    I wanna make it more Dynamic. In the sense
    "Backing Beans should drive the rendering of first jsp page in the application " and not jsp page driving the backing bean or not to put some kind of hard coding in jsp page to see if its admin user then display certain set of UI Components or certain set of other UI components for other users.
    As we have atleast 10 different Roles and there can be Composite Roles i.e. combination of two roles. In this case how does the Backing Bean drives the rendering of jsp page?
    Regards
    Bansi

  • More than one business component (views) in the same JSP page

    Hi, I am trying to have more than one business component (views) in the same JSP page as Input Form.
    For example:
    There are two BC4J:
    Person:
    Code.
    Name.
    Address:
         Person_code
         Street.
         City.
    There is a master detail relationship between them and there is a link between both views in the application module.
    I want to create a JSP page with an Input form for both views. When the user decides to create a Person, I need to insert in both tables.
    Insert code and name into Person table.
    Insert Person_code, Street and City into Address table.
    It is possible to do in Forms but I am not sure if I can be able to do this in JDeveloper 10G.
    Thanks

    Sorry I lost the tabs
    Person has two attributes Code and Name.
    Address has three attributes Person_coden Street, City.

  • I want to display many records in the same jsp page

    Hi,
    i want to display many records with in the same jsp page providing the next,previous,first last .
    give me clear idea how to do that one
    note :only using servlets,jsp,jdbc and javascript

    I believe that this is the fourth time this question has been asked by the same person
    http://forum.java.sun.com/thread.jspa?threadID=720977&messageID=4159465#4159465
    http://forum.java.sun.com/thread.jspa?threadID=720945&messageID=4159338#4159338
    http://forum.java.sun.com/thread.jspa?threadID=720919&tstart=0

  • Error while trying to open the same JSP page.

    Hi partners,
    After solving some issues with JSP deployment, we are getting another error message.
    This is when we try to open the same JSP page at the same time.
    500 Internal Server Error
    javax.servlet.jsp.JspException: oracle.express.idl.util.OlapiException: ORA-22275: invalid LOB locator specified at oracle.dss.addins.jspTags.PresentationTag.doStartTag(PresentationTag.java:194) at Principal.jspService(_Principal.java:68) [SRC:/Principal.jsp:6] at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java(Compiled Code)) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java(Compiled Code)) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java(Compiled Code)) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java(Compiled Code)) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:513)
    I mean this is a concurrency problem.
    Any information about this will be really appreciated.
    Best regards!!!!!
    Francisco Mtz.

    After running the BI_Checkconfig tool I got an inconsistent OLAP API Metadata
    result, it was because a partner was modifying the OLAP metadata without saving
    the changes.
    After saving the changes in the OLAP metadata, I ran the BI_Checkconfig tool
    again with success (no metadata errors).
    Now the pages are displayed without any error message.
    Best regards!!!!
    Francisco Mtz.

  • Geting response on same JSP page

    hi everybody
    i want to select an item from dropdown box and want to display
    all data related with this selected item on same jsp page
    plz help me out
    thx in advance

    hi friends
    i am a newbie to java, i have some problem, can any one help me out?
    my form has few entries like
    USERNAME(text field),
    PASSWORD(text field),
    COUNTRY(select field - drop down list box),
    STATE (select field -drop down list box) n so on
    i have successfully populated countries list in the drop down list box taken from database dynamically using jsp
    "HERE COME THE COUNTRY CODE"
    <select size="1" name="country">
    <option selected value="Select">Select</option>
    <%
    while(rscoun.next())
         String coun=rscoun.getString(1);
         %>
         <option value ="<%=coun%>"><%=coun%></option>
         <%
         } %>
    </select>
    now when the user selects the country (say INDIA) , states list should be populated dynamically depending on the user selection
    and all this should happen on the same page
    please let me know how to achieve this , i need the help badly
    thanks inadvance
    kind regards
    suman

  • Regarding incorporate the two page nations in the same JSP page

    Hi folks,
    i am unable to do two page nations in the same JSP page using paging tag libray,I am getting the follwoing problem while setting the offset value to the Pager.offset.
    I have written the code like this.
    <pg:pager items="<%=size%>" export="sreenyOffset=offset, currentPageNumber=pageNumber;" isOffset="true" scope="request">
         <pg:index export="totalItems=itemCount">
         <% System.out.println("Before currentPageNumber:"+currentPageNumber); %>
         <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" nowrap>
              <tr class="pagenation" >
                   <td width="1%">&nbsp<br><br></td>
                   <td width="40%" align="left"> 
                        <pg:page export="firstItem, lastItem">Displaying results <strong><%= firstItem %>-<%= lastItem %></strong> of <strong><%=      totalItems %></strong> found</pg:page></td>
                             <td width=20%></td>
                        <pg:prev export="pageUrl,firstItem" >
                             <td width="5%" align="right" height="22">
                             <a href="javascript:submitSearchForm(document.organizationForm,'<%= firstItem %>')"><b>Previous</b></a></td>
                        </pg:prev>
                        <pg:pages export="pageUrl,firstItem,pageNumber">
                        <%
                             System.out.println("pageNumber :"+pageNumber+"^currentPageNumber:"+currentPageNumber);
                        %>
                             <% if (pageNumber == currentPageNumber) { %>
                                       <td width="2%" align="right" height="22"><font color=#FFFFFF><%= pageNumber %></font></td>
                             <% } else { %>
                             <td width="2%" align="right" height="22">
                                       <a href="javascript:submitSearchForm(document.organizationForm,'<%= firstItem %>')"><font color=#415481> <%= pageNumber %> <font></a>
                   </td>
                        <% } %>
                        </pg:pages>
                        <pg:next export="pageUrl,firstItem" ifnull="<%= true %>">
                             <% if (pageUrl != null) { %>
                   <td width="5%" align="right" height="22">
                        <a href="javascript:submitSearchForm(document.organizationForm,'<%= firstItem %>')"><b>Next</b></a></td>
                        <% } %>
                        </pg:next>
              </tr>
         </table>
         </pg:index>
              <html:hidden property="offset" value="0"/>
              <html:hidden property="pager.sreenyOffset" value="0"/>
    </pg:pager>
    I need some clarification for following things.
    1)i have given the export like this
    export="sreenyOffset=offset, currentPageNumber=pageNumber;"
         but while setting the offest for pager, i am doing like this
                   <html:hidden property="pager.sreenyOffset" value="0"/>
         can i customize the pager.offset to pager.(someting) like that.
    2)if i use pager.offset for two page nations in the same page pager.offset value is overriding,So i am unable to maintian the page nations.
    3)i can change the offset value into sreenyoffset in the export property of pager tag,if iam able to change the pager.offset value to customized value my problem will solve.
    4)
    can i declare the export property like this.
    <pg:pager items="<%=size%>" export="sreenyOffset=offset, currentPageNumber=pageNumber;" isOffset="true" scope="request">
    Please give me your valuable suggestions,it will be very helpful to me.
    Also give me some suggestions how to do the two page nations in the same page.I am desperately waiting for response.
    Thanks & Regards,
    Sreeny Reddy.

    Hi,
    I was trying the pagination concept in jsp. I am getting a lot of errors. Can u help me for displaying this pagination.i need to display dynamic records according to search criteria. In search criteria, an area is selected and the data related to that area should be displayed from a table in mysql . It has 100+ records each
    with 6 columns, each page should be displaying 10 records, what we call pagination. I was trying this(in java jsp)( should not do in struts, should be done only in jsp) for a long time. By ur faq, i understood u hava already done it. Pls try to help me. Can u pls send me a sample program regarding this?
    I would be very grateful if u help me.
    thanks in advance,
    regards,
    mv.

  • Dynamicaly populating textbox in same same jsp page

    hi,
    i have a list box like
    <select name="ss">
    <option value="1">one
    <option value="2">two
    <option value="3">three
    </select>
    if i select "one" from list box than two text should be populated in same jsp page.
    please tell me how to achive this.

    It isn't a disturbance, it just looked different then what it is.
    My favorite way of doing this is to create the three text boxes, but hide two of them (and disable them). Then use the javascript function to show and enable them... like this:
    <html>
    <head>
    <script type="text/javascript">
      function showBoxes() {
        selectElem = document.getElementById("ss");
        selectedValue = selectElem.options[selectElem.selectedIndex].value;
        text2 = document.getElementById("text2");
        text3 = document.getElementById("text3");
        if (selectedValue==1) {
          text2.style.display = "none";
          text2.disabled = "disabled";
          text3.style.display = "none";
          text3.disabled = "disabled";
        if (selectedValue==2) {
          text2.style.display = "inline";
          text2.disabled = null;
          text3.style.display = "none";
          text3.disabled = "disabled";
        if (selectedValue==3) {
          text2.style.display = "inline";
          text2.disabled = null;
          text3.style.display = "inline";
          text3.disabled = null;
    </script>
    </head>
    <body>
    <form>
    <select name="ss" id="ss" onchange="showBoxes();">
      <option value="1" selected="selected">One</option>
      <option value="2">Two</option>
      <option value="3">Three</option>
    </select><br/>
    <input type="text" name="text1" id="text1" style="display:inline;"/>
    <input type="text" name="text2" id="text2" style="display:none;" disabled="disabled"/>
    <input type="text" name="text3" id="text3" style="display:none;" disabled="disabled"/><br/>
    <input type="submit"/>
    </form>
    </body>
    </html>

  • How can I send email from an JSP page  with HTML format either using jsp

    hi,
    I have an jsp page with online application form,after compleating the form if i select submit it will send all the compleated data to the mail id we mentioned in the form tag,for this i am using javascript,but instead of receiving the data in the format of strings,my client want to receive the data in the same format as he's filling in the jsp page(html format) through e-mail.any help would be appreciated.the fallowing is the code right now i am using for email application.
    <code>
    function send()
    if(validatePersonalInfo(document.theform))
         document.theform.submit()
         location.href=location.reload()
    function validatePersonalInfo(form)
         var tmpStr ="";
         if (form.Name.value == "") {
              tmpStr = "Name";
              document.all.dName.style.visibility="visible";
              document.theform.Name.focus();
         else{
              document.all.dName.style.visibility="hidden";
         if (form.SSN.value == "") {
              tmpStr = tmpStr + ", Social Security Number";
         document.all.dSSN.style.visibility="visible";
         if(form.Name.value != "")
              {document.theform.SSN.focus();}
         else{
              document.all.dSSN.style.visibility="hidden";
    if (tmpStr == "") {
              return true;
         } else {
              alert("Please Fill the Following Fields: " + tmpStr);
              return false;
    <FORM NAME="theform" METHOD="post"
    ACTION="mailto:[email protected]?subject=Online Application Form for MinorityDealer." ENCTYPE="text/plain">
    <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="10" NOF="LY">
    <TH>
    <P>
         <FONT SIZE="3" FACE="Arial,Helvetica,Univers,Zurich BT">Online�Application</font></TH><BR>
    </TABLE>
    <table width="718" border="1" cellspacing="0" cellpadding="3" bgcolor="#CCCCFF" align="center">
         <tr>
    <td colspan="2"><font class="captionText">Name*�</font><br><input type="text" size="25" name="Name" class="bodyText">
    <div id="dName" name="dName" style="position:absolute;visibility:hidden"><font color="red">Name is Mandatory*</font></div>
    </td>
              <td colspan="2"><font class="captionText">Social Security Number*�</font><br><input type="text" size="9" name="SSN" class="bodyText">
              <div id="dSSN" name="dSSN" style="position:absolute;visibility:hidden"><font color="red">SSN is Mandatory*</font></div></td>
    </tr>
    <tr>
    <td colspan="2"><font class="captionText">Total Personal Assets</font><br><input type="text" size="10" name="TotPersAss3" class="bodyText"></td>
              <td colspan="2"><font class="captionText">Total Personal Liabilities & NetWorth</font><br><input type="text" size="10" name="TotPerLiab3" class="bodyText"></td>
    </tr>
         </tr>
    </TABLE>
    <IMG Valign="middle" name="imgSubmit" src="images/buttons/Submit.gif" width="66" height="29" border="0" alt="Submit">
    </code>

    Can any one do some help to solve this problem.
    Regards.

  • Two managed beans in same jsp page

    Hello
    First this could be a stupid question, but i just can't find a solutions on this problem.
    I wondering that could it be a two managed beans in same jsp page, here is a example:
    index.jsp
    <t:commandLink disabled="#{listBean.currentPage == 1}" id="previous2" type="button" immediate="true" style="font-size:small" action="#{listBean.previousPage}">
    <h:outputText value="Edellinen" id="prev"/>
    </t:commandLink>
    <t:commandLink disabled="#{listBean.currentPage == listBean.totalPages}" id="next2" type="button" immediate="true" style="font-size:small;" action="#{listBean.nextPage}">
    <h:outputText value="Seuraava" id="next"/>
    </t:commandLink>
    then i have a dataTable like this:
    <t:dataTable value="#{customerListBean.customerBeans}"
    binding="#{customerListBean.dataTable}" preserveDataModel="true" style="text-align:left">
    My problem is that when i push a commandLink it doesn't refresh a dataTable. Does anyone know a solution here or is this just a impossible way to do it?
    Thanks for help.

    when i push nextPage (commandLink) it's call action
    and count a new range of dataset and after that it's
    calls a method which is declared on subClass and that
    method get a new data of database on given params.
    and put it on DataTable.
    So listBean is upper class and customerListBean
    extends on ListBeanNo, it doesn't work that way as you expected. You have created two independent instances. They doesn't communicate automatically with each other or so. Just use one CustomerListBean instance and call the inherited methods of ListBean on the #{customerListBean} managed bean instance.

  • To create multiple files with same content but with different names

    Hi SapAll.
    here i have got a tricky situation on Idoc to File Scenario.
    in my interface of an Idoc to file ,there  is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
    which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
    so here for now iam using one reciever file communication channel.
    can any body give me the quick answer.
    regards.
    Varma

    What do you mean by different names?
    when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
    You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
    If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
    Do not use a BPM!
    Regards,
    Abhishek.

  • How update the info on same Jsp page

    i have a Jsp page.on left side of this page having menu bar. in this menu bar having links of some colleges.
    i want when i click on link of first college name, same page should be updaed with updated menu bar where i can show the information of the concerning college.
    please focus on this.

    I have two Jsp pages named bestschool.jsp and schoolnames.jsp.
    I am calling schoolnames.jsp from bestschool.jsp.
    I want when I click the link on INDUS School. It can show all concerning link of INDUS School links like profile, result, facility etc. in the same place instead of other naming school links.
    my requiremet main is i want to update the information on same Jsp page.
    How can I implement this with in Servlets/Jsp.
    Please review below JSP’s files
    schoolnames.jsp
    <table width="200" border="0" align="center" cellpadding="5">
    <tr>
    <td height="100" bgcolor="#476bc0">
    <div align="center" class="boldhead"><font size="+1">
    School list</font></div>
    </td>
    <tr>
    <td height="30" bgcolor="#5577C6">
    <a href="" class="smalltext">INDUS School</a></td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">Vaise School</a>
    </td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">D.G.V School</a></td>
    </tr>
    <tr>
    <td height="30" bgcolor="#728DCF">
    <a href="" class="smalltext">D.P.S School </a></td>
    </tr>bestschool.jsp
    <html>
    <head>
    <title>Best school</title>
    <link href="mystyle.css" rel"stylesheet" type="text/css">
    </head>
    <body>
    <div align="center"><font size="+2">
    Best Schools in Rohtak</font>
    </div>
    <table width="700" height="500" border="0" align="left"
    cellspacing="0">
    <td width="200" rowspan="2" valign="top">
    <%@ include file="schoolnames.jsp" %>
    </td>
    <td height="328" bgcolor="#476BC0" valign="top">
    <p> </p><p> </p><p> </p>
    </html>please suggest.

  • Same Batch Number with different characteristics value

    Dear Gurus,
    I have the following scenerio:
    The finished goods should be maintain in batch with external number  and at the time of confirming the finished goods in co11n the client want to capture the finished goods value like length, width and diameter.
    So we propose the batch characteristics with class type of 022 for finished good and we maintain the character as length, width and diameter under the batch class 022 and assign the batch class in finished good classification view.
    Now the requirement is we want to capture the batch characteristics value length width and diameter with same batch number for multiple confirmation.
    Example:
    Confirmation      Batch number               batch Class               Length     width     Diameter
    1                        1000                              022                              100        50             20
    2                        1000                              022                              120        25             10
    3                        1000                              022                              150        70             30  
    Now at present we are trying to capture the batch characteristics with same batch number but our standard system will not allow to maintain the different batch characteristics value under same batch number. If we overrite the batch characteristics in msc2n transaction the last value maintained be copied to all batch number. but we want same batch number with different batch characteristics value.
    Please share your idea and try to solve..
    Regards,
    Vimal

    Dear Vimal,
    It is not possible to maintain multiple batch characteristics in one batch.
    Work around is to create original batches and assign to your production order.  During CO11N, generate one batch per confirmation.  There is a report in batch information cockpit to link between original batch and batch per confirmation. 
    Rgrds,

  • 2 same surrogate keys with different filter conditions in one report

    how do we put 2 same sr keys with different filter conditions in one single report??
    for example, we have to get the 'count' for tm_sr_key:
    1. count(tm_sr_key) where past_due_flag = Y
    2. count(tm_sr_key) where past_due_flag = Y and N
    to be displayed in one single report.
    it happens that both sr_keys will display the same measure (which is the 1st filter conditions)
    and the filter under criteria tab in anwer will show as :
    tm_sr_key where {filter condition 1}
    AND
    tm_sr_key where {filter condition 2}
    instead of :
    tm_sr_key where {filter condition 1} for 1st measure
    tm_sr_key where {filter condition 2} for 2nd measure
    d only option i could think right now is to duplicate the tm_sr_key data in the same table but with different name say, tm_sr_key_2..
    kindly pls help.
    thanx

    i'm sorry, not really understand.
    could you pls explain a bit more about the filter column? how do we do it? coz i'm really new in this tool.
    r u talking about editing the filter located under the column on the right side of the OBIEE answers?
    or is it by editing the 'edit column formula' for required column; that is by replacing the 'column formula' expression with this:
    FILTER(EXPS_FACT.FAC_SR_KEY USING EXPS_FACT.PAST_DUE_FLAG = 'Y') <----if it is like this, i tried it already & its giving me an error message..
    thanx.
    Edited by: rezza.nasha on May 28, 2009 1:26 AM

  • For FF19 with PDFs, can the yellow "Open With Different Viewer" pop-up bar be disabled?

    Hi all, I really like the built in PDF viewer because search as a I type works with, thanks FF devs!
    But ... I get this yellow pop-up with many PDFs I view:
    This PDF document might not be displayed correctly and a button for Open With Different Viewer
    The thing is these PDFs seem fine and I have to close the warning every time.
    Is there anyway this pop-up can be disabled or I can set an about:config setting to skip it? I can manually save a PDF or disable FF19's viewer if there's a noticeable problem with the FF19 viewer.

    Ok, since the pop up bar can't be disabled I'll disable the built in PDF viewer. Too bad, I like the search as you type feature with PDFs but this un-disable-able pop-up bar is not user friendly.

Maybe you are looking for