Refreshing a UI field on Button click.
I have and input text and a search icon next to in on UI. On click on search icon I show a popup and on click of OK button on popup I set a value in pageFlowScope and tries to refresh input text. Input text value is same pageFlowScope variable so I was expecting it to show value in input text. But its not happening.
jsff code
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core">
<af:panelLabelAndMessage label="Label 1" id="plam1">
<af:inputText id="it1" value="#{pageFlowScope.pSecureByAdminRole}"/>
<f:facet name="end">
<af:commandImageLink id="cil1" icon="/adf/webcenter/find_ena.png" partialSubmit="true" actionListener="#{backingBeanScope.RelationshipBean.launchSearchRolePopup}" immediate="true"/>
</f:facet>
</af:panelLabelAndMessage>
<af:popup id="p1" binding="#{backingBeanScope.RelationshipBean.searchRolePopup}">
<af:dialog id="d1" type="none">
<f:facet name="buttonBar">
<af:commandButton text="Ok" id="cb1" actionListener="#{backingBeanScope.RelationshipBean.handleRoleSearchOK}" partialSubmit="true"/>
</f:facet>
</af:dialog>
</af:popup>
</jsp:root>
Bean code
public void launchSearchRolePopup(ActionEvent actionEvent) {
ADFUtils.showPopup(this.getSearchRolePopup(), null, null, null);
public void handleRoleSearchOK(ActionEvent actionEvent){
ADFUtils.getPageFlowScope().put("pSecureByAdminRole", "TEST");
this.getSearchRolePopup().hide();
ADFUtils.refreshUI(this.getSecureByAdminRoleOnNewDocument());
ADFUtil Code:
public static void showPopup(RichPopup popup,UIComponent alignComponent,RichPopup.PopupHints.AlignTypes alignType,RichPopup.PopupHints additionalHints ){
FacesContext context = FacesContext.getCurrentInstance();
if(additionalHints == null)
additionalHints = new RichPopup.PopupHints();
String alignId = null;
if(alignComponent != null){
alignId = alignComponent.getClientId(context);
additionalHints.add(RichPopup.PopupHints.HintTypes.HINT_ALIGN_ID, alignId);
if(alignType != null){
additionalHints.add(RichPopup.PopupHints.HintTypes.HINT_ALIGN, alignType);
popup.show(additionalHints);
public static void refreshUI(UIComponent uiComponent){
AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance();
adfctx.addPartialTarget(uiComponent);
Input text does not show new value (TEST). If I just click on browser refresh icon, it starts showing TEST. By that way it looks like refresh issue only.
I tried setting partial trigger of input-text to refer to OK button of popup but no success.
Thanks
Sanjeev.
I do have binding but some how I missed to that while posting in forum. Actuall jsff code is like
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core">
<af:panelLabelAndMessage label="Label 1" id="plam1">
<af:inputText id="it1" value="#{pageFlowScope.pSecureByAdminRole}" binding="#{backingBeanScope.RelationshipBean.secureByAdminRoleOnNewDocument}"/>
<f:facet name="end">
<af:commandImageLink id="cil1" icon="/adf/webcenter/find_ena.png" partialSubmit="true" actionListener="#{backingBeanScope.RelationshipBean.launchSearchRolePopup}" immediate="true"/>
</f:facet>
</af:panelLabelAndMessage>
<af:popup id="p1" binding="#{backingBeanScope.RelationshipBean.searchRolePopup}">
<af:dialog id="d1" type="none">
<f:facet name="buttonBar">
<af:commandButton text="Ok" id="cb1" actionListener="#{backingBeanScope.RelationshipBean.handleRoleSearchOK}" partialSubmit="true"/>
</f:facet>
</af:dialog>
</af:popup>
</jsp:root>
One strange thing I noticed is if I disable input component (disable = "true") , it starts refreshing it.
Any suggestions.
Thanks
Sanjeev
Similar Messages
-
Problem in refreshing JTree inside Jscrollpane on Button click
hi sir,
i have problem in refreshing JTree on Button click inside JscrollPane
Actually I am removing scrollPane from panel and then again creating tree inside scrollpane and adding it to Jpanel but the tree is not shown inside scrollpane. here is the dummy code.
please help me.
import javax.swing.*;
import java.awt.*;
import javax.swing.tree.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.WindowListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class Test
public static void main(String[] args)
JFrame jf=new TestTreeRefresh();
jf.addWindowListener( new
WindowAdapter()
public void windowClosing(WindowEvent e )
System.exit(0);
jf.setVisible(true);
class TestTreeRefresh extends JFrame
DefaultMutableTreeNode top;
JTree tree;
JScrollPane treeView;
JPanel jp=new JPanel();
JButton jb= new JButton("Refresh");
TestTreeRefresh()
setTitle("TestTree");
setSize(500,500);
getContentPane().setLayout(null);
jp.setBounds(new Rectangle(1,1,490,490));
jp.setLayout(null);
top =new DefaultMutableTreeNode("The Java Series");
createNodes(top);
tree = new JTree(top);
treeView = new JScrollPane(tree);
treeView.setBounds(new Rectangle(50,50,200,200));
jb.setBounds(new Rectangle(50,300,100,50));
jb.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
jp.remove(treeView);
top =new DefaultMutableTreeNode("The Java ");
createNodes(top);
tree = new JTree(top);
treeView = new JScrollPane(tree);
treeView.setBounds(new Rectangle(50,50,200,200));
jp.add(treeView);
jp.repaint();
jp.add(jb);
jp.add(treeView);
getContentPane().add(jp);
private void createNodes(DefaultMutableTreeNode top) {
DefaultMutableTreeNode category = null;
DefaultMutableTreeNode book = null;
category = new DefaultMutableTreeNode("Books for Java Programmers");
top.add(category);
book = new DefaultMutableTreeNode("The Java Tutorial: A Short Course on the Basics");
category.add(book);
book = new DefaultMutableTreeNode("The Java Tutorial Continued: The Rest of the JDK");
category.add(book);
book = new DefaultMutableTreeNode("The JFC Swing Tutorial: A Guide to Constructing GUIs");
category.add(book);
book = new DefaultMutableTreeNode("Effective Java Programming Language Guide");
category.add(book);
book = new DefaultMutableTreeNode("The Java Programming Language");
category.add(book);
book = new DefaultMutableTreeNode("The Java Developers Almanac");
category.add(book);
category = new DefaultMutableTreeNode("Books for Java Implementers");
top.add(category);
book = new DefaultMutableTreeNode("The Java Virtual Machine Specification");
category.add(book);
book = new DefaultMutableTreeNode("The Java Language Specification");
category.add(book);
}hi sir ,
thaks for u'r suggession.Its working fine but the
properties of the previous tree were not working
after setModel() property .like action at leaf node
is not working,I'm sorry but I don't understand. I think you are saying that the problem is solved but I can read it to mean that you still have a problem.
If you still have a problem then please post some code (using the [code] tags of course). -
Sharepoint 2010 Custom Visual Webpart button click event firing on page refresh
I have developed a Visual Webpart to create a list in SP using vs2010 and the button click event I have written the list create method. If I click the button list is created successfully. And I refresh the page again list is creating(Again button
click event is triggering).please help me to solve the issue.
protected void Button1_Click(object sender,
EventArgs e)
SPWeb web
= SPContext.Current.Web;
//SPList list=web.Lists["Auto"];
SPList list
= web.Lists[DropDownList2.SelectedItem.Text];
if
(string.IsNullOrEmpty(TextBox1.Text)
|| string.IsNullOrEmpty(DropDownList1.Text))
Label4.Text =
"Fields Are Empty";
else
if (DropDownList1.SelectedItem.Text
== "Single line of Text")
list.Fields.Add(TextBox1.Text,
SPFieldType.Text,
true);
SPView viewname = list.Views["All Items"];
viewname.ViewFields.Add(TextBox1.Text);
//viewname.Update();
list.Update();
Label4.Text =
"Field Created Successfully";
TextBox1.Text =
string.Empty;
// Label4.Text = string.Empty;Hi,
This is because the request is sent to the server when you refresh the page.
A workaround for this is that we can “provide a refresh link that redirects to the same page (or if you have some action causing the refresh programmatically, you could just
redirect to the page after that, with Response.Redirect)
so that page is requested by the browser (with GET method, default with hyperlinks)”.
More information:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/45648b39-1229-405c-ac9e-60eb82905982/click-event-getting-fired-on-page-refresh
Or we can use the Session to save a value which used as a flag for us to check whether it is a page refresh and perform accordingly.
http://www.codeproject.com/Articles/28099/Refresh-Page-Issue-in-ASP-Net
http://www.codeproject.com/Articles/10240/Detecting-Page-Refresh
Thanks
Patrick Liang
TechNet Community Support -
I want to refresh my jsf page on the click of command button.
Hi all,
i m using JDEV 11.1.2.1.0
i have created one jsf page with fragment i want to refresh my whole page on the click of command button which is present in fragment page.Besause i want to refresh some field but those are present in jsf page so i cant apply partial trigger because command button property in fragment page backing bean class and those attribute which i want to refresh its property in other class.
thanks.
Rafati didnt get you from your content so i go with subject for giving your answer
refreshing some of the fields
BindingContainer bindings = getBindings();
DCIteratorBinding dciter = (DCIteratorBinding)bindings.get("xIterator");
ViewObject vo = dciter.getViewObject();
Row row = vo.getCurrentRow();
vo.executeQuery();or else drop execute operation as button to execute vo.
to refresh a page
partial trigger nice options.
to performs instant refresh
af:poll component
so if you don mine give me some scenario using hrschema i may give a liitle try to my small brain :) -
Refresh Applet On Button Click
Hello everyone, I wanted to know what would be the easiest way to "reload" an Applet on a button click. I have a reset button in an actionPerformed method and I wanted to just run the constructor again for the applet if the reset button was pressed, or anther method. How can I run anther actionPerformed from within an actionPerformed?
Sorry a bit confused about this.If your applet is named "MyApplet" (via the <applet name=....> tag), from within Javascript, you can call
document.MyApplet.init() ; -
ALV: Right Button Click and Context Menu
Hi Experts,
I have to implement an ALV which should act on a right button click and show a context menu.
Is this possible? I found only events for "on_double_click" or "on_link_click" and is it possible to show a context menu?
Thanks in advanced.
Best regards,
MarkusHello Markus
The relevant events are:
CONTEXT_MENU_REQUEST
USER_COMMAND
Have a look at my sample report ZUS_SDN_ALV_CONTEXT_MENU_1.
*& Report ZUS_SDN_ALV_CONTEXT_MENU_1
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="910750"></a>
*& Thread: ALV: Right Button Click and Context Menu
*& Flow logic of screen 100 (no screen elements; ok_code = GD_OKCODE)
*& PROCESS BEFORE OUTPUT.
*& MODULE STATUS_0100.
*& PROCESS AFTER INPUT.
*& MODULE USER_COMMAND_0100.
REPORT zus_sdn_alv_context_menu_1.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_cell_top TYPE REF TO cl_gui_container,
go_cell_bottom TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
gs_layout TYPE lvc_s_layo.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_knvv TYPE STANDARD TABLE OF knvv.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender,
handle_context_menu_request FOR EVENT context_menu_request
OF cl_gui_alv_grid
IMPORTING
e_object
sender,
handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1.
CHECK ( sender = go_grid1 ).
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
ENDMETHOD. "handle_double_click
METHOD handle_context_menu_request.
* define local data
DATA: lt_fcodes TYPE ui_funcattr,
ls_fcode TYPE uiattentry,
ls_func TYPE ui_func,
lt_func TYPE ui_functions.
" Inactivate all standard functions
CALL METHOD e_object->get_functions
IMPORTING
fcodes = lt_fcodes.
LOOP AT lt_fcodes INTO ls_fcode.
ls_func = ls_fcode-fcode.
APPEND ls_func TO lt_func.
ENDLOOP.
e_object->disable_functions( lt_func ).
" Add new functions
e_object->add_separator( ).
CALL METHOD e_object->add_function
EXPORTING
fcode = 'XD03'
text = 'Call Transaction'.
CALL METHOD e_object->add_function
EXPORTING
fcode = 'DETAILS'
text = 'Display Details'.
ENDMETHOD. "handle_context_menu_request
METHOD handle_user_command.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_row TYPE lvc_s_row,
ls_col TYPE lvc_s_col.
" NOTE: in case of CL_GUI_ALV_GRID the functions of a context menu
" are handled in method USER_COMMAND.
CHECK ( e_ucomm = 'XD03' OR
e_ucomm = 'DETAILS' ).
CALL METHOD sender->get_current_cell
IMPORTING
es_row_id = ls_row
es_col_id = ls_col.
CASE e_ucomm.
WHEN 'XD03'.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ls_row-index.
SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN 'DETAILS'.
" NOTE: only for the sake of simplicity the event handler method
" is called
CALL METHOD lcl_eventhandler=>handle_double_click
EXPORTING
e_row = ls_row
sender = go_grid1.
WHEN OTHERS.
ENDCASE.
ENDMETHOD. "handle_user_command
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = '1000'.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 2
columns = 1
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_top.
CALL METHOD go_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = go_cell_bottom.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_top
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid1,
lcl_eventhandler=>handle_context_menu_request FOR go_grid1,
lcl_eventhandler=>handle_user_command FOR go_grid1.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_bottom
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Display data
gs_layout-grid_title = 'Customers'.
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNB1'
is_layout = gs_layout
CHANGING
it_outtab = gt_knb1
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
gs_layout-grid_title = 'Customers Details (Sales Areas)'.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'KNVV'
is_layout = gs_layout
CHANGING
it_outtab = gt_knvv " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Details"
WHEN 'DETAIL'.
PERFORM entry_show_details.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form ENTRY_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM entry_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM knvv INTO TABLE gt_knvv
WHERE kunnr = ls_knb1-kunnr.
ENDFORM. " ENTRY_SHOW_DETAILS
Regards
Uwe -
Call Web Dynpro application on a button Click.
Hi,
I have 2 web dynpro components.(COMP1 and COMP2). I wants to call the application of COMP2 from a button click from COMP1.
1. In COMP1 view i have a button. I have created an outbound plug 'TO_APP' with parameter 'URL' type string.
2. Inside the event handler method for the button i have written the code as given below.
data str_url type string.
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'COMP2_APP'
IMPORTING
out_absolute_url = str_url
wd_this->fire_to_app_plg(
url = str_url
When i click the button it wont navigate to COMP2. Is there any other step required ?
Please helps me to solve this issue...
Regards,
Shaira.Hi,
To call URL in same window first create an outbound plug in your current window(ex: EXIT_PLUG ),mark this
EXIT_PLUG as interface and plug type EXIT. Now use the following code in your button action.
data : lr_view_cont TYPE REF TO if_wd_view_controller.
data : lr_win_cont TYPE REF TO if_wd_window_controller.
data : lt_parameter_list type wdr_event_parameter_list.
data : ls_parameter type wdr_event_parameter.
data : lr_val type ref to data.
data : lr_comusg type ref to if_wd_component_usage.
field-SYMBOLS : <fs> type any.
lr_view_cont = wd_this->wd_get_api( ).
CALL METHOD LR_VIEW_CONT->GET_EMBEDDING_WINDOW_CTLR
RECEIVING
RESULT = lr_win_cont
ls_parameter-name = 'URL'.
create data lr_val type string.
assign lr_val->* to <fs>.
<fs> = 'HTTP://APPLICATION URL' . "PASS YOUR URL HERE
ls_parameter-value = lr_val.
insert ls_parameter into TABLE lt_parameter_list.
lr_win_cont->if_wd_view_controller~fire_plug(
exporting
plug_name = 'EXIT_PLUG'
parameters = lt_parameter_list ). -
Download the PDF Form as a attachment when button click in BSP application
Hi All,
I have scenario, when button click in the BSP application PDF Form want to download in the IE (like one window open with Open,Save and cancel button).
I have written this code:
data: pdf type fpformoutput-pdf.
< Logic for populate value to pdf field ....
.>
response->set_header_field(
name = 'cache-control'
value = 'max-age=0' ).
response->set_header_field(
name = 'content-disposition'
value = 'attachment; filename=webforms.pdf' ).
response->set_data( data = pdf ).
Once button is clicked pop up is opened and closed automatically because of browser or adobe reader issue.
How can I resolve this problem ?
In the IE i need to change any settings ?
IE version = 7.0
Adobe reader = 9.0
I have tried in the same code with IE = 6.0 and adobe reader 8.1.2 its getting download the pdf form working fine.
The same think i want in IE 7.0 and adobe reader 9.0, what needs to be done ?
Regards,
Boopathi MHello Ravi,
Best would be to bind the dataSource of the InteractiveForm ui element to the parent node containing the table's data. Then specify a name of a template to be created in the templateSource and hit <enter>. Some popups later, the system will have created a template from the structure of the context. All you need to do now is to drag&drop the data structure inside the template designer to the template itself. This will result in a table. Save, activate and return the Web Dynpro view. Don't forget to unbind the pdfSource and enjoy.
Best regards,
Thomas -
How do you fire a button click event on apex page from fancybox iframe that was created by page
I am trying to fire off the button click event from fancybox iframe. The apex page has a button that launches a fancybox iframe which is loaded with an APEX form. On close of that fancy box, I am trying to fire a click event on the parent page which will refresh a div with html that is created with plsql. The button on the page works as expected when clicked from the page. It will show a debug alert message to prove it was called and then load the div with the correct data. I am unable to fire off this button click from the fancybox iframe when it closes.
A couple of points:
I using Plug-in: Execute PL/SQL Code and Return Content ("PLUGIN_MULEDEV.SERVER_REGION_REFRESH") to place the create fancybox statement. It is used to populate a div using plsql.
The name of the button on the main page is P2020_REFRESH_SECTION_BUILDER_BTN.
The click dynamic action on the button is calling the plugin to replace the html in the div.
The data in the form in the fancybox is being saved to the database. On close of the fancybox box I want to refresh the div so the new record is included in the div html.
Can anyone help. Here is the fancybox code:
function customProcessOnReadyState4(){
for (var i=0;i<11;i++){
$( "#tabs"+i ).tabs();
$("#createNewExerciseLink"+i).fancybox({
''width'' : ''60%'',
''height'' : ''70%'',
''autoScale'' : true,
''transitionIn'' : 200,
''transitionOut'' : 200,
''type'' : ''iframe'',
''onClosed'' : function() {
window.parent.$(''#P2020_REFRESH_SECTION_BUILDER_BTN'').click();
Here are the dynamic actions assigned to the button:
5 - Execute JavaScript Code
alert("Starting refresh");
10 - Execute PL/SQL Code and Return Content [Plug-in]
begin
SCTUI.create_sct_tabs2(:P2020_CREATE_SECTION_LOV, '1');
end;user setActionListener...
<af:setActionListener from="#{bindings.XXX.inputValue" to="#{backingbean.variable}"
<af:inputText value="#{bindings.Email.inputValue}"
label="#{bindings.Email.hints.label}"
binding="#{backingBeanScope.backing_ShuttlePage.it2}"
id="it2">
<f:validator binding="#{bindings.Email.validator}"/>
</af:inputText>
<af:commandButton text="commandButton 2"
binding="#{backingBeanScope.backing_ShuttlePage.cb2}"
id="cb2" action="passing">
<af:setActionListener from="#{bindings.Email.inputValue}"
to="#{processScope.detail}"/>
</af:commandButton>next jsf page:
<af:outputText value="#{processScope.detail}"
binding="#{backingBeanScope.backing_ProcessScope.ot1}"
id="ot1"/>setPropertyListener also should work
<af:setPropertyListener from="#{bindings.Email.inputValue}" to="#{processScope.detail}" type="action"/> -
On a button click need to load a select one menu
Hi,
1) I have a text field, one button and a select one menu.
2) Its actually a search option, user will enter some text inside text field and click button, then those data will be loaded to the select one menu.
3) Also i have some text fields with attribute required="true".
4) Actually this is an add/edit organization form.
5) User can create new organization or search and edit existing organization.
6) But now what is happening is search button is a command button, so when i click search button the validation of the text field is happening and no action is going to the backing bean.
7) So what i required is when i click on the search button, no validation should be called, but action need to go to the backing bean..
8) please provide me a solution.
9) please see the source code attached here
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Add/Edit Organization</title>
</head>
<body>
<f:view>
<jsp:include page="../header.jsp"></jsp:include>
<center><h:form id="organizationForm" style="height: 326px; ">
<table cellspacing="10">
<tr>
<td><h:panelGrid border="0" styleClass="number labelWidth"
columns="1">
<h:outputLabel value="Search"></h:outputLabel>
</h:panelGrid></td>
<td>
<table cellpadding="0" cellspacing="0">
<tr align="left">
<td>
<table cellpadding="0" cellspacing="0">
<tr>
<td align="left"><h:inputText id="searchTextId"
value="#{organizationJSFBean.searchText}"></h:inputText></td>
<td style="width: 5px;"></td>
<td><h:commandButton image="../icons/search_lens.png"
action="searchSuccess">
</h:commandButton></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><h:selectOneMenu id="loginNamesId"
value="#{organizationJSFBean.organization.organizationId }">
<f:selectItems
value="#{organizationJSFBean.searchedOrganizationNameItems}" />
<a4j:support event="onchange"
action="#{organizationJSFBean.handleSelection}"
reRender="organizationForm" />
</h:selectOneMenu></td>
</tr>
</table>
</td>
<td><h:message for="searchTextId" styleClass="errorLabel"></h:message></td>
</tr>
<tr>
<td><h:panelGrid border="0" styleClass="number labelWidth"
columns="1">
<h:outputLabel value="Name"></h:outputLabel>
</h:panelGrid></td>
<td><h:inputText id="nameId"
value="#{organizationJSFBean.organization.name}" required="true"
requiredMessage="#{errorMessageBean.cannotBeBlank}"></h:inputText></td>
<td><h:message for="nameId" styleClass="errorLabel"></h:message></td>
</tr>
<tr>
<td><h:panelGrid border="0" styleClass="number labelWidth"
columns="1">
<h:outputLabel value="Short Name"></h:outputLabel>
</h:panelGrid></td>
<td><h:inputText id="shortNameId"
value="#{organizationJSFBean.organization.shortName}"
required="true"
requiredMessage="#{errorMessageBean.cannotBeBlank }"></h:inputText></td>
<td><h:message for="shortNameId" styleClass="errorLabel"></h:message></td>
</tr>
<tr>
<td><h:panelGrid border="0" styleClass="number labelWidth"
columns="1">
<h:outputLabel value="Website"></h:outputLabel>
</h:panelGrid></td>
<td><h:inputText id="websiteId"
value="#{organizationJSFBean.organization.website}" required="true"
requiredMessage="#{errorMessageBean.cannotBeBlank }"></h:inputText></td>
<td><h:message for="websiteId" styleClass="errorLabel"></h:message></td>
</tr>
<tr>
<td><h:panelGrid border="0" styleClass="number labelWidth"
columns="1">
<h:outputLabel value="Status"></h:outputLabel>
</h:panelGrid></td>
<td><h:selectOneMenu id="statusId"
value="#{organizationJSFBean.organization.status}">
<f:selectItems value="#{organizationJSFBean.searchedStatusItems}" />
</h:selectOneMenu></td>
<td><h:message for="statusId" styleClass="errorLabel"></h:message></td>
</tr>
</table>
<h:panelGrid border="0" columns="2">
<h:commandButton value="Save"
action="#{organizationJSFBean.saveOrganization}"
style="width: 78px; "></h:commandButton>
<h:commandButton value="Cancel" style="width: 78px; " action="cancel"
immediate="true"></h:commandButton>
</h:panelGrid>
</h:form></center>
</f:view>
</body>
</html>8) please provide me a solution.Put immediate="true" on the button in question, like you did on the cancel button.
The next time you post code, put it between { code } tags to make it not only more readable, but the forum won't try to interpret the special characters. -
How to generate barcode on button click event in PDF using adobe livecycle?
I already created form in PDF file which is validate completely .But , I required generate a barcode of all field of form using custom script on button click event.
Please give me right way for doing it .
Thanks in Advance,
Jaydeep Solanki.Hi vijay,
What project are you doing? Is it Asp.Net project? If so, you'll need to post it in the dedicated ASP.Net Forum
http://forums.asp.net for more efficient responses, where you can contact ASP.NET experts.
Have a nice day!
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Opening new window on button click from pdf without loosing session
Hi,
In my Java web applicaion on click of a link, we are opening a new window in which we are displaying a pdf. There are 5 buttons on this pdf.
On clicking of this button again we are opening a application link in new window. But in this window we are not gettting our session, which is there in first two window.
For opening new window from pdf button click we are using
var dynamicUrl3 = myappurl;
app.launchURL(dynamicUrl, true);
How can i open new window with the same sesion from the pdf button.
Please help for the same.
Thanks,
Abhijit Mohite.Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
Its working fine now without JavaScript.
Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
Is this possible? Please give me an idea to do this.
Thanks. -
links.xml contains links for page1, page2
links.xml
|
+-- page1.xml
|
+-- page2.xml
I try:
<mx:Button click="loadXML2({ getField( XML(
linksItems.currentItem ), how1Link ) });" label="Link" />
Debugger says:
Error: Repeater is not executing.
at mx.core::Repeater/get currentItem()
at LinkFromXML2/___LinkButton1_click()
<!-- File: links.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<item>
<dc:title>Page 1</dc:title>
<dc:link>page1.xml</dc:link>
</item>
<item>
<dc:title>Page 2</dc:title>
<dc:link>page2.xml</dc:link>
</item>
</rdf:RDF>
<!-- File: page1.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<dc:Work>
<dc:title>Page 1</dc:title>
</dc:Work>
</rdf:RDF>
<!-- File: page2.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<dc:Work>
<dc:title>Page 2</dc:title>
</dc:Work>
</rdf:RDF>
<!-- File: LinkFromXML.mxml -->
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="loadXML('links.xml');">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
public var pathxml:String;
public var pathxml2:String;
private var how:Namespace = new Namespace("
http://web.resource.org/cc/");
private var dc:Namespace = new Namespace("
http://purl.org/dc/elements/1.1/");
[Bindable]
private var how1Title:QName = new QName(dc, "title");
[Bindable]
private var how1Link:QName = new QName(dc, "link");
[Bindable]
private var how2Title:QName = new QName(dc, "title");
[Bindable]
private var how1externalXML:XMLListCollection;
[Bindable]
private var how2externalXML:XMLListCollection;
private function loadXML(pathxml):void {
trace (pathxml);
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(pathxml);
loader.load(request);
loader.addEventListener(Event.COMPLETE, onComplete);
private function loadXML2(pathxml2):void {
var loader2:URLLoader = new URLLoader();
var request2:URLRequest = new URLRequest(pathxml2);
loader2.load(request2);
loader2.addEventListener(Event.COMPLETE, onComplete2);
private function onComplete(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
var how1Items:QName = new QName(how, "item");
var dataXML:XML = XML( loader.data );
dataXML.addNamespace( dc );
var how1base:XMLList = dataXML.descendants( how1Items
how1externalXML = new XMLListCollection( how1base );
private function onComplete2(event:Event):void {
var loader2:URLLoader =
URLLoader(event.target);
var how2Items:QName = new QName(dc, "Work");
var dataXML:XML = XML( loader2.data );
dataXML.addNamespace( dc );
var how2base:XMLList = dataXML.descendants( how2Items
how2externalXML = new XMLListCollection( how2base );
private function getField( itemXML:XML,
field:QName):String {
return itemXML.descendants( field ).toString();
]]>
</mx:Script>
<mx:Canvas id="HowView" backgroundColor="#FFFFCC"
label="How"
width="100%" height="100%">
<mx:HBox width="100%" height="100%">
<mx:VDividedBox width="400" height="100%" id="how1Box"
backgroundColor="#B9C5A0">
<mx:Repeater width="80%" id="linksItems"
dataProvider="{ how1externalXML }">
<mx:VBox width="80%" horizontalAlign="center"
creationCompleteEffect="Fade">
<mx:LinkButton click="loadXML2('{getField( XML(
linksItems.currentItem ), how1Link )}')" label="{ getField( XML(
linksItems.currentItem ), how1Title) }" />
</mx:VBox>
</mx:Repeater>
</mx:VDividedBox>
<mx:VDividedBox width="100%" height="100%" id="how2Box"
backgroundColor="#6BA1A3">
<mx:Repeater width="100%" id="workItems"
dataProvider="{ how2externalXML }">
<mx:VBox width="534" horizontalAlign="center"
creationCompleteEffect="Fade">
<mx:Label text="{ getField( XML(
workItems.currentItem ), how2Title) }" color="#000000"/>
</mx:VBox>
</mx:Repeater>
</mx:VDividedBox>
</mx:HBox>
</mx:Canvas>
</mx:Application>"Cole_62" <[email protected]> wrote in
message
news:gd2q5r$f08$[email protected]..
> no i dont think this will work because i need to iterate
through each
> <item> in
> the XML...below is an exmaple of possible tree structure
of the XML:
> channel
> -->item1
> ----->title
> ----->imgs
> --------->imgUrl
> --------->imgUrl
> -->item2
> ----->title
> ----->imgs
> ---------->imgUrl
> -->item3
> ------>title
> ------>imgs
> ----------->(no imgs)
>
> i thought to handle this using something like the
ATTACHED CODE below:
>
> ...i need to be able to go through each <item> and
<imgUrl> (because i
> dont
> know how many (if any) there are!) sorry if my PHP
background shines
> through!
>
> THANKS!
>
> <mx:Repeater id="feed"
dataProvider="{XML.channel.item}">
> <mx:HBox>
> <mx:Text text="{feed.currentItem.title}"/>
> <mx:Repeater id="item"
dataProvider="{feed.currentItem.imgs}">
> <!-- PSEUDO CODE I NEED HELP RESOLVING:
> if ("{item.currentItem.imgURL}")
> -->
> <mx:Image source="{item.currentItem.imgUrl}"/>
> </mx:Repeater>
> </mx:HBox>
> </mx:Repeater>
How bout
<mx:Repeater id="feed"
dataProvider="{XML.channel.item}">
<mx:HBox>
<mx:Text text="{feed.currentItem.title}"/>
<mx:Repeater id="item"
dataProvider="{feed.currentItem.imgs}">
<mx:Image
source="{item.currentItem.imgURL.length()>0?item.currentItem.imgURL:null}"
includeInLayout="{item.currentItem.imgURL.length()>0}"/>
</mx:Repeater>
</mx:HBox>
</mx:Repeater> -
How to submit data from multiple Input Ports in single SUBMIT button click
Hi,
I am in SPS8.
What exactly steps I need to perform to submit data from multiple Input Ports.
I couldn't able to submit One input Form and one Input Table to BAPI data service in single SUBMIT button click.
I debugged the VC application in SPS8.
While debugging, I found that when I click the SUBMIT button in the Input Form, Only data in that Input
form are being passed to the BAPI, But not the Table Form data.
If I click on the SUBMIT button in another Input Table, Only data from that table is being passed to the BAPI, but not the Input form data.
Essentially I need to submit both of them in one SUBMIT button.
Thanks,
RamakrishnaRamakrishna,
From the word document that you sent to me the steps you are missing to map the appropriate information into the BAPI is first you are not mapping all data rows into the table input port. To do this double click on the input table view and change your selection mode from single to multiple. Then when you click on your link between the BAPI and your input table you will see a new option appears under data mapping "Mapping Scope" select All Data Rows.
That's the first part of the problem to get the BAPI to recognize both the inputs coming from the form and the table eliminate the submit button from the form. Drag and drop a link from the output port of the table view to the Input port of the BAPI. Double click on the link between the BAPI and the table view and open the expressions editor for the two fields:
1/ Automatic Source
2/ SKIP_ITEMS_WITH_ERROR
On the hierarchical folder structure on the right expand expand the Data Fields node to find the fields from the form and map them accordingly.
Now when you hit the submit button on your table it should pass the BAPI all the parameters from both the form and the table.
Hope this helps,
Cheers,
Scott -
My EPCM eventing code does not work completely. I have been able to get an event handler to populate an SAP InputField but I cannot get the event handler to execute a click() on a SAP Button in the same iView. I'm using the following code:
EPCM.subscribeEvent("urn:PPM.SAPIntegration.Events", "GetSapEquipment", GetSapEquipment);
function GetSapEquipment(eventObj)
var equipDesc = eventObj.dataObject;
<%= Form.ID + "." + txtDescription.ClientID %>.value = equipDesc;
<%= Form.ID + "." + btnGetEquipment.ClientID %>.click();
The button works if it is pressed manually. It calls my .NET function btnGetEquipment_Action. I see examples of this type of event handlers so I am confused why my code does not work.I also ran the PDK example that uses a search field and button to make a google.com
search. That example works. In my case, I'm trying to execute my button code that resides
in my portal component on the server. Therefore my button has the runat=server
option. When the SAP button is pressed, the portal component should be called so
that this c# procedure gets executed:
private void btnGetEquipment_Action(object sender, SAP.Web.UI.Controls.AbstractButton.ActionEventArgs e)
Again I say that if I press the button manually, it works.
Maybe you are looking for
-
I exported a SD video (about an hour and 20 minutes) from Final Cut Pro as a self-contained QT movie and imported it into iDVD. It took 1.5-2 hrs to compress and encode in iDVD. I tried it on 2 dvd players and it would play a little and pause on its
-
How to recover TNSNAMES.ORA file
Hi, im using Oracle 8i 8.16 database running on win2k server. Im getting a an error whenever i try to connect to the databese using the DBA Studio program - the error was "ORA-12154:TNS:Could Not resolve service name". I noticed that the TNSNAMES.ORA
-
Does shared photo stream pictures use up memory?
I am wondering if when you share an album or set of pictures with someone else, does it take up storage on their phone?
-
The documentation for Oracle Applications 11i says that you should never update tables in the database directly with SQL, instead you should use the 11i interface or errors can occur. Is this always true? I want to make bulk modifications that should
-
LabWindows/CVI and IMAQ - Invalid Image Type when saving bitmap
I create and image, grab it, then display it, but when I go to save it using imaqWriteBMPFile, I get an error that maps to Invalid Image Type, so I use imaqCast to cast it to an IMAQ_IMAGE_U8 type (which is what the orignal image was created as), the