Using objects of the own page
I have the fallow code inside a JSP:
" <TABLE border='0' bgcolor='#004080' style='border-style: double; border-color: #408080;'>
<TR>
<TD valign=top>
<B><FONT color='#ffffff'>Informa��es Gerais</FONT></B>
</TD>
<TD>
<TEXTAREA name='infoGeral' cols='30' rows='10' >
<% ClienteDB clienteDB = new ClienteDB();%>
<%= clienteDB.buscarInfoGeral(1)%>
</TEXTAREA>
</TD>
</TR>
<TR>
<TD valign=top>
<B><FONT color='#ffffff'>Idioma</FONT></B>
</TD>
<TD>
<INPUT type=RADIO name='idioma' value='1' checked><B><FONT color='#ffffff'>Portugu�s</FONT></B>
<INPUT type=RADIO name='idioma' value='2'><B><FONT color='#ffffff'>Espanhol</FONT></B>
<INPUT type=RADIO name='idioma' value='3'><B><FONT color='#ffffff'>Ingl�s</FONT></B>
</TD>
</TR>
<TR>
<TD>
</TD>
<TD align=center>
<INPUT type=SUBMIT name='Submit' value='Salvar'>
<INPUT type=RESET name='Limpar' value='Limpar'>
</TD>
</TR>
</TABLE> "
How can i do to, always that i choose a new "radio", the information on textarea change a the same time.
For example:
If i choose the "radio" portugu�s, the information that appear on textarea are some information in portuguese.
If i choose the "radio" espanhol, the information that appear on textarea are some information in spanish.
If i choose the "radio" ingl�s, the information that appear on textarea are some information in english.
Sorry hfs1981, but i just can see your reply at this moment.
If you may look my code again, i will put the hole code.
<%@page contentType="text/html"%>
<%@page import="db.ClienteDB"%>
<html>
<head><title>Home</title></head>
<body onload='document.infoGeral.infoGeral.focus()'>
<!--Inclus�o do cabe�alho-->
<%@include file='cabecalho.jsp'%>
<TABLE border='0'>
<TR>
<TD width='200' align=right>
<B><FONT size='5' color='#004080'>Home</FONT></B>
</TD>
<TD width='500' align=center>
<!--Inclus�o de uma mensagem caso ocorra algum erro-->
<FONT color='red'><%@include file='mensagem.jsp'%></FONT>
</TD>
</TR>
</TABLE>
<!--A��o para chamar a servlet espec�fica e verificar o usu�rio-->
<FORM action='Controla' method=POST name='infoGeral'>
<CENTER>
<TABLE border='0' bgcolor='#004080' style='border-style: double; border-color: #408080;'>
<TR>
<TD valign=top>
<B><FONT color='#ffffff'>Informa��es Gerais</FONT></B>
</TD>
<TD>
<TEXTAREA name='infoGeral' cols='30' rows='10' >
<% ClienteDB clienteDB = new ClienteDB();%>
<%= clienteDB.buscarInfoGeral(1)%>
</TEXTAREA>
</TD>
</TR>
<TR>
<TD valign=top>
<B><FONT color='#ffffff'>Idioma</FONT></B>
</TD>
<TD>
<INPUT type=RADIO name='idioma' value='1' checked><B><FONT color='#ffffff'>Portugu�s</FONT></B>
<INPUT type=RADIO name='idioma' value='2'><B><FONT color='#ffffff'>Espanhol</FONT></B>
<INPUT type=RADIO name='idioma' value='3'><B><FONT color='#ffffff'>Ingl�s</FONT></B>
</TD>
</TR>
<TR>
<TD>
</TD>
<TD align=center>
<INPUT type=SUBMIT name='Submit' value='Salvar'>
<INPUT type=RESET name='Limpar' value='Limpar'>
</TD>
</TR>
</TABLE>
Voltar
</CENTER>
<INPUT type=HIDDEN name='trans' value='HOME'>
</FORM>
</body>
</html>
This(<%= clienteDB.buscarInfoGeral(1)%> means that i will take the information in database and put it on the textarea.
Thanks in advance!!
Similar Messages
-
Using WEB Output HTML Gallery and uploading using ftp upload the HTML page views correctly but images only display the alt tag in the browser window?
After a little investigation, I discovered that PNGs also do not render correctly in IE7 in similar circumstances.
I ended up using Levels in Photoshop to bring the output blacks up to "5", saved the images as PNGs, modified the HTML from .jpg to .png, and that seems to have covered up the problem well enough.
By the way, I did confirm that IE8 beta 2 renders the images correctly.
Brian -
I've added the page numbers to my master pages. They are displaying on the pages but I have images on the individual pages that are covering the numbers. I understand I need to assign a higher layer to the object but I don't understand how to do that. Please help me? Please explain a simply clearly as possible, I've read other answers but still don't understand. Wish it was as simple as select object, right click, edit layer!
Many thanks!Layers panel;
Create new layer
Switch to Master page
Make sure new layer is on top in the Layers panel, if not drag the layer on top in the Layers panel.
Select (click once on) that top layer (pen symbol appears behind that layer in the Layer panel)
Now draw your page numbers etc on the Mastet page
From now on, select (click once on) any Layer in the Layers panel that is below the layer you used on your Master page items and create new objects in your document pages.
If you accidently created objects on a 'wrong' layer:
Select those objects
You will see a square behind the layers name in the Layers panel
Click and hold the mouse on that square and drag it behind the name of the layer you want to move the objects to.
Buy a book about InDesign and start learning these basic principles! -
Error when using PPR in the OA page developed.
HI,
We are encountering an error when using PPR for the custom OA page being developed. I am using JDeveloper version 9.0.3.5(Build 1437) and Oracle Applications version 11.5.10.CU2. The scenario we are using PPR and the steps to reproduce the issue is mentioned below,
Scenario:
1) PPR is enabled for a custom OA page that is developed.
2) The PPR is being used to enable or disable a particular field based on the
selection of a value in a poplist in the same OA Page.
Error replication steps:
1) The user enters a value in the primary mandatory field which has to have
unique value.
2) The user selects a value from the poplist of a field which has PPR associated.
3) The user enters data in all other mandatory fields in the OA page except one
and tries to save the form and is shown a error message saying that all
mandatory fields are not entered(This is correct). Now the page gets
automatically refreshed and so the entered values are wiped off.
4) Now if the user again enters a value in the primary mandatory field (as in
step1) and if that value happens to be already existing value and then select
a value from the poplist which has PPR enabled then immediately the error
"Please enter a unique value" is entered, though we did not save the record.
The unique record validation would happen only at the time of saving the
record as per out business logic.
5) But if in Step 4 if i had entered a unique value again then the above said error
does not happen. There are few more similar kind of issues happening in the
same page because PPR is enabled.
Please note that this issue happens only when the page is deployed in a oracle
applications instance and not in JDeveloper.
Would this issue because of some cacheing problem? If Yes then how do we resolve it? Or would it be some other problem caused by our internal coding.
Any inputs for resolving this issue would be highly appreciated.
Thanks, Raja.What works in Jdeveloper should work when deployed in iAS as well.
And PPR is an old feature given quite enough time to mature, so before we suspect OA we should investigate the code. What I do not understand is how the page refreshes in Step 3 and why does the user have to re-enter the fields just because he missed entering one mandatory field the last time.
Mandatory field validations are client validations set by making the fields 'Required'. You obviously have client validations turned off on your PPR, otherwise you would be stuck with a javascript popup on PPR. The only way you can get the "Please enter unique..." error on PPR is Server Validation. So where have you placed this validation? If it is not in the EO, is it in the AM? And are you unconditionally calling the AM validation method in your processFormRequest? The PPR will also go through processFormRequest so I hope the PPR event is in a different if-else block. -
when i log off my td bank secure account page with the td log off botton i get a new td page. if i press the back arrow on the address bar the secure page i just closed pops up. when i do the same witn onternet explorer a generic td bank page home page pops up NEVER an account page with secure info shown. when this happens every time i dont know if i have logged off the secure page. i close my online browser[now firefox] to be sure the connection is broken but is the secure page open to any kind of breach? i am using firefox due to concern about intternet explore but i know on explorer when i log off td bank secure page i was on i can not access that page again unlees i login ,on firefox i press back arrow on address bar and the secure page i logged off shows up.i feel this is an important issue and must be addressed. thank you
Hi grdy83,
What are your cookie settings?
*[[Enable and disable cookies that websites use to track your preferences]]
*[[Permissions Manager - Give certain websites the ability to store passwords, set cookies and more]]
You can delete all history when you exit Firefox, but it seems odd that a secure page that should expire is still accessible. It may be a timed expiration, but check the third party cookie settings to make sure it is not allowed to be saved.
I hope this helps prevent this from happening again. -
Error while using Objects in the plsql
Hello,
Need to use UDT inside the UDT in the package.
The Type objects definitions are :
CREATE OR REPLACE TYPE SHARE_OUTST_T
AS OBJECT
SHR_OUTST_AMT number
CREATE OR REPLACE TYPE SECURITY_T
AS OBJECT
VOTE_PER_SHR number
, CUSIP varchar2(12)
, EXCHANGE varchar2(10)
, IV_TYPE_CD varchar2(10)
, SEC_TICKER_SYMB varchar2(20)
CREATE OR REPLACE TYPE ALTERNATE_ID_T
AS OBJECT
( ALT_ID_TYPE varchar2(20)
CREATE OR REPLACE TYPE ISSUER_T
AS OBJECT
( ISSUER_ID varchar2(12)
CREATE OR REPLACE TYPE ISSUE_VERSION_T
AS OBJECT
SHARE_OUTST SHARE_OUTST_T
, SECURITY SECURITY_T
, ALTERNATE_ID ALTERNATE_ID_T
, ISSUER ISSUER_T
CREATE OR REPLACE TYPE ISSUE_VERSION_COL_T AS TABLE OF ISSUE_VERSION_T;
The package definition :
PROCEDURE get_all_issue_version_col
( pv_issue_version_col OUT NOCOPY issue_version_col_t
AS
CURSOR cur_issue_version
IS
SELECT
issue_version_t
so.shr_outst_amt
, s.vote_per_shr
, s.sec_cusip
, s.PRI_MKT_EXCH_CD
, s.IV_TYPE_CD
, s.SEC_TICKER_SYMB
, a.ALT_ID_TYPE
, i.ISSR_ID
FROM
share_outst so
, security s
, alternate_id a
, issuer i
WHERE
s.sec_key_id = so.SEC_KEY_ID
and s.SEC_KEY_ID = a.SEC_KEY_ID
and s.MSTR_ISSR_KEY_ID = i.ISSR_KEY_ID;
BEGIN
OPEN cur_issue_version ;
FETCH cur_issue_version BULK COLLECT INTO pv_issue_version_col ;
CLOSE cur_issue_version ;
END ;
I get the error :
PL/SQL : ORA_02315 : Incorrect number of arguements for default constructor.
Please help.Hi solsam,
change this,
PROCEDURE get_all_issue_version_col(pv_issue_version_col OUT NOCOPY issue_version_col_t) AS
CURSOR cur_issue_version Is
SELECT issue_version_t( SHARE_OUTST_T( so.shr_outst_amt)
, SECURITY_T( s.vote_per_shr
, s.sec_cusip
, s.PRI_MKT_EXCH_CD
, s.IV_TYPE_CD
, s.SEC_TICKER_SYMB )
, ALTERNATE_ID_T( a.ALT_ID_TYPE )
, ISSUER_T( i.ISSR_ID )
, ISSUE_MAINT_COMMENT_COL_T( m.im_key_id --> here the fields of your table
, m.im_ver_num
, m.comment_txt
, m.add_usr_id
, m.add_tmstmp
, m.upd_usr_id
, m.upd_tmstmp
, m.lock_level_num
, m.action ))
FROM share_outst so
, security s
, alternate_id a
, issuer i
, issue_maint_comment m --> here your table
WHERE s.sec_key_id = so.SEC_KEY_ID
and s.SEC_KEY_ID = a.SEC_KEY_ID
and s.MSTR_ISSR_KEY_ID = i.ISSR_KEY_ID
and --> define precidate here
BEGIN
OPEN cur_issue_version;
FETCH cur_issue_version BULK COLLECT
INTO pv_issue_version_col;
CLOSE cur_issue_version;
END;Regards,
Christian Balz -
Firefox used to distinctly highlight sites already visited when returning to a results page.
It also used to 'snap to' the area of the results page just visited.
This no longer seems to happen. Please avise''History not being saved was the solution to chrisjh's problem as solved by lynnebowes.''
There are a couple of reasons why one might not be able to distinguish between visited and unvisited links on a web page.
# History is not being preserved. ''(already covered)''
# Bad web site design.
'''History must be preserved'''
:In Firefox '''Tools > Options > Privacy''' picture of " [http://img232.imageshack.us/img232/4928/clearcachew.png Using and Preserving History Settings]"
'''Bad web site design and some solutions'''
:There is another reason why one might not be able to distinguish between visited and unvisited sites and that is bad web page design, and one which Mozilla designing web pages should not be guilty of because they build web browsers but how many people can quickly identify between read(visited) and unread(unvisited) pages on Mozilla's pages including this one.
Web browsers started with some things already in place; links were underlined no one had color monitors and the links were visible when printed. I guess you can tell by the off-color where links probably are. But what is more important is to be able to be able to '''distinguish visited''' from '''unvisited links''' so you don't keep reading the same old article each time, or so that you can find an article you've read before in either case visited links are an important identification in webpages. It's also important to be able to identify what the links are. You wouldn't want to go to one site that uses completely different colors or reversed the normal colors for links-- that would be very confusing.
Some important tools for users are being to styling off, or to choose the colors. It is a it easier when you have a toolbar button to switch things rather going into '''Tools > Options > General > Advanced''' and mess with colors there.
Another way is use a theme or a style to change the appearance ([http://www.csszengarden.com/ css Zen Garden]) of a specific website t0 something interesting but not necessarily for conveying information quickly.
Some notes and a style to help make '''support.mozilla.com''', '''google.com''' and some '''mozillazine.com''' pages more readable can be found at [http://userstyles.org/styles/16842 Red: Mark visited links as read on unruly domains - userstyles.org] -
I wish to create links from a list of headings that will take the reader to the paragraph in question on the same page. I cannot find that function in iWeb, but was able to do it on old web site builders.
Is there any trick to overcome this shortcoming of iWeb?Here's one way
http://alyeska.altervista.org/en/iWeb_Anchors.html
Here are others
http://discussions.apple.com/thread.jspa?messageID=6703523� -
My issues is with multiple websites. Buttons do not work, pages do not load completly or the graphics are not visible. I need to use another browser such as FIrefox or Chrome.
Please read this whole message before doing anything.
This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
Step 1
The purpose of this step is to determine whether the problem is localized to your user account.
Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
Test while logged in as Guest. Same problem?
After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
*Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
Step 2
The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you boot, and again when you log in.
Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
Safe mode is much slower to boot and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
Test while in safe mode. Same problem?
After testing, reboot as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2. -
In page forwarding can variables used for denoting the target pages??
Hi all,
I would like to know whether it is possible to use a variable as the value of "page" attribute of the "jsp:forward ".
I need something similar to this:
String var = request.getParameter("choice") + ".htm";
<jsp:forward page=var/>
regards
PurushothamThanq for that.
But I cannot use JSTL here.
You would be happy to know that my job was done.
This worked
<%
String var = request.getParameter("choice");
%>
<jsp:forward page="<%= choice %>" />
There were some typos earlier. An additional space was given between % and = .
Thank you once again for the reply. -
Please Help,
This is a topic I would really like to get to the bottom of.
We have InDesign CS3 templates for creating our reports.
These templates contain around 10 different master pages with grey placeholder image boxes and text boxes with dummy text.
When we copy pages from one ID document to another, all the master page objects that were originally assigned to the pages are re-applied!!
Resulting in lots of grey dummy boxes and text boxes re-appearing on top of the page items!!
It's so annoying because we always customise the pages once we've pulled down master pages to work on, so when we copy pages across to other documents we have to apply the blank master to be able to kick out all the master objects easily. Then we need to add the page numbers and footers back onto the blank master page.
My question is, is there a way to switch this off, so when I move or copy pages from one document to another, nothing happens relating to master page objects, the pages simply just copy across as they are?
Please help! If not I may have to ask an external developer to write a script to fix this, it drives 900 of us crazy!
thanks in advance for any help.
Or am I just being ridiculous and not actually realising you can switch this off, doh!
GJust a bit of further clarification on this issue (very few people really understand what's going on with master pages and overridden master page items):
When you override a master page item, the object is moved to a local page, but a connection is maintained with the original master page item. This a) allows for the override to be removed (and return the object to its original state). This also, b) allows for changes made to the original master page item (other than the changes made to the local item from the point that it was overridden) to effect the local item as well.
When the connection to the master page item cannot be maintained, the local item gets disconnected totally from the master page, and becomes a regular, run-of-the-mill page item.
In light of this, there's three ways you can end up with duplicate master items:
Reapplying a master page (or applying a new one). When you reapply a master, all overridden master page items get detached from the master, and the original mster page item appears again in its original state. Most of the time this produces unwanted duplication of objects. To fix up your page, you have two options: a) Delete the master page item, and b) copying the contents of the original to the new master page item. The disadvantage of "a" is that you end up with an item which is totally detached from the master, and changing the item on the master will have no effect on the local item. The disadavantage of "b" is that it's a lot of work...
Moving a page to a different document. When you move a page to a different document which has the same master as the one originally applied, the master in the new doc is applied, and the effects are identical to reapplying a master page (i.e. overridden objects are detached). If the applied master (i.e. a master with the same name) does not exist in the new doc, the master is transferred over to the new doc along with the page, and the connections to the master page are preserved (well, re-created actually...). The workarounds in case #1 apply here as well.
When page sides change in a document, the objects on the facing page appears.
What happens here is a bit confusing, but here's an approximate explanation:
When you apply a master to a page or spread in InDesign, what you are actually doing is applying an entire spread to an individual page. You can thing of a master spread as an overlay (or more precisely: underlay) on the page with a window cut out to the exact page dimensions.
When the page side changes that "window cut-out" shifts to show the master spread items which correspond to the position within the spread of your current page (i.e. recto or verso). All objects which exist outside the window shift out of view (but still exist!).
When an object is overridden, the position of the object is defined by its location on the local page, NOT its position on the master spread. When the page then changes sides, the object remains where it was on the page (even though the object it's connected to on the master spread moves out of the window of view). A corresponding object on the facing page of the master (if it exists) will then show in addition to the overridden one.
Now remember: contrary to the first two cases, both objects are based on master ones: one visible one and one invisible one.
Dealing with this third case requires much more care than the first two.
The obvious way to deal with this would be similar to the first two, but if you remove the local object and transfer the content to the new maste object, the invisible master object on the non-visible page was actually removed, so when the page sides change again, the object will now be connected to the now-invisible master page item, and the correct master page item will be gone!
The "correct" way to deal with this would be to transfer the content to the new master page item and remove overrides (not delete!) on the local item (which will make it disappear, because it moves back to the invisible page). Of course, when page sides change again, it becomes necessary to repeat the entire process.
If the local object gets deleted, then your master spread is missing objects with no visible indicator of the fact. This can lead to confusion when the document might be edited at some later point in time.
I believe that this complicated and un-intuitive behavior of master pages is part of the reason people tend to avoid using master page items. Documents tend to get messed up in really odd ways... It's a real shame, because extensive use of master page items has a lot of potential for streamlining workflows and saving an awful lot of time. This behavior really puts a damper on really using master pages as templates.
Getting master page items to work the way they "should" was a big part of what I was trying to accomplish with AutoFlow Pro... When the master page items are defined as such (i.e. given a unique name), AutoFlow Pro solves all three of the above issues by keeping overridden master page items connected to the master page items on the currently applied master (and when a new master is applied as well!).
(When I have a bit of spare time, I think I'll write this up on my blog with some visuals to make this easier to grasp...)
Harbs -
I am trying to print a 5 x7 catalog. When I print it out using doubled sided the inside pages are upside down. Is there a way to setup and print using a 5x7 format?
If your printer does duplex printing (i.e. you're not re-feeding the pages manually), there may be a setting in the print dialog. My Brother color laser has these option when I check the two-sided box. If you see something similar, test the various options & make a note of what works. It took me so many tries to figure out what they meant by long- or short-edge binding!
If you're using something like CocoaBooklet or another program to create a booklet, see if it has an option to turn the second side upside down. -
When Safari is opened on my MacBook Pro, the arrow at the top left ( of the search bar where I type what web site I am searching) has been replaced by the sign + which I can click on to add a bookmark... How can I restore the arrow that I can use to access the previous page?
What should I should do?
Txraymond ==
Go up to the main Safari menu bar above, and select "View."
Then when that bar comes down, select "Customize Toolbar."
Then select the arrow icon, and just drag it into your toolbar. -
Use html code in web page composer 7.3
Hi all,
I have a question about the standard editors of web page composer in 7.3.
I want to create my own HTML code for the design of the portal page..
Is it possible to use the code through one of the standard editors?
At the moment I have created some html pages and store them in the KM content of the portal. Then I make this pages available with the KM Document iViews to use them in the Web Page Composer. The problem now is, that the links to other portal pages doesn't work..
So is there maybe a possibility to use the html code directly in one of the editors? Or do you know, how you have to define the links to navigate to other portal pages? I tried a href="TBN://..." like the links you get with the Link List Editor, but it doesn't work..
Thanks in advance for your help!
Regards,
LydiaHi,
now we have the tinyMCE editor, where you can insert and edit html-code. It works fine now for the layout,
but there are still a few problems with the links..
In the edit mode there are displayed all km images out of the km. But the images aren't displayed under the portal role, when i publish the page. And all the links like one to a wiki or the TBN links doesn't work, too.
Can anybody help me further?
Thanks in advance,
Lydia -
Hi,
I am making an ALV tree using objects and the code is crashing due to an error in the Screen 100 ( which I am using ). I tried to implement the example provided at http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm but that is not working.
Can anyone please tell me a working example or a brief tutorial so that I can correct the logical errors in my code.
Thanks,
GauravHi,
Check whether u have uncommented the PAI and PBO modules.
Try this one.
REPORT ZZZTEST_3
NO STANDARD PAGE HEADING
MESSAGE-ID zcs_cs_001.
1/ Report Name: ZZZ_ALV_TREE_DEMO
The definition and implementation of the event reciever class
include <icon>.
Predefine a local class for event handling to allow the
declaration of a reference variable before the class is defined.
class lcl_event_receiver definition deferred.
data :
Alv Containers
tree definition
o_tree type ref to cl_gui_simple_tree,
Event Handler
o_eventreceiver type ref to lcl_event_receiver,
o_dockingcontainer TYPE REF TO cl_gui_docking_container.
data :
node structures for tree building
i_nodes type table of abdemonode, " node table def create bespoke
w_nodes like line of i_nodes, " work area
i_tree_event type cntl_simple_events, " Itab for Tree Events
w_tree_event type cntl_simple_event. " Work area for Tree Events
data:
v_ratio1 type i, "docking container screen area
container screen area
v_action(12) type c.
Internal Tables Used for Object ALV Display.
data:
i_toolbar type table of stb_button, "Tool bar for Grid1
i_exclude1 type ui_functions,
i_exclude2 type ui_functions,
i_groups type lvc_t_sgrp, " Group Definitions
i_selected_rows type lvc_t_row. " Select row type
constants: c_x(1) type c value 'X', "Checked
c_a(1) type c value 'A'. "All Layouts
CLASS lcl_event_receiver DEFINITION
class lcl_event_receiver definition.
event receiver definitions for ALV actions
public section.
class-methods:
Status bar
handle_user_command
for event user_command of cl_gui_alv_grid
importing e_ucomm,
Tree Actions
handle_node_double_click
for event node_double_click of cl_gui_simple_tree
importing node_key,
Row Double click for dirll down.
handle_double_click
for event double_click of cl_gui_alv_grid
importing e_row
e_column
es_row_no.
endclass.
Implementation
Every event handler that is specified below should also be set after
the object has been created. This is done in the PBO processing.
with the following command
SET HANDLER oEventreceiver->handle_toolbar FOR o_Alvgrid.
class lcl_event_receiver implementation.
method handle_user_command.
In event handler method for event USER_COMMAND: Query your
function codes defined in step 2 and react accordingly.
endmethod.
*& Method handle_double_click
This method is called when the user double clicks on a line to drill
down.
The following are exported from the ALV
LVC_S_ROW
LVC_S_COL
LVC_S_ROID
method handle_double_click.
The double click drill down processing should be
coded in the form below.
endmethod.
*& Method handle_node_double_click
This method handles the node double click event of the tree
LVC_S_ROW
LVC_S_COL
LVC_S_ROID
method handle_node_double_click.
perform f9903_handle_node_double_click using node_key.
endmethod.
endclass.
INITIALIZATION
INITIALIZATION.
PERFORM f050_initialize_values.
FORM f050_initialize_values.
v_ratio1 = 30. "tree size
ENDFORM. " f050_initialize_values
START-OF-SELECTION
START-OF-SELECTION.
END-OF-SELECTION
END-OF-SELECTION.
CALL SCREEN 9001.
*Data Selection
FORM f9000_objects_create USING value(pobject)
pparent
value(pratio)
value(prows)
value(pcolumns).
CASE pobject.
WHEN 'o_dockingcontainer'.
IF o_dockingcontainer IS INITIAL.
CREATE OBJECT o_dockingcontainer
EXPORTING
side = v_dock_side1
ratio = pratio "amount of screen
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
PERFORM f9800_error_handle USING text-e06.
ENDIF.
WHEN 'o_tree'.
IF o_tree IS INITIAL.
CREATE OBJECT o_tree
EXPORTING
LIFETIME =
parent = pparent
SHELLSTYLE =
node_selection_mode = o_tree->node_sel_mode_single
HIDE_SELECTION =
name = 'Transactions'
EXCEPTIONS
lifetime_error = 1
cntl_system_error = 2
create_error = 3
failed = 4
illegal_node_selection_mode = 5
others = 6.
PERFORM f9800_error_handle USING text-e06.
ENDIF.
WHEN 'o_eventreceiver'.
IF o_eventreceiver IS INITIAL.
CREATE OBJECT o_eventreceiver.
PERFORM f9800_error_handle USING text-e08.
ENDIF.
WHEN OTHERS.
do nothing
ENDCASE.
ENDFORM. " f9000_objects_create
*& Form f9100_create_tree
Create the Tree
-->P_O_TREE tree data
FORM f9100_create_tree USING p_o_tree TYPE REF TO cl_gui_simple_tree.
REFRESH: i_nodes.
CLEAR: w_nodes.
Header Tree Folder
w_nodes-node_key = 'ROOT'.
w_nodes-isfolder = c_x.
w_nodes-expander = c_x.
w_nodes-text = 'Transactions'.
APPEND w_nodes TO i_nodes.
Adding Root Nodes for the tree.
Key:
NODE_KEY, RELATKEY, RELATSHIP, HIDDEN, DISABLED, ISFOLDER, N_IMAGE,
EXP_IMAGE, STYLE, LAST_HITEM, NO_BRANCH, EXPANDER, DRAGDROPID, TEXT
PERFORM f9101_node_list USING: '1' 'ROOT' '' '' '' c_x '' '' '' '' ''
c_x '' 'Sales Orders'.
Adding subitems for the root node.
PERFORM f9101_node_list USING:
Material Details
'VA01' '1' '' '' '' '' '@15@' '' '' '' '' ''
'' 'Create Sales Orders',
Document Details
'VA02' '1' '' '' '' '' '@15@' '' '' '' '' ''
'' 'Change Sales Orders'.
PERFORM f9101_node_list USING: '2' 'ROOT' '' '' '' c_x '' '' '' '' ''
c_x '' 'Deliveries'.
Adding subitems for the root node.
PERFORM f9101_node_list USING:
Material Details
'VL01' '2' '' '' '' '' '@15@' '' '' '' '' ''
'' 'Create Outbound Delivery',
Document Details
'VL02' '2' '' '' '' '' '@15@' '' '' '' '' ''
'' 'Change Outbound Delivery'.
add the nodes to the tree object,
PERFORM f9102_add_treenodes TABLES i_nodes
USING 'ABDEMONODE' "node definition
p_o_tree. "tree declaration
enabling event handlers for the tree
PERFORM f9103_tree_event_handle USING p_o_tree.
ENDFORM. " f9100_create_tree
*& Form f9101_node_list
Adding Nodes in a TREE
FORM f9101_node_list USING value(pnodekey)
value(prelatkey)
value(prelatship)
value(phidden)
value(pdisabled)
value(pisfolder)
value(pimage)
value(pexpimage)
value(pstyle)
value(plastitem)
value(pnobranch)
value(pexpander)
value(pdragdropid)
value(ptext).
w_nodes-node_key = pnodekey.
w_nodes-relatkey = prelatkey.
w_nodes-relatship = prelatship. "Natural number
w_nodes-hidden = phidden.
w_nodes-disabled = pdisabled.
w_nodes-isfolder = pisfolder.
w_nodes-n_image = pimage. "Icons / embedded bitmap
w_nodes-exp_image = pexpimage. "Icons / embedded bitmap
w_nodes-style = pstyle.
w_nodes-last_hitem = plastitem. "Tree Control: Column Name / Item
"Name
w_nodes-no_branch = pnobranch.
w_nodes-expander = pexpander.
w_nodes-dragdropid = pdragdropid.
w_nodes-text = ptext.
APPEND w_nodes TO i_nodes.
ENDFORM. " f9101_node_list
*& Form f9102_add_treenodes
Adding the Nodes to the Tree
-->PI_NODES Table containg the Nodes
-->PTABLE Name of the Table structure name
-->PO_TREE tree object
FORM f9102_add_treenodes TABLES pi_nodes TYPE STANDARD TABLE
USING value(ptable)
po_tree TYPE REF TO cl_gui_simple_tree.
CALL METHOD po_tree->add_nodes
EXPORTING
table_structure_name = ptable "may need to change
node_table = pi_nodes[]
EXCEPTIONS
error_in_node_table = 1
failed = 2
dp_error = 3
table_structure_name_not_found = 4
OTHERS = 5
PERFORM f9800_error_handle USING text-e10.
ENDFORM. " f9102_add_treenodes
*& Form f9103_tree_event_handle
Event Handling for Tree.
-->P_P_O_TREE text
FORM f9103_tree_event_handle USING
p_o_tree TYPE REF TO cl_gui_simple_tree.
w_tree_event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
w_tree_event-appl_event = ' '. " process PAI if event occurs
APPEND w_tree_event TO i_tree_event.
CALL METHOD p_o_tree->set_registered_events
EXPORTING
events = i_tree_event
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc <> 0.
MESSAGE A000.
ENDIF.
IF o_eventreceiver IS INITIAL.
CREATE OBJECT o_eventreceiver.
ENDIF.
SET HANDLER o_eventreceiver->handle_node_double_click FOR p_o_tree.
ENDFORM. " f9103_tree_event_handle
-->P_IEXCLUDE text
-->P_1150 text
FORM f9200_exclude_functions USING pexclude LIKE i_exclude1
value(pfunction).
DATA: l_exclude TYPE ui_func.
l_exclude = pfunction.
APPEND l_exclude TO pexclude.
ENDFORM. " f9200_exclude_functions
*& Form f9903_handle_node_double_click
This form is used to handle the double click event for the tree
-->P_NODE_KEY Node clicked.
FORM f9903_handle_node_double_click USING p_node_key.
CASE p_node_key.
WHEN 'VA01'.
SUBMIT ZZZ_TEST AND RETURN.
CALL TRANSACTION 'VA01'. " and skip first screen.
WHEN 'VA02'.
CALL TRANSACTION 'VA02'. " and skip first screen.
WHEN 'VL01'.
CALL TRANSACTION 'VL01'. " and skip first screen.
WHEN 'VL02'.
CALL TRANSACTION 'VL02'. " and skip first screen.
WHEN OTHERS.
do nothning.
ENDCASE.
ENDFORM. " f9903_handle_node_double_click
*& Form f9700_free_objects
This form handles the freeing of the following objects
ALV
Docking Container
-->P_O_ALVGRID text
-->P_0020 text
-->P_0021 text
FORM f9700_free_objects USING pobject
value(ptype)
value(ptext).
Need to type the field symbol or it does not work
CASE ptype.
WHEN 'DOCKING'.
DATA: l_odock TYPE REF TO cl_gui_docking_container.
l_odock = pobject.
IF NOT ( l_odock IS INITIAL ).
CALL METHOD l_odock->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, l_odock.
PERFORM f9800_error_handle USING ptext.
ENDIF.
WHEN 'TREE'.
DATA: l_otree TYPE REF TO cl_gui_simple_tree.
l_otree = pobject.
IF NOT ( l_otree IS INITIAL ).
CALL METHOD l_otree->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, l_otree.
PERFORM f9800_error_handle USING ptext.
ENDIF.
WHEN OTHERS.
do something.
ENDCASE.
ENDFORM. " f9700_free_objects
*& Form f9800_error_handle
Handles Errors
-->P_PTEXT text
FORM f9800_error_handle USING value(ptext).
IF sy-subrc NE 0.
add your handling, for example
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-e01
txt2 = sy-subrc
txt1 = ptext.
ENDIF.
ENDFORM. " f9800_error_handle
*PBO & PAI Modules
*& Module STATUS_9001 OUTPUT
text
module status_9001 output.
Set the Status Bar
set pf-status 'Z_STATUS'.
Set the Title
set titlebar 'Z_TITLE'.
perform f9000_objects_create using:
create docking container
'o_dockingcontainer' '' v_ratio1 '' '',
create a tree
'o_tree' o_dockingcontainer '' '' '',
Create the event reciever
'o_eventreceiver' '' '' '' ''.
Create the Tree View.
perform f9100_create_tree using o_tree.
endmodule. " STATUS_9001 OUTPUT
*& Module USER_COMMAND_9001 INPUT
text
module user_command_9001 input.
case sy-ucomm.
when 'EXIT' or 'CANC'.
perform f9700_free_objects using:
o_tree 'TREE' text-E03,
o_dockingcontainer 'DOCKING' text-E05,
o_eventreceiver 'EVENT' text-e09.
leave program.
leave. " to SCREEN 0.
when 'BACK'.
perform f9700_free_objects using:
o_tree 'TREE' text-E03,
o_dockingcontainer 'DOCKING' text-e05,
o_eventreceiver 'EVENT' text-E09.
set screen '0'.
leave screen.
when others.
endcase.
endmodule. " USER_COMMAND_9001 INPUT
Get back to me if u have any queries. Give me ur mail id, i will send one more sample code for ALV tree. This sample program will display only Tree not grid u can add ALV grid too.
Thanks & Regards,
Judith.
Maybe you are looking for
-
Is there a modified version of Lightroom that will run on a tablet?
What can I take when traveling to download and review images that would be smaller than a laptop?
-
L2TP / PPP & peer refused to authenticate
Hi Having some trouble with a basic L2TP VPN setup in Xserve 10.6.1 (kerberos auth). From what I've read in the meantime, it seems to indicate that OSX Server is asking for client authentication, that isn't given by the device? (using iPhone 3.0.1 an
-
How does the sleep alarm work?
I've been trying to figure out how to use the sleep alarm for quite some time now. Basically, will the alarm go off if I turn off the ipod (holding down the play button? Or do I need to let the ipod sit for however long until it's supposed to go off?
-
How to export/import customization infromation from a java portlet?
I created a java portlet using the methods in oracle.portal.provider.v2.personalize and oracle.portal.provider.v2.preference packages as described in the document adding.customization.pdk.java.v2.html. I am using DBPreferenceStore instead of FilePref
-
Dimenticato Pass impostata su restrizioni
Ciao non riesco più ad usare Safari, Appstore itunes e la fotocamera!!! O_o molto probabilmente perche essendomi dimenticato la password, mi ha bloccato le app prima riportate!!! tanto da non avere neanche più le icone!!!! Aiutoooooooooo!!!!