MVC model / page with flow logic
Hi all,
I have started using MVC model in BSP application. Can anyone tell me the name of the controller methods corresponding to the following event handler methods(in case of page with flow logic):
onCreate
onRequest
onInitialization
onManipulation
onInputProcessing
onDestroy
Thanks and Regards
Shilpa
Hi Shilpa,
onRequest -
> DO_REQUEST
onInitialization -
> DO_INIT
onInputProcessing -
> DO_HANDLE_EVENT
onDestroy ---> DO_DESTROY
Thanks.
Similar Messages
-
Hi Guys,
What is the main difference between working with Page with flow logic and Views? I mean, I may build up my site using only Page with flow logic or just using Views, so Why should I use views or Page w/FL or Both?
Thank you in advance,
AlexandreHi ACR,
You can build your application using only flow logic but not ONLY with views..
Take a look at below threads for difference in MVC and Flow logic methods...
[Difference in MVC and Flow logic 1.|Re: diffrence between MVC and Classical Bsp application]
[Difference in MVC and Flow logic2.|Difference between MVC and PAGES WITH FLOW LOGIC]
[Difference in MVC and Flow logic3.|MVC model / page with flow logic]
Kindly search the forum for more details.
Regards,
Anubhav. -
In MVC, do i need a View or Page with flow logic for POPUP window
Hi All,
I have the below scenario using the MVC pattern.
I have a main view with 3 trays, each tray has two buttons, for example first tray has Create Order button. When I click on this button, I need a popup window to come with a tableview and a button(Create), where I select some rows and click on the button Create to create order.
But as per the MVC pattern I canu2019t call the view (popup) from another view(main view). So should I create a VIEW or PAGE WITH FLOW LOGIC for the popup? .
I need 6 popup to be called from the main view and once the function is done close the popup.
Please suggest me the flow for this scenario.
Cheers,
Srini.Srini,
1. You can call the view in pop-up because you will be calling the controller using open.window.
Here is the sample code:
method DO_REQUEST .
data:
li_vw type ref to if_bsp_page,
lv_form_field type string,
li_md type ref to zcl_model01.
dispatch_input( ).
li_md ?= get_model( 'm01' ).
lv_form_field = request->get_form_field( 'invoice_create' ).
if lv_form_field is initial.
*------ Request to display main page
li_vw = create_view( view_name = 'main.htm' ).
li_vw->set_attribute( name = 'model' value = li_md ).
call_view( li_vw ).
elseif lv_form_field eq 'true'.
*------ Request to display Invoice page in pop-up
li_vw = create_view( view_name = 'invoice.htm' ).
li_vw->set_attribute( name = 'model' value = li_md ).
call_view( li_vw ).
endif.
endmethod.
Layout:
function do_Invoice()
{ var s=0; r=1; w=300; h=300; x=screen.width/2;
x=x-w/2;
var y=screen.height/4;
y=y-h/2;
popUp=window.open('main.do?invoice_create=true','win','width='+ w
+',height='+ h +', left=' + x +',top='+ y +');
Option2:
Ofcourse you can't bind the model in page becos those are 2 different things. But all you need to do is access the model to get some value. To know how to access the model from Page w/flow logic look at [this link|Passing model reference to a page in a Popup].
Raja
Edited by: Raja Thangamani on Apr 14, 2009 11:22 AM -
Calling a BSP page with flow logic from LAYOUT
Hello all. I am developing a BSP transaction to update HR data on SAP. I initially developed this with one 'page with flow logic' and several 'page fragment's. It has been suggested that I break this out into several pages with flow logic because the code in the 'OnInputProcessing' Event Handler was getting quite complicated. I was using the BSP directive to execute my 'page fragments'. This was very simple to do. What do I replace the BSP directive to call a page fragment with in order to call a page with flow logic. I have included the code below. I have converted the 'body.htm' 'page fragment' to a 'page with flow logic' and I am not sure of the correct way to call the page. I do not have access to the navigation->goto_page( 'body.htm' ) at this point. I am new to BSP and appreciate any help offered.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="phtmlb" prefix="phtmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<htmlb:content id = "content"
design = "design2002+design2003" >
<htmlb:document disableBackspaceNavigation="TRUE" >
<htmlb:documentHead title="ESS: Employee Self Service" >
</htmlb:documentHead>
<htmlb:documentBody>
<htmlb:form id="OOEform" >
<%-- Positioning --%>
<htmlb:gridLayout columnSize = "2"
rowSize = "2"
width = "100 %" >
<%-- Row 1 - Header --%>
<htmlb:gridLayoutCell columnIndex = "1"
rowIndex = "1"
colSpan = "2"
width = "100 %"
verticalAlignment = "MIDDLE" >
<DIV style="border-bottom-style:solid;border-color:#A5B1BF;border-width:20px">
<%@include file="header.htm" %>
</DIV>
</htmlb:gridLayoutCell>
<%-- Row 2; Column 1 (Body Area) --%>
<htmlb:gridLayoutCell columnIndex = "1"
rowIndex = "2"
width = "80%"
verticalAlignment = "MIDDLE" >
<%@include file="body.htm" %>
</htmlb:gridLayoutCell>
<%-- Row 2; Column 2 (Right Area) --%>
<htmlb:gridLayoutCell columnIndex = "2"
rowIndex = "2"
width = "20%"
verticalAlignment = "TOP"
horizontalAlignment = "LEFT" >
<%@include file="right.htm" %>
</htmlb:gridLayoutCell>
</htmlb:gridLayout>
</htmlb:form>
</htmlb:documentBody>
</htmlb:document>
</htmlb:content>Hi,
uhmmm, as it was previously suggested, you should perhaps think about MVC for your development. Working with classes and methods gives you more room for a better looking code. But at this point I´m not sure where your real problem is. You mentioned first that you created one page with logic and several page fragments and then you are worried because the code in the OnInputProcessing event is getting out of control
First, you cannot insert a page in a page. You can only insert fragments in a page with <%@include file="header.htm" %>.
Second, if you don´t have idea of MVC or you don´t want to switch to MVC, then create a modules program (SE38) where you´ll enter your code as subroutines and you call these subroutines from OnInputProcessing as follows:
perform subrout1 in program XXXXXX tables YYYYY using AAAAA.
In your programm XXXXX you declare the code as:
form subrout1 in program XXXXXX tables YYYYY using AAAAA.
This can be a substitute to classes and methods. -
Calling a page with flow logic from a controller
Is there any possibility of calling a page with flow logic(x.htm ) from a controller?
Also I want to know how to apply scrolling to a tableview in a View as there is no event handler here. Iam able to view the first 30 records but want to navigate from 31 to 60...61to 90 and so on.......
Thanks and regards,
SinuThank you so much...
but will I be able to call from a controller as we call a view...similar to the below code.
lref_first_view = create_view( view_name = 'first.htm' ).
lref_first_view->set_attribute( name = 'MODEL' value = mref_model_first ).
call_view( lref_first_view ).
I have already set the visibleRowCount....but my issue is to navigate to the next records i.e say 2nd page 3rd page..........
Regards,
Sinu -
Differences between controller/view & pages with flow logic
Hi experts!!
I am trying to create a BSP using the SBOOKSHOP tutorial.
What i have not understood so far is the differnce between creating a bsp with pages with flow logic,
and using the controller/ view method.
When should we use the first and when the other approach??
Any link to documentation would be appreciated!
Thank you!!Hi Grigoria Koutsogianni,
I hope the older thread on the same topic could help you understand the difference!
1. Re: Understanding easy BSP development (MVC vs. Flow Logic and more...)
2. Re: diffrence between MVC and Classical Bsp application
-Maheswaran -
Xhtmlb: tabStrip - how to execut a page with flow logic
Hello all, how do I execute a "page with flow logic" from a "tabStrip". Currently I am using a "page fragment". But I need to change to a "page with flow logic" becuase of a technical issue.
Is it possible to tell which tab was selected using event processing? When I try, I am getting "illegal reference".
Here is a sample of my current code.
<xhtmlb:tabStrip id = "TABSTRIP"
viewState = "EXPANDED"
viewStateMode = "COLLAPSED_EXPANDED"
tooltip = "Choose tab" >
<xhtmlb:tabStripItem name = "Home"
title = "Home" >
<%@include file="home.htm" %>
</xhtmlb:tabStripItem>
<xhtmlb:tabStripItem name = "Medical"
title = "Medical" >
<%@include file="medical.htm" %>
</xhtmlb:tabStripItem>
<xhtmlb:tabStripItem name = "Dental"
title = "Dental" >
<%@include file="dental.htm" %>
</xhtmlb:tabStripItem>
<xhtmlb:tabStripItem name = "Vision"
title = "Vision" >
<%@include file="vision.htm" %>
</xhtmlb:tabStripItem>
<xhtmlb:tabStripItem name = "FlxSpnd"
title = "Flexible Spending" >
<%@include file="home.htm" %>
</xhtmlb:tabStripItem>
<xhtmlb:tabStripItem name = "Other"
title = "Other" >
<%@include file="home.htm" %>
</xhtmlb:tabStripItem>
<xhtmlb:tabStripItem name = "RevSub"
title = "Review and Submit" >
<%@include file="home.htm" %>
</xhtmlb:tabStripItem>
</xhtmlb:tabStrip>
What would I replace the "page frament" with?
Thanks in advance for your help, TroyHi Troy,
If i understood your requirement i think you need to move to other pages or views when the tabstrip items or clicked. If your requirement is the above one below is the explanation....
In the layout you include a attribute onSelect = "mySelect" in the tag xhtmlb:tabStrip.
For event handling in the oninputprocessing you write the below code,
CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
DATA: TABSTRIP TYPE REF TO CL_XHTMLB_TABSTRIP.
Reading Data from Toolbar
TABSTRIP ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
NAME = 'xhtmlb:tabstrip'
ID = 'tb3' ).
Optional: test that this is an event from HTMLB library.
IF EVENT_ID = CL_HTMLB_MANAGER=>EVENT_ID.
Scenario 1: Read event from manager.
DATA: EVENT TYPE REF TO IF_HTMLB_DATA.
EVENT = CL_HTMLB_MANAGER=>GET_EVENT_EX( RUNTIME->SERVER->REQUEST ).
DATA: request_event TYPE REF TO cl_xhtmlb_event.
request_event ?= event.
IF EVENT IS NOT INITIAL AND EVENT->EVENT_NAME =
CL_XHTMLB_TABSTRIP=>CO_EVENT_NAME.
*---here you can handle the event...
ENDIF.
ENDIF.
Regards,
Azaz Ali. -
How to call the Page Fragment in Page with Flow logic
Hi,
I am new to BSP, My requirement is to created 1 page fragment which contains the Logo. and to create 2 pages in flow logic
The logo has to apper in Pages with flow logic Pages. My question is how to call the PAge fragment in the 1 &2 pagesin page with flow logic
Thanks,
sureshSuresh,
There is a very enriching portal help.sap.com where you can find all basic and good documentation .
http://help.sap.com/saphelp_nw04/helpdata/en/77/8a54d7434ff34784272a3df98ab645/content.htm
the above link is from that portal.
Before asking such basic questions please at least try to find or do some research yourself.
There are standard applications like HTMLB_SAMPLES and SBSEXT_HTMLB and more for sample applications.
Regards,
Anubhav -
Hpw tp call a 'Page with Flow Logic' from within a View
Within the same BSP, I have the requirment to call a page in the ;Page with Flow Logic' section from a page in the 'View' section.
Is this possible and if it is, how do I do it? I have tried some calls but they all have failed.
Thanks
Glennin the view you want to navigate then try
<bsp: call > or <bsp: goto> htmlb tags. or else you can use window.open method and open in a new window. -
Fill select-options in Page with flow logic ???
Hello All,
I created a BSP Application using Page with Flow Logic.
In the first page of my Application I'm using 2 input fields as select-options.
Now I'm populating a Ranges of that Field using the type :-
selopttab
I populated the ranges table like :-
wa_bname_sel-sign = 'I'.
wa_bname_sel-option = 'BT'.
wa_bname_sel-low = '*'.
wa_bname_sel-high = 'Z'.
ELSE.
wa_bname_sel-sign = 'I'.
wa_bname_sel-option = 'EQ'.
wa_bname_sel-low = p_bname.
wa_bname_sel-high = p_bname.
ENDIF.
APPEND wa_bname_sel TO p_bname_sel.
CLEAR wa_bname_sel.
But the problem is I checked the corresponding DATABASE Table entries by passing thesame value .
i.e I passed the low and high values to the field as '*' and 'Z'.
The total number of entries differ when passing '*' and 'Z' to when passing SPACE.
I tried even with contains Pattern .This time the total number of records fetching has Increased but the sum is not exact when passed SPACE to the Database Table.
So what should I pass to the Low and High values of my Ranges Table to get all the entries ????
DOes this type of building the Ranges work in BSP's ?
How are u people working out for the select-options functionality in Page with flow logic ?
Message was edited by:
deepu kHello Jessy,
To populate select-options or Ranges in Page with flow logic I used the following code :
************************ Bulid the Select-Options**************************************
DATA: p_bname_sel TYPE STANDARD TABLE OF selopttab,
p_bsp_name_sel TYPE STANDARD TABLE OF selopttab,
p_tcode_sel TYPE STANDARD TABLE OF selopttab.
DATA: wa_bname_sel TYPE selopttab,
wa_bsp_name_sel TYPE selopttab,
wa_tcode_sel TYPE selopttab.
* Select-Options for Username
REFRESH p_bname_sel.
CLEAR wa_bname_sel.
IF ( p_bname IS INITIAL ).
wa_bname_sel-sign = 'I'.
wa_bname_sel-option = 'CP'.
wa_bname_sel-low = '*'.
wa_bname_sel-high = ''.
ELSE.
wa_bname_sel-sign = 'I'.
wa_bname_sel-option = 'EQ'.
wa_bname_sel-low = p_bname. " p_bname is the Input field and the value is taken from it
wa_bname_sel-high = p_bname.
ENDIF.
APPEND wa_bname_sel TO p_bname_sel.
CLEAR wa_bname_sel.
* Select-Options for BSP_Application
REFRESH p_bsp_name_sel.
CLEAR wa_bsp_name_sel.
IF ( p_bsp_name IS INITIAL ).
wa_bsp_name_sel-sign = 'I'.
wa_bsp_name_sel-option = 'CP'.
wa_bsp_name_sel-low = '*'.
wa_bsp_name_sel-high = ''.
ELSE.
wa_bsp_name_sel-sign = 'I'.
wa_bsp_name_sel-option = 'EQ'.
wa_bsp_name_sel-low = p_bsp_name. " Input field
wa_bsp_name_sel-high = p_bsp_name.
ENDIF.
APPEND wa_bsp_name_sel TO p_bsp_name_sel.
CLEAR wa_bsp_name_sel.
* Select-Options for TCODE
REFRESH p_tcode_sel.
CLEAR wa_bsp_name_sel.
IF ( p_tcode IS INITIAL ).
wa_tcode_sel-sign = 'I'.
wa_tcode_sel-option = 'CP'.
wa_tcode_sel-low = '*'.
wa_tcode_sel-high = ''.
ELSE.
wa_tcode_sel-sign = 'I'.
wa_tcode_sel-option = 'EQ'.
wa_tcode_sel-low = p_tcode. " Input field
wa_tcode_sel-high = p_tcode.
ENDIF.
APPEND wa_tcode_sel TO p_tcode_sel.
CLEAR wa_tcode_sel.
* Select all the related entries when either BSP or TCode is choosen
IF ( ( p_bsp_name IS NOT INITIAL ) AND ( p_tcode IS INITIAL ) )
OR
( ( p_bsp_name IS INITIAL ) AND ( p_tcode IS INITIAL ) ).
REFRESH gt_final.
SELECT bname
bsp_name
description
ldate
ltime
calls
FROM <custom_table>
INTO TABLE gt_final
AND bsp_name IN p_bsp_name_sel
AND ldate IN p_ldate_sel.
endif.
Hope that wud help u !!!
Regards,
Deepu.K -
Open a pop-up in the OnInputProcessing part of a web page with flow Logic
Dears all,
System used : SAP WebAs 6.20
I have a html page in my project where every user can choose some options with radio buttons. When the user choose something, he click on a button which send us in the OnInputProcessing part of the page.
In the OnInputProcessing, we will do a CALL FUNCTION. If the result is Ok, we must display a pop-up with only a OK button.
From the layout part of the page, I display a pop-up with success using this code :
SCRIPT language=javascript
function ConfirmMessage() {
var bflag = confirm("Are you sure that you want to confirm your offer ?")
u2026
/SCRIPT
FORM
<input type = "submit" onClickMethod="ConfirmMessage()" name="onInputProcessing(post)" value="Confirm">
/FORM
But I can't call this code form the OnInputProcessing. I try with the functions of the class : CL_JAVA_SCRIPT too, but nothing is displayed.
Someone can help me ?
Best Regards,
Nelson
To Insert the post I was obligated to remove all the ">" and "<" and rename OnClick in OnClickMethod...
Edited by: Nelson Antunes on Feb 11, 2009 10:02 AMHi Nelson ........ i wrote this test BSP page for you:
Page Attribute :
iv_visible type boolean.
OnCreate:
iv_visible = 'X'.
OnInputProcessing:
DATA: event TYPE REF TO cl_htmlb_event.
event = cl_htmlb_manager=>get_event( runtime->server->request ).
CASE event->name.
WHEN 'button' .
CASE event->id.
WHEN 'BUTTON'.
if iv_visible = 'X' .
" data status type bollean.
" call function 'FUNC'
" EXOPORTING
" status = status .
" if status = 'X'.
clear iv_visible .
" else.
"" do nothing
"endif.
endif.
WHEN 'POPUP_OK'.
" process action after the user confirm
WHEN 'POPUP_CANCEL'.
" process action after user press "cancel"
" in confirm popup
iv_visible = 'X'.
ENDCASE.
ENDCASE.
Layout:
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:page title = " ">
<htmlb:form>
<% if iv_visible is not initial. %>
<% else. %>
<% endif. %>
</htmlb:form>
</htmlb:page>
</htmlb:content>
<style type="text/css">
#confirm_popup{
position: absolute;
visibility: visible;
border: 7px solid #001EA1;
width: 300px;
height: 50px;
left: 400px;
top: 300px;
background-color: #ECE222;
</style>
Edited by: fabrizio gemma on Feb 13, 2009 5:49 PM
Edited by: fabrizio gemma on Feb 13, 2009 5:51 PM
Edited by: fabrizio gemma on Feb 13, 2009 5:52 PM
Edited by: fabrizio gemma on Feb 13, 2009 5:57 PM -
How can I create a landing page with conditional logic?
I'd like my laning page to only show to new visitors. After visiting the landing page once, I'd like the visitor to go straight to my normal homepage. I'd like the landing page to only show to a visitor once every, let's say, 14 days. Can I do this in Adobe Muse?
I'd like my laning page to only show to new visitors. After visiting the landing page once, I'd like the visitor to go straight to my normal homepage. I'd like the landing page to only show to a visitor once every, let's say, 14 days. Can I do this in Adobe Muse?
-
Calling a Page(flow logic ) from a controller
Hi Guru's ,
I have a senario in which I have a controller and also Page flow logic .. I want to call a page of type page flow logic from the controller ..
I tried the below methods .. but it didnt work ..
*navigation->goto_page('test.htm').
DATA: r_view TYPE REF TO if_bsp_page.
DISPATCH_INPUT( ).
r_view = create_view( view_name = 'test.htm' ).
call_view( r_view ).
this works only if its is a view but not flow logic ..
Please give ur suggesions ..
Thanks
Sivarajhi sivaraj ,
first refer whether u could call a page using pages with flow logic by the controller which is used in mvc design.
may be u canot call it . u have to create a page using view according to mvc . try it once. -
Welcome page with out any password pop up
Hi All,
I have one req. that we have to make one BSP page in page with flow logic. And that page should not ask for any user id and password. Can you please help me out?
Thanks and regards,
Kuldeep VermaHello Kuldeep,
If the BSP application contains the Welcome page as well as other pages, you can achieve the goal through dividing the application into two parts: public part and protected part.
For example, for the Welcome page, you can create a page with name "public/welcome.htm", and for other pages that must be accessed with user authorization, you may create each page with name "protected/xxxx.htm".
In addition to the above, you need to create two independent services under SICF relevant node for the BSP application. As in example, one independent service is named "public", and the other is named "protected". For "public" serive, you need to specify a user that has limited rights; for "protected" service, you do not need to specify any users.
Please reward points if helpful!
Best regards!
Gordon -
Dynamic pages with WebCenter Sites CSElements
We are using the benefits of WebCenter Sites 11g regarding the possibilities of create the templates and the final user be able to compose the the pages. By the other hand, we have the necessity to create dynamic pages with business logic and interaction with database or web-services with WebCenter Sites templates. We expect to be able to embed these dynamic pages inside CSElements. With all of this in mind, what is the best approach? I'd like to know if our solution to use the Spring 2.5 + JPA 2 is a good a approach to reach our necessity/requirement or WebCenter Sites 11g has another better way to do that.
You can add your own business logic to CSElements, or create your own tag libraries and add your logic there. If you're using a framework like the GSF you can call an action from your element as well. In all cases, you are free to use whatever tools you like to help you implement your business logic (provided that it is compatible, which you've already learned about. :-). Just be careful that you don't use the same database connection pool that Sites uses or you may run out of connections. Also, pay attention to how you are caching your pages and pagelets when you are calling external services or accessing external resources.
Regards
Tony
Maybe you are looking for
-
Free goods master for STO or workaround to meet this requirement
Dear Gurus, I use IS-retail and the situation we faced is we have got a deal from our vendor that if we buy article A will get article B for free. So we set a free goods master using condition type NR00. It work fine in purchase order we order to our
-
S540: Video card got warm, case bent
I was working on a WebGL application, then my laptop (I assume it's the video card) got pretty warm. Temperature monitor said it got about 75 degrees Celsius, which should be fine. NOT! My laptop bent... the right front corner (with the little ThinkP
-
Issue with billing release to accounting results in a an error.
When using TC VF02 and selecting Release to Accounting option. I get error msg. Tax statement item missing for tax code Y0. msg code FF805. I did check the tax code and the g/l account related to the tax code and it looks ok. Everything was working f
-
My computer will not detect m,y iphone4 as a music shareing device. I have it pluged in to the computer and the phone what do i do?
-
Another Display problem! :(
Looking for some advice! My unibody macbook has a very touchy display. Basically, if it tilts any further back than 90 degrees, the display will freeze (also if I close the lid). If I startup the computer with the lid propped further back, it'll say,