Creation of satic and dynamic buttons in a view
Hi,
I have created a dynamic button using the code..
DATA: lr_container TYPE REF TO cl_wd_uielement_container,
lr_button TYPE REF TO cl_wd_button.
CHECK first_time = abap_true.
lr_container ?= view->get_element( id = 'ROOTUIELEMENTCONTAINER' ).
cl_wd_matrix_layout=>new_matrix_layout( container = lr_container ).
lr_button = cl_wd_button=>new_button( id = 'BUTTON'
text = 'My Button'
on_action = 'ACTION' ).
cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_button ).
lr_container->add_child( the_child = lr_button ).
its working fine and iam able to see the button .....but when i create another button thorugh layout design its going for dump....whats the reason .?
Cant we create static and dynamic buttons at a time?
Thanks,.
Shailaja Ainala.
Hi Shailaja,
Yes you can add static and dynamic ui elements together in the same view.
The possible problem here could be the way in which the ui elements are added.
You have created the dynamic button under the root container uielement.
What about you static button ? Check your layout and layout data property.
Thank You,
Radhika.
Similar Messages
-
Expand and collapse button in maintenance view
hi all,
i want help for functionality of expand and collapse buttons present there in maintenance view. delimit button is also there what is the functionality for these buttons.
u ppl can see these buttons while enetering values in standarad maintenance view V_T510
my requirement is to create same buttons and their working in user defined maintenance view.Hi Chavi,
check the PDF document
Module Poolo tuorials
regs,
Hema sundar. -
Remove group tree and parameter button from crystal view in iView
Hi
I have a crystal report which renders in an iView on the SAP portal. When a user views the report, in the viewer I see the group tree button and the parameter button. Is there a way to disable the group tree button and parameter button ?
Thanks,
DanielHi Udi,
I have a page within it I have a Composite view (SearchPage) and an iview (MyIview1). I have passed a URL to the iview (MyIview1).
In searchpage i have a variable @Address which is selected from a dropdown box. On click of a button i need to pass the variable @Address to the iview (MyIview1). which should be appended to the URL that i pass to MyIview1.
If i use URL action it opens as popup, and shows the desired result. But, I want it to open within the iview (myiview1).
Please let me know how else do i pass the variable from composite view to the url iview within the same page as ="www.abcd.com?address="&@Address does not open the url in the iview.
Thanks and Regards... Vibha -
Creation of Copy and insert in Table
Hi guys,
I am new to Web Dynpro.I have created one table from SAP by calling of RFC Adaptive method. Now i want to create copy the table single or multiple rows and paste in same table.
Could anyone please send me that exact documentation for creation of copy and paste button.
Regards
Velu.Hi Kulanthaivelu,
There is no such exact documentation. But you can implement that using the code. You have to keep few things in mind for this particular code:
1) There should be one empty row where you want to paste the selected row.
2) You cannot copy a selected row on a row already having some data. If you want to do that you have to modify the code.
3) This code is not for multiple copy & paste. For doing that you can modify the code.
<b>Steps for Copy:</b>
1) Create a button and create a action for that say Copy
2) Write this code for implementation of this function:
public void onActionCopy(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionCopy(ServerEvent)
int currentIndex = wdContext.node<having_the_attributes_for_column>().getLeadSelection();
IWDNodeElement ne1 = wdContext.node<having_the_attributes_for_column>().createElement();
WDCopyService.copyCorresponding(wdContext.node<having_the_attributes_for_column>().getElementAt(currentIndex),ne1);
ne = ne1;
//@@end
<b>Steps for Paste:</b>
1) Create a button and create a action for that say Paste.
2) Write this code for implementation of this function:
public void onActionPaste(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionPaste(ServerEvent)
int currentIndex = wdContext.node<having_the_attributes_for_column>().getLeadSelection();
IWDNodeElement tempElement = wdContext.node<having_the_attributes_for_column>().getElementAt(currentIndex);
if(!isRowBlank(tempElement)){
wdThis.wdGetAPI().getComponent().getMessageManager().reportException("You can paste elements only in a blank row");
else{
WDCopyService.copyCorresponding(ne,wdContext.node<having_the_attributes_for_column>().getElementAt(currentIndex));
//@@end
<b>isRowBlank Funtion:</b>
public boolean isRowBlank( com.sap.tc.webdynpro.progmodel.api.IWDNodeElement nodeElement ) {
//@@begin isRowBlank()
IWDNode node = nodeElement.node();
Iterator itr = node.getNodeInfo().iterateAttributes();
while(itr.hasNext()){
IWDAttributeInfo info = (IWDAttributeInfo)itr.next();
if(nodeElement.getAttributeValue(info.getName())!= null){
return false;
return true;
//@@end
I hope this helps you!!
Regards
Pravesh
PS: Please consider rewarding points for helpful answers. -
Dynamic Button creation and alignment on standard OIF toolbar
Hello Experts,
I'm using IF_FPM_CNR_OIF->define_button method to create buttons which i require on the application toolbar of OIF dynamically. I can observer that all the buttons which got created are aligned next to other where the grouping is left aligned.
Now my requirement is, i need to group few of the buttons as left aligned and few buttons right aligned (which means that few buttons are starting from the right end of the toolbar and few to be from the left side). Can any one advice on how to achieve this?
Thanks alot in advance,
Regards,
Ravi.Hi Julia,
Thanks alot for the reply.Currently the toolbar is configured in the configuration and i'm generating the buttons from the method. Is there any way possible in case i want to over write the toolbar from the configuration and create a static toolbar with necessary grouping? Please let me know in case there is any work around i can try.
Thanks again.
Regards,
Ravi. -
Dynamic Button Creation in list toolbar
Hi all,
I have a requirement to add dynamic button in list guibb.
I have a ovp floorplan in which I used tabbed uibb. In tabbed uibb I used list uibb.
Now I want dynamic button in list toolbar.
Please give some suggestion which help me in achieving this.
Thanks & Regards,
Jitendra SahuHi Julia,
Thanks alot for the reply.Currently the toolbar is configured in the configuration and i'm generating the buttons from the method. Is there any way possible in case i want to over write the toolbar from the configuration and create a static toolbar with necessary grouping? Please let me know in case there is any work around i can try.
Thanks again.
Regards,
Ravi. -
Creation and Visiblity of Buttons in a View
Hi,
I wish to create buttons in a view without the help of HTML coding.
I implemented the interface IF_BSP_WD_TOOLBAR_CALLBACK and using the methods of it I was able to display the buttons of the view.
But when I tried inserting the above view in a View Set or Over View page I am unable to see the buttons.
Is there any chance of displaying the buttons of the view while embeded in a over view page or over view set without the help of HTML Coding.
Hope I am clear on my question
Regards
Edited by: SAP LEARNER on Oct 13, 2011 11:30 AMArmin Reichert: see TJA311 WebDynpro Part 1 Unit 10, example optional 1 solution 6-3,6-4 -))
my new conclusion is that any UI elements should only be access in wdDoModifyView method
the javadoc discourage from using instance fields not static fields but recommends not to use UIs outside of the method:
Hook method called to modify a view just before rendering.
This method conceptually belongs to the view itself, not to the
controller (cf. MVC pattern).
It is made static to discourage a way of programming that
routinely stores references to UI elements in instance fields
for access by the view controller's event handlers, and so on.
The Web Dynpro programming model recommends that UI elements can
only be accessed by code executed within the call to this hook method. -
Cancel- and main-button dynamically generated using JSP-pages
Maybe a HOWTO for the Jdev-team.
HOWTO get rid of the delete and main-button in your jsp-pages?
Very simple!
Go to the container_bottom.jsp page in your webapp/jsp-folder and delete the code for the cancel-button => now the user can render his own buttons by using a header.html, contents.jsp and footer.html for the jsp-pages.We tried the same thing you are trying to do and got
very far, but it quickly became very complicated. We
realized it was just simpler to use the screenflow as
intended.
By this I mean, if your parent form has 4 buttons
(A,B, C and SUBMIT), you should design different
paths in your screen flow for each button. so when a
user clicks button A, the parent form submits back to
Fuego engine, engine looks at screenflow and send
them down the button A path to the Form A. When they
hit submit on Form A, screenflow goes back to parent
form.Hi, bcespinola:
Our team finally decide use jsp with YUI (Yahoo User Interface Library) to achieve this design. Wish this could help you. All popup window would be replaced by Dialog of YUI. Thanks for your help.
Vince -
Spry Tabbed panels + Progressive Enhancement and Dynamic Loading of Content With Spry
Is there any way to combine tabbed panels together with "Progressive Enhancement and Dynamic Loading of Content With Spry"?
Visit: http://labs.adobe.com/technologies/spry/articles/best_practices/progressive_enhancement.ht ml#updatecontent
And click on the "Using Spry.Utils.updateContent()"
The 3rd example shows how to use a fade transition whenever the content changes.
I already have tabbed panels. My menu contains buttons (on tabs) and my Content div contains the panels.
Tabs code;
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab">
<table class="Button" >
<tr>
<td style="padding-right:0px" title ="Home">
<a href="javascript:TabbedPanels1.showPanel(1);" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
</td>
</tr>
</table>
</li>
etc
etc
etc
and the panel code:
<div class="TabbedPanelsContent" id="Home">
CONTENT
</div>
I hoped i can use the example code from the link into my tabbed panels.
I thought this code:
onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;"
could be added to the tab code like this:
<a href="javascript:TabbedPanels1.showPanel(1);" onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
But the content doesnt fade...
I know i need to change the header etc.
The following is from the link:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aquo Events</title>
<script src="../../../includes/SpryEffects.js" type="text/javascript"></script>
<script src="../../../includes/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function FadeAndUpdateContent(ele, url)
try {
Spry.Effect.DoFade(ele,{ duration: 500, from: 100, to: 0, finish: function() {
Spry.Utils.updateContent(ele, url, function() {
Spry.Effect.DoFade(ele,{ duration: 500, from: 0, to: 100 });
}catch(e){ alert(e); }
-->
</script>
<style type="text/css">
/* IE HACK to prevent bad rendering when fading. */
#event { background-color: white; }
</style>
</head>
So i changed my header etc, put the SpryEffects.js and SpryData.js into position and nothing changed...
Is there a way to keep my tabbed panel (or change as less as possible) and let
A. The fade work
B. The loading work.
The problem now is that it loads all pages instead of only the home. Therefore i wanted this Progressive Enhancement.
And the fading part is just because its nice...It doesnt show in the post but off course i changed this link;
"data/AquoThonFrag.html"
into;
"javascript:TabbedPanels1.showPanel(1);"
I must say i dont know if this even works... -
How to realize Checkbox and Radio Buttons based on Attributes in JHeadstart
Hy@ all,
I try to redevelop the Summit Forms Demo in ADF.
The module "ORDER" contains, among other things, a checkbox and radio buttons based on database columns(VARCHAR2).
The column(checkbox) named PAYMENT_TYPE contains the values CASH and CREDIT and the column(radio button) called ORDER_FILLED contains the values Y and N.
After creating the business components, I set in JHeadstarts Application Definition the Display Type of these two attributes to checkBox and radio-horizontal.
I created a dymanic domain for the radio-horizontal and a static domain for the checkBox.
The radio-horizontal within the dymanic domain works nearly correct.
I set the Data Collection in this dynamic domain to the required Group and the Value and Meaning Attribute to the necessary Attribute.
Within the JSF- Page the values are shown right but unfortunately there are too many radio buttons available. Instead of displaying the two radio buttons CASH and CREDIT were many CASH and CREDIT radio buttons shown.
I can´t find any solution for this case.
The problem with the checkBox is that therfore a static domain is required but I want to show the value of the checkBox based on the described attribute, like the handling of the radio horizontal.
But I don´t know how to implement this, if it is possible.
I´m using JHeadstart v10.1.3.2 and I´m pleased about any reply or solution.
Best regards
ChrisChris,
If you run the application module tester, and query the view object usage underlying your dynamic domain, how many rows does it return? It should return only two rows, one for CASH and one for CREDIT. If more than two rows are returned, your query is wrong.
What is the problem with using a static domain for the checkbox?
Steven Davelaar,
JHeadstart Team. -
How to hide check-in, check-out and publish buttons
hi,
i am new here and hope someone can help me:
users of a community can edit some content items. they can open these items with this link (from administrators guide for al interaction publisher 6.5 p. 10-28):
</pcs:value>/published_tools/content_item.jsp?&view=submit&ciid=<pcs:value expr="pcs_id"></pcs:value>" target="_blank"></a>
the link works, users can edit the items.
problem is, that i do not want to show the "publish button" to the users. the content item should be published automaticaly after the user clicks on "save". i also do not want users to see the check-in, check-out and preview buttons. they should just open a content item (+ simultaneously check-out), edit it and save it (+ simultaneously check-in and publish and close the content editor).
i thought this can be done by the "view" parameter, but nothing happens if i use it. any ideas?
thx
volker
Edited by: vhspec on 03.06.2009 00:58Hi vhspec,
This is a common problem. A creative way to solve the problem is to point yourself to the description field of each input on a data entry template. When you have the need to make any dynamic changes to the entry templates simply drop some javascript into the description field of an input and write the appropriate javascript code to either hide buttons, change behaviour etc. When the data entry template is displayed to a user the javascript in the description field will be executed by the browsing. Fortunately publisher does not check the description fields or encode them so you can get away with a lot.
The only problem with this approach is while you are altering the UI the underlying data model will still allow users to publish. So if an unauthorised user saw fit, they could publish content.
Have you considered creating a workflow so that users in specific groups cannot publish? that way only a controller down the line would be able to approve and publish.
Edited by: user8023716 on Jun 9, 2009 2:55 AM -
Creation of internal table dynamically based on the Date Range entered
Hi SAPgurus,
I have been facing one issue i.e creation of internal table dynamically based on the date range entered in the selection screen. For example the date range I am giving as 06/2006 to 08/2006, it should display the Fieldcatelog dynamically, this part i have completed but the only issue I am facing is to populate the sales data into that fields.
Right now my program is displaying the ALV like this.
Ex:
<b>CSR District 06/2006 07/2006 08/2006 totals</b>
Shiva New York 10.00
Shiva new york 30.00
Shiva new york 40.00
but it should display like this
<b>CSR District 06/2006 07/2006 08/2006 totals</b>
Shiva New York 10.00 30.00 40.00
80.00
Please help me in this scenario, how to acheive like this..
Thanks & Regards,
Sivaram KandulaHi Sivaram,
I also got the same requirement . i saw rich and your code whatever you have uploaded.i have created dynamic internal table but i am facing the issue to populating the data to my dynamic internal table.
Sivaram, can you please explain your code after this.
*<dyn_table>
*tab_item.
LOOP AT tab_item.
ASSIGN COMPONENT 1 OF STRUCTURE <dyn_wa> TO <dyn_table>.
ASSIGN COMPONENT 2 OF STRUCTURE <dyn_wa> TO <dyn_table>.
* <dyn_wa> = tab_item-bztxt.
* <dyn_wa> = tab_item-total.
* APPEND <dyn_wa> TO <dyn_table>.
** <dyn_wa> = tab_item-total.
** ASSIGN tab_item-bezei TO <dyn_wa>.
* APPEND <dyn_table>.
ENDLOOP.
how you are puting the loop at tab_item. but tab_item is already commented.
can you send me the code after that.
i am sending some part of my code.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fCAT1
IMPORTING
ep_table = new_table.
ASSIGN new_table->* TO <dyn_table>.
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
select vbeln
fkart
vkorg
vtweg
fkdat
spart
fksto
from vbrk
client specified
into table gt_vbrk
where mandt = sy-mandt
and fkart in ('ZF5','ZFR')
and vkorg = '1100'
and vtweg = '20'
and fkdat in s_fkdat
and spart = '06'
and fksto = ' '.
if gt_vbrk[] is not initial.
select vbeln
fkimg
prsdt
netwr
matnr
arktx
werks
mwsbp
from vbrp
client specified
into table gt_vbrp
for all entries in gt_vbrk
where vbeln = gt_vbrk-vbeln
and werks in s_werks
and matnr in s_matnr.
endif.
select mnr ltx spras from t247
into table it_t247
where spras = 'E'.
data: lv_month1 type vbrp-prsdt,
name1(3) type c,
s_month type string,
s_month1 type string,
s_month2 type string.
* lv_netwr1 type vbrp-netwr,
* lv_mwsbp1 type vbrp-mwsbp.
loop at gt_vbrp into gs_vbrp.
gs_final2-matnr = gs_vbrp-matnr.
gs_final2-arktx = gs_vbrp-arktx.
gs_final2-fkimg = gs_vbrp-fkimg.
lv_month1 = gs_vbrp-prsdt.
read table it_t247 into wa_t247 with key mnr = lv_month1+4(2).
if sy-subrc eq 0.
name1 = wa_t247-ltx.
endif.
concatenate name1
lv_month1(4) into s_month SEPARATED BY '_' .
CONCATENATE S_MONTH 'QTY' INTO S_MONTH1 SEPARATED BY ''.
CONCATENATE S_MONTH 'VALUE' INTO S_MONTH2 SEPARATED BY ''.
gs_final2-month = s_month.
lv_netwr1 = gs_vbrp-netwr.
lv_mwsbp1 = gs_vbrp-mwsbp.
gs_final2-MONTH_QTY = S_MONTH1.
GS_FINAL2-MONTH_VAL = S_MONTH2.
gs_final2-value = lv_netwr1 + lv_mwsbp1.
append gs_final2 to gt_final2.
clear: gs_final2. "lv_name2.
endloop.
if gt_final2[] is not initial.
sort gt_final2 by matnr month ascending .
loop at gt_final2 into gs_final2.
gs_final2_01 = gs_final2.
collect gs_final2_01 into gt_final2_01.
endloop.
endif.
ENDIF..
Regards
Ankur -
How to disable Save and SaveAs Button in Adobe Reader ??
I am having Dynamic XML Form (XFA based) designed on LC Designer ES2
I Want to disable Save and SaveAs button whenever it would be opened in Adobe Reader only.
Other way around, i want to provide only facility to save form programmatically through Javascript to apply validation.
Plz help
Thnx in advance..!!I can apply folder level java script ...But How to handle this way on CLIENT SIDE..???
-
APEX:How to put dynamic buttons in a Report.
Hello all,
I am creating one application in which i want two buttons in every record. I can't put it manually because it should change according to records in a table So Can anyone tell me how to put dynamic buttons in a report.
Thanks & Regards,
Jiten PansaraHi Jiten,
you cannot create buttons in the report, but you can always create link columns with some css class to show it as button.
So in the both link column report attributes you will have class="button1" and class="button2"
And in dynamic actions you need to bind the events based on your link column's jquery selector like:
.button1
.button2Thanks -
Change Background in Menu Creation Encore CS4 and Photoshop
I am creating a menu using Encore and Photoshop. I Used the Encore Libray to create a blank background and also created a series of buttons adusting them in Photoshop CS4. However, when I try to change the background with a new jpg or psd file I open the picture in Photoshop but not as the new background layer I am trying to achieve. Can anyone tell me where I am going wrong?
Dear Bill,
Thank you for your prompt reply. However, I don't think I am explaining my problem correctly so if you have the patience I am sending you this little "Jing" movie which will show you my problem
http://www.screencast.com/t/YWI5MDcw
Regards
Stanley
Stanley Dalnekoff, President
HeritageVideo
70 Marvel Road
New Haven, CT 06515
Tel:203-397-0775-O
203-464-4975-C
www.heritagevideo.net
Date: Fri, 30 Jul 2010 12:39:20 -0600
From: [email protected]
To: [email protected]
Subject: Change Background in Menu Creation Encore CS4 and Photoshop
There should be no problem when adding the image of your choice, with Edit in Photoshop.
When you choose Edit in Photoshop, several things happen:
1.) a TMP PSD for that Menu is created.
2.) links are created between En and PS
3.) PS is launched, and that TMP PSD is then Opened in PS.
When one has edited that TMP PSD in PS, they must do a Save to allow those links back to En*.
If you are doing a Save_As, or Save_As_a_Copy, those links will NOT be followed, and the Menu will NOT update in En.
Good luck,
Hunt
I have encountered some instances, where a single Save does not follow those links. With experimentation, I have found that 3 Saves (Ctrl+S) will force those links to be followed, and the Menu updated in En. Not sure why this happens sometimes, but 3 seems to be the "magic number," at least for me.
>
Maybe you are looking for
-
Cannot copy file from backup DVD to HD folder
Whenever I finish a project, I had burn the various files (movie, text, pictures, pages, etc.) onto DVDs to free up hard disk space for present projects. Usually, I would use a disk image to burn those DVDs. Recently, I needed material from those DVD
-
Using the Window-Specific workarounds I'm able to disable KDE global shortcuts. For example, in Diablo 2, ALT-F2 does not bring up the run dialog. GREAT! My problem is that there are occasions that I want my full-screen wine application to loose fo
-
Can't print in color from iPhoto
When I try to print a photo from iPhoto, using my color printer, I get a black & white print (not even greyscale). I can print in color from other applications, just not from iPhoto (but I think I used to print in color from iPhoto). Any clues out th
-
Generating Print Preview of report in PDF
Hi all, I need to generate a print preivew of a report output in PDF. When the report is executed, it displays the output. On the status bar, there is a button. When the user clicks on this button, instead of downloading the report in PDF, the report
-
Hi , i have problem creating PO confirmations in SUS to SRM (6.0). i have a PO with 2 items (SUS and SRM) PO ->item1 ->item2 when i confirm a PO in SUS, a confirmation is sent via XI to SRM . but the confirmation is created with hierarchy in SRM and