Search Results

Search found 99 results on 4 pages for 'a4j'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Calling another a4j:jsFunction in an a4j:jsFunction oncomplete event

    - by user339637
    Hi all , I define some java script function which will call the back-end functions using a4j:jsFunction.For example : <a4j:jsFunction name="function1" action="#{Bean1.action1}" oncomplete="function2();"/> <a4j:jsFunction name="function2" action="#{Bean1.action2}" oncomplete="SomeJSFunc2();"/> Then in the a4j:commandButton , I set the onclick property to call my defined function like it: <a4j:commandButton onclick="function1" oncomplete="SomeJSFunc3();"> When the a4j:commandButton is clicked , #{Bean1.action1} is run .After the #{Bean1.action1} returned , the oncomplete event of the (a4j:jsFunction name="function1") cannot invoke the "#{Bean1.action2}" .How can I solve this problem?

    Read the article

  • JSF a4j:commandButton not working when 'disabled' is set

    - by Jon
    Hello, When I include a 'disabled' attribute on an a4j:commandButton, the button's action is not performed. Taking the 'disabled' attribute out causes it to work properly. I am not doing any special validation (that I'm aware of) and am not seeing any validation error messages. Here is part of my page: <t:dataTable id="myTable" var="region" value="#{MyPageBackingBean.regions}" width="100%"> ... <a4j:commandButton value="Update" action="#{region.doUpdate}" oncomplete="alert('done');" disabled="#{!empty region && region.messageEmpty}" immediate="true"/> ... </t:dataTable> Any ideas? Thanks! Edit: I tried setting preserveDataModel="true" on the t:dataTable to no avail. I also made a test having an a4j:commandButton and text box with no data table, but the backing bean action is still not being fired: <h:form> <a4j:region> <a4j:outputPanel id="testregion"> <h:messages id="messages"/> <a4j:status> <f:facet name="start"> <h:graphicImage value="/images/progress_indicator.gif"/> </f:facet> </a4j:status> <h:inputTextarea rows="5" value="#{MyPageBackingBean.myValue}" style="width:100%; border: 1px solid #99CCFF;"> <a4j:support event="onkeyup" reRender="testregion" eventsQueue="messageModificationQueue" ignoreDupResponses="true" requestDelay="500"/> </h:inputTextarea> <a4j:commandButton id="doDelete" value="Delete" action="#{MyPageBackingBean.dummy}" reRender="testregion" disabled="#{empty MyPageBackingBean.myValue}"/> <h:outputText value="#{MyPageBackingBean.myValue}"/> </a4j:outputPanel> </a4j:region> </h:form> Here is the new backing bean code used for testing: private String m_myValue = null; public String getMyValue() { return m_myValue; } public void setMyValue(String value) { m_myValue = value; } private String mystr2 = null; public String dummy() { mystr2 = "hello"; return null; } Thanks!

    Read the article

  • a4j:support within a rich:modalPanel

    - by Andy Deighton
    Hi all, I've hit a wall. I know the a4j and rich tags pretty well (I use Seam 2.2.0 and Richfaces 3.3.1). However, I'm trying to do something quite simple, but in a rich:modalPanel. It seems that rich:modalPanels do not allow Ajax events to be fired. Here's a simple breakdown: I have a h:selectOneMenu with some items in it and whose value is attached to a backing bean. Attached to that h:selectOneMenu is a a4j:support tag so that whenever the change event is fired, the backing bean should get updated. Truly simple stuff eh? However, when this h:selectOneMenu is in a rich:modalPanel the onchange event doesn't update the backing bean until the rich:modalPanel closes. I can confirm this because I'm running it in Eclipse debug mode and I have a breakpoint on the setter of the property that's hooked up to the h:selectOneMenu. This is driving me mad! This is vanilla stuff for Ajax, but rich:modalPanels don't seem to allow it. So, the question is: can I do Ajax stuff within a rich:modalPanel? I'm basically trying to use the rich:modalPanel as a form (I've tried a4j:form and h:form to no avail) that reacts to changes to the drop down (e.g. when the user changes the drop down, a certain part of the form should get reRendered). Am I trying to do something that's not possible? Here's a simplified version of the modalPanel: <rich:modalPanel id="quickAddPanel"> <div> <a4j:form id="quickAddPaymentForm" ajaxSubmit="true"> <s:decorate id="paymentTypeDecorator"> <a4j:region> <h:selectOneMenu id="paymentType" required="true" value="#{backingBean.paymentType}" tabindex="1"> <s:selectItems label="#{type.description}" noSelectionLabel="Please select..." value="#{incomingPaymentTypes}" var="type"/> <s:convertEnum/> <a4j:support ajaxSingle="true" event="onchange" eventsQueue="paymentQueue" immediate="true" limitToList="true" reRender="paymentTypeDecorator, paymentDetailsOutputPanel, quickAddPaymentForm"/> </h:selectOneMenu> </a4j:region> </s:decorate> </fieldset> <fieldset class="standard-form"> <div class="form-title">Payment details</div> <a4j:outputPanel id="paymentDetailsOutputPanel"> <h:outputText value="This should change whenever dropdown changes: #{backingBean.paymentType}"/> </a4j:outputPanel> </fieldset> </a4j:form> </div> </rich:modalPanel> Regards, Andy

    Read the article

  • Conditionally required jsf validation in a4j form

    - by volothamp
    Hello, I'm having a little problem with using conditionally evaluated expression in jsf/a4j Here's my code <a4j:form> <h:inputText id="id1" value="#{mybean.myvalue}" size="1" required="#{not mybean.condition}" rendered="#{not mybean.condition}" requiredMessage="Put a number in here" /> <h:selectBooleanCheckbox value="#{mybean.condition}"> <a4j:support event="onclick" reRender="id1"/> </h:selectBooleanCheckbox> <a4j:commandButton action="#{mybean.myaction}" value="Do something" /> </a4j:form> The boolean checkbox conditionally enable/disable the validation. This doesn't work: the a4j:commandButton simply skip the validation. Thanks.

    Read the article

  • Richfaces a4j achtionparam set null value

    - by Jurgen H
    I am trying to reset some values in a form using the a4j:actionParam tag. But it seams that null values never arrive in the target bean. The converter receives it correctly, returns null, but it is never set in the bean. The target is to fill in the start and endDate for different predefined values (last week, last month etc). For the "This week" value, the endDate must be reset to null. <rich:menuItem value="Last week"> <a4j:support event="onclick" reRender="criteriaStartCalendar,criteriaEndCalendar"> <a4j:actionparam name="startDate" value="#{dateBean.lastWeekStart}" assignTo="#{targetBean.startDate}" /> <a4j:actionparam name="endDate" value="#{dateBean.lastWeekEnd}" assignTo="#{targetBean.endDate}" /> </a4j:support> </rich:menuItem>

    Read the article

  • Why does a subTable break a4j:commandLink's reRender?

    - by Tom
    Here is a minimal rich:dataTable example with an a4j:commandLink inside. When clicked, it sends an AJAX request to my bean and reRenders the dataTable. <rich:dataTable id="dataTable" value="#{carManager.all}" var="item"> <rich:column> <f:facet name="header">name</f:facet> <h:outputText value="#{item.name}" /> </rich:column> <rich:column> <f:facet name="header">action</f:facet> <a4j:commandLink reRender="dataTable" value="Delete" action="#{carForm.delete}"> <f:setPropertyActionListener value="#{item.id}" target="#{carForm.id}" /> <f:param name="from" value="list" /> </a4j:commandLink> </rich:column> </rich:dataTable> The exmaple obove works fine so far. But when I add a rich:subTable (grouping the cars by garage for example) to the table, reRendering fails... <rich:dataTable id="dataTable" value="#{garageManager.all}" var="garage"> <f:facet name="header"> <rich:columnGroup> <rich:column>name</rich:column> <rich:column>action</rich:column> </rich:columnGroup> </f:facet> <rich:column colspan="2"> <h:outputText value="#{garage.name}" /> </rich:column> <rich:subTable value="#{garage.cars}" var="car"> <rich:column><h:ouputText value="#{car.name}" /></rich:column> <rich:column> <a4j:commandLink reRender="dataTable" value="Delete" action="#{carForm.delete}"> <f:setPropertyActionListener value="#{item.id}" target="#{carForm.id}" /> <f:param name="from" value="list" /> </a4j:commandLink> </rich:column> </rich:column> </rich:dataTable> Now the rich:dataTable is not rerendered but the item gets deleted since the item does not show up after a manual page refresh. Why does subTable break support for reRender-ing here? Tanks Tom

    Read the article

  • JQuery, JSF and a4j:commandLink

    - by JQueryNeeded
    Hello ppl, I have a problem with using jQuery Dialog and Ajax submit in JSF. I have the following code for displaying Dialog windows: <script type="text/javascript"> jQuery(function(){ // Dialog jQuery('#dialog').dialog({ dialogClass: 'alert', autoOpen: false, width: 300, height: 150, modal: true, resizable: false, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { "Ok": function() { jQuery(this).dialog("close"); return true; }, "Cancel": function() { jQuery(this).dialog("close"); return false; } } }); // Dialog Link jQuery('#dialog_link').click(function(){ jQuery('#dialog').dialog('open'); return false; }) .hover( function() { jQuery(this).addClass('ui-hover-state'); }, function() { jQuery(this).removeClass('ui-hover-state'); } ); }); </script> It works as it should - it displays box when link is clicked. Now, I have something like this, for deleting something: <a4j:commandLink actionListener="#some.action" reRender="something" onclick="if(!jQuery('#dialog').dialog('open')){return false}" ok, this commandLink is rendered as follows: <a href="#" id="some:long:id:j_id338" name="formName:something:j_id338" onclick="if(!jQuery('#dialog').dialog('open')){return false};A4J.AJAX.Submit('something:something'); return false;" >drop</a> now, after displaying the dialog box, the A4j.AJAX.Submit(..) is executed, is there anyway, that I can for example, pass the whole A4J.AJAX.Submit(...) to "dialog" and execute it from "ok" option? I simply need to execute submit if and only if user clicks OK. Thank you for help JQ

    Read the article

  • Richfaces a4j:include loading two pages!?

    - by Jon
    I have this seemingly-innocent code on my main JSF page: <a4j:outputPanel id="sidebarContainer"> <a4j:include viewId="#{UserSession.currentSidebar}"/> </a4j:outputPanel> Here is how the sidebar changes: A jsFunction calls a backing-bean method which sets the page (like "sidebar2.jsp") in UserSession The jsFunction has "rerender='sidebarContainer'", so that the correct page is loaded in the sidebar When the web application is initially started in JBoss 5, when I call the jsFunction to change pages, sidebar2 appears, but the original sidebar (sidebar1.jsp) appears below it. The sidebar switching works just fine after this initial wierdness. Any thoughts??

    Read the article

  • Form value not passed to Seam bean after a4j reRender

    - by Casper
    I'm making a webapp in Seam but ran into a problem I can't seem to fix. I have a JSF form where the customer can select a reservation type through a combobox. Based on the selected value, other form components gets rendered. For example: the customer selects Hours as reservation type, a panelGroup gets rendered where the customer can select a start- and an end hour. But if the customer would select 'part of the day' as reservation type, a selectOneMenu gets rendered where the customer can select a part of the day (morning, afternoon, evening) The rerendering well but the values of the components with a rendered conditional won't get passed to the bean. They stay null values. This is the code i'm talking about: <h:panelGrid columns="2"> <h:outputText value="Reservation Type" /> <h:selectOneMenu value="#{selectedPeriodPart}"> <s:selectItems value="#{productManager.getAvailableDayPartsSpot()}" var="daypart" label="#{daypart.label}"></s:selectItems> <s:convertEnum /> <a4j:support ajaxSingle="true" event="onchange" action="#" reRender="spot"></a4j:support> </h:selectOneMenu> <h:outputText id="date_spot" value="Date" /> <a4j:outputPanel id="calendar_spot" layout="block"> <rich:calendar value="#{reservation.reservationPeriod.startDate}" locale="en" cellWidth="24px" cellHeight="22px" style="width:200px" /> </a4j:outputPanel> <h:outputText rendered="#{selectedPeriodPart eq 'DAY_PART'}" value="Daypart" /> <h:selectOneMenu value="#{selectedDaypart}" rendered="#{selectedPeriodPart eq 'DAY_PART'}"> <f:selectItem id="si_morning" itemLabel="Morning (6:00 - 12:00)" itemValue="morning" /> <f:selectItem id="si_afternoon" itemLabel="Afternoon (12:00 - 18:00)" itemValue="afternoon" /> <f:selectItem id="si_evening" itemLabel="Evening (18:00 - 00:00)" itemValue="evening" /> </h:selectOneMenu> <h:outputText rendered="#{selectedPeriodPart eq 'HOURS'}" value="Hours" /> <h:panelGroup id="hours_spot" rendered="#{selectedPeriodPart eq 'HOURS'}"> <ui:include src="/includes/reservation/select_hours.xhtml" /> </h:panelGroup> </h:panelGrid> </s:div></code> Note: The calendar value do get passed back to the bean but the value of this piece of code doesn't (it does if you remove the rendered conditional):

    Read the article

  • Get Ajax4JSF (a4j component) running on Glassfish

    - by yournamehere
    I'm trying to build an JEE6-application on Glassfish V3, using JSF 2.0, Weld, JPA2 and Maven. Now i'm having trouble getting a simple <a4j:support> running. This is the fragment of my little example. When typing something into the inputtext, the outputtext should automatically be updated. But nothing happens (not in Firefox, not in IE8). <ui:composition xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" (...)> <h:inputText value="#{personHome.message}"> <a4j:support event="onkeyup" reRender="repeater"/> </h:inputText> <h:outputText id="repeater" value="#{personHome.message}"/> Beside that my example doesn't work, my problem is also that i don't really understand if i need a JSF implementation (MyFaces, Richfaces, Primefaces etc.) or not to use a4j elements. Is it "built-in" in glassfish? Until now, i only have the following dependencies i think i need in for JSF: <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.0.2</version> </dependency> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.0.2</version> </dependency>I'm trying to build an JEE6-application on Glassfish V3, using JSF 2.0, Weld, JPA2 and Maven. <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> So... what do i have to do to get Ajax4JSF running on a simple JEE-App on Glassfish? Any help is highly appreciated!

    Read the article

  • Avoid richfaces to send back javascript libraries in the ajax responses

    - by pakore
    I'm using JSF 1.2 with Richfaces, and for every ajax request, the server is sending back the response, whichi is good, but it also contains all the links to the javascript files. I want to improve the performance so I just want the <body> to be returned, because all the javascript files are already loaded in the browser when the user logs in (my app is not restful). How can i do that? Thanks This is an example of a response to reRender an image when clicking a button. <?xml version="1.0"?> <html lang="nl_NL" xmlns="http://www.w3.org/1999/xhtml"><head><title></title><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" media="rich-extended-skinning" rel="stylesheet" type="text/css" /><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalcss/page.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.PrototypeScript.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.ImageCacheScript.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/browser_info.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/ajax4jsf/javascript/scripts/form.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/tabPanel.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalcss/tabPanel.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/jquery/jquery.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/jquery.utils.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/json/json-mini.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.DnDScript.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/utils.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/json/json-dom.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/dnd/dnd-common.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/form.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/script/controlUtils.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/common-scrollable-data-table.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/extended-data-table.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/drag-indicator.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/ext-dt-drag-indicator.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/ext-dt-simple-draggable.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/ext-dt-simple-dropzone.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/dragIndicator.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalcss/extendedDataTable.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/menu.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/context-menu.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/available.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/menu.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalcss/menucomponents.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/tooltip.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/tooltip.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/datascroller.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalcss/datascroller.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/modalPanel.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/modalPanelBorders.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/modalPanel.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/tiny_mce/tiny_mce_src.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/editor.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalcss/editor.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/events.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/scriptaculous/effects.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/JQuerySpinBtn.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/calendar.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalorg/richfaces/renderkit/html/css/calendar.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/panelbar.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalcss/panelbar.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/comboboxUtils.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/utils.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/inplaceinputstyles.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finalscripts/inplaceinput.js.xhtml" type="text/javascript"> </script><link class="component" href="/eyeprevent/a4j/s/3_3_3.Finalcss/inplaceinput.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.xhtml" rel="stylesheet" type="text/css" /><script src="/eyeprevent/a4j/g/3_3_3.Finalorg/richfaces/renderkit/html/scripts/skinning.js.xhtml" type="text/javascript"> </script><script src="/eyeprevent/a4j/g/3_3_3.Finaljquery.js.xhtml" type="text/javascript"> </script></head> <body> <img id="j_id305:supportImage" src="/eyeprevent/image/os-ir-central.jpg" width="50%" /> <meta name="Ajax-Update-Ids" content="j_id305:supportImage" /> <span id="ajax-view-state"><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id24" autocomplete="off" /> </span><meta id="Ajax-Response" name="Ajax-Response" content="true" /> <meta name="Ajax-Update-Ids" content="j_id305:supportImage" /> <span id="ajax-view-state"><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id24" autocomplete="off" /> </span><meta id="Ajax-Response" name="Ajax-Response" content="true" /> </body> </html> And this is the code that generated it: <!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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <ui:composition> <h:form> <h:panelGrid columns="1"> <a4j:region> <h:graphicImage id="supportImage" value="#{user.support.imagePath}" rendered="#{user.support.imageLoaded}" width="50%" /> </a4j:region> <h:panelGroup> <a4j:commandButton action="#{user.support.acceptImage}" value="YES" reRender="supportImage"/> <a4j:commandButton action="#{user.support.rejectImage}" value="NO" reRender="supportImage"/> </h:panelGroup> </h:panelGrid> </h:form> </ui:composition> </html>

    Read the article

  • Richfaces modal panel and a4j:keepAlive

    - by mykola
    Hello! I've got unexpected problems with richfaces (3.3.2) modal panel. When i try to open it, browser opens two panels instead of one: one is in the center, another is in the upper left corner. Besides, no fading happens. Also i have three modes: view, edit, new - and when i open my panel it should show either "Create new..." or "Edit..." in the header and actually it shows but not in the header as the latter isn't rendered at all though it should, because i set proper mode in action before opening this modal panel. Besides it works fine on all other pages i've made and there are tens of such pages in my application. I can't understand what's wrong here. The only way to fix it is to remove <a4j:keepAlive/> from the page that is very strange, imho. I'm not sure if code will be usefull here as it works fine everywhere in my application but this only case. So if you put it on your page it will probably work without problems. My only question is: are there any hidden or rare problems in interaction of these two elements (<rich:modalPanel> and <a4j:keepAlive>)? Or shall i spent another two or three days searching for some wrong comma, parenthesis or whatever in my code? :) For most curious. Panel itself: <!-- there's no outer form --> <rich:modalPanel id="panel" autosized="true" minWidth="300" minHeight="200"> <f:facet name="header"> <h:panelGroup id="panelHeader"> <h:outputText value="#{msg.new_smth}" rendered="#{MbSmth.newMode}"/> <h:outputText value="#{msg.edit_smth}" rendered="#{MbSmth.editMode}"/> </h:panelGroup> </f:facet> <h:panelGroup id="panelDiv"> <h:form > <!-- fields and buttons --> </h:form> </h:panelGroup> </rich:modalPanel> One of the buttons that open panel: <a4j:commandButton id="addBtn" reRender="panelHeader, panelDiv" value="#{form.add}" oncomplete="#{rich:component('panel')}.show()" action="#{MbSmth.add}" image="create.gif"/> Action invoked on button click: public void add() { curMode = NEW_MODE; // initial mode is VIEW_MODE newSmth = new Smth(); } Mode check: public boolean isNewMode() { return curMode == NEW_MODE; } public boolean isEditMode() { return curMode == EDIT_MODE; }

    Read the article

  • Using a4j:support 's onchange event with h:selectOneMenu

    - by user339637
    <h:selectOneMenu id="selectOneMenu" value="#{Bean1.val1}" > <f:selectItems value="#{Bean1.selectItems}"/> <a4j:support event="onchange" action="#{Bean1.onSelectOneMenuChange}" reRender="textbox1 , textbox2 , textbox3, textbox4" /> </h:selectOneMenu> <h:inputText id="textbox1" value="#{Bean1.textbox1}"> </h:inputText> <h:inputText id="textbox2" value="#{Bean1.textbox2}"> </h:inputText> <h:inputText id="textbox3" value="#{Bean1.textbox3}"> </h:inputText> <h:inputText id="textbox4" value="#{Bean1.textbox4}"> </h:inputText> Bean1.onSelectOneMenuChange() will change the value of Bean1.textbox1 , Bean1.textbox2,Bean1.textbox3 and Bean1.textbox4 depending on the value selected (Bean1.val1) .Sometimes , it will change all the textbox value and sometimes it will only changes some textbox value. When users change the value in the "selectOneMenu" drop down list control , the JSF framework will not call the update model values phase but call the Bean1.onSelectOneMenuChange() directly. After that , the all the textbox are reRender. Because the update model values phase is not called , the values entered by the user is never set the the Bean1 and the original value is shown in the textbox after reRender . So I want to ask: How can I manually call the update model values phase inside Bean1.onSelectOneMenuChange() ?How can I get the value input input by the users inside Bean1.onSelectOneMenuChange() and set it to the corresponding fields of the Bean1 ? 2.Another approach is that only reRender those textbox whose values are updated inside the Bean1.onSelectOneMenuChange() .However , there are many cases . For example , a value will change all the textbox value and a values may only change some textbox value.How can I reRender conditionally ? What method is more prefer for maintainability?

    Read the article

  • a4j:jsFunction with actionListener inside of h:dataTable

    - by JQueryNeeded
    Hello all, I'm having problem with using a4j:jsFunction with actionListener inside of h:dataTable, when I want to invoke an action over particular row with a4j:commandLink it works flawless but when I want to invoke the action with a4j:jsFunction & actionListener it's always invoked over the last element in dataTable Let me give you an example: <a4j:form ajaxSubmit="true" reRender="mainForm" id="mainForm"> <a4j:region> <t:saveState value="#{ts.list}" /> </a4j:region> <h:dataTable value="#{ts.list}" var="el" binding="#{ts.bind}"> <h:column>#{el}</h:column>> <h:column> <a4j:commandLink actionListener="#{ts.rem}"> <h:outputText value="delete by CMDLink" /> </a4j:commandLink> </h:column> <h:column> <a href="#" onclick="okClicked();">delete by okClicked</a> <a4j:jsFunction name="okClicked" actionListener="#{ts.rem}" /> </h:column> </h:dataTable> </a4j:form> now, the bean's code: package com.sth; import java.util.ArrayList; import java.util.List; import javax.faces.component.UIData; import javax.faces.event.ActionEvent; public class Ts { private List<String> list = new ArrayList<String>(); private UIData bind; public Ts(){ list.add("element1"); list.add("element2"); list.add("element3"); list.add("element4"); } public List<String> getList() { return list; } public void setList(List<String> list) { this.list = list; } public void rem(ActionEvent ae) { String toRem = (String) bind.getRowData(); System.out.println("Deleting " + toRem); list.remove(toRem); } public UIData getBind() { return bind; } public void setBind(UIData bind) { this.bind = bind; } } when I use a4j:commandLink to remove element, it works as its expected, but when I use a4j:jsFunction to invoke actionListener it invokes action against last element :( Any ideas? Cheers

    Read the article

  • RichFaces a4j:support parameter passing

    - by Mark Lewis
    Hello I have a number of rich:inplaceInput tags in RichFaces which represent numbers in an array. The validator allows integers only. When a user clicks in an input and changes a value, how can I get the bean to sort the array given the new number and reRender the list of rich:inplaceInput tags so that they're in numerical order? EG <a4j:region> <rich:dataTable value="#{MyBacking.config}" var="feed" cellpadding="0" cellspacing="0" width="100%" border="0" columns="5" id="Admin"> ... <a4j:repeat... <a4j:region id="MsgCon"> <rich:inplaceInput value="#{h.id}" validator="#{MyBacking.validateID}" id="andID" showControls="true"> <a4j:support event="onviewactivated" action="#{MyBacking.sort}" reRender="Admin" /> </rich:inplaceInput> </a4j:region> </a4j:repeat> </data:Table> </a4j:region> Note I do NOT want to use dataTable sort functions. The table is complicated and I've specified id="Admin" (ie the whole table) to reRender as I've not found a way to send more localised values to the backing bean through the inplaceInput. This question is about how to use a4j:support action attribute to call the sort method so that when the reRender rerenders the component, it outputs the list in sorted order. I have the sort method working ok when I click a button to sort, but I want to have the list sorted automatically as soon as a new valid value is entered into the inplaceInput component. Thanks

    Read the article

  • jsFunction pass data to backingbean

    - by deilig
    I have a javascript that is calling a function addData(param1,param2,param3,param4) which is calling addClip at the end And I need to pass those to a backing bean. <a4j:form> <a4j:jsFunction name="addClip" action="#{backingBean.goGo}"> <a4j:actionparam name="param1" assignTo="#{backingBean.param1}"/> </a4j:jsFunction> </a4j:form> But I can't seem to pass any values to the backingbean. I've even tried setting a static value for the actionparam. But when I try to do a Systemout on the setParam1 method it only prints out null. Have I missed anything important?

    Read the article

  • JSF - 2 a4j:actionParam in one commandlink bug

    - by Yurish
    Hi! I have such structure in my jsp: <h:commandLink action=#{docbean.save}> <a4j:actionParam value="bill_all" assignTo="#{billdoc.billType}"/> <a4j:actionParam value="bill_document" assignTo="#{docbean.doctype}"/> </h:commandLink> While debugging i saw, that billdoc.billtype and docbean.doctype have the same values: "bill_document". Is it bug? If not, then how can i put value to my managed-bean?

    Read the article

  • Does subTable support reRender?

    - by Tom
    Here is a minimal rich:dataTable with an a4j:commandLink inside. When clicked it sends an AJAX request to my bean and reRenders the dataTable. <rich:dataTable id="dataTable" value="#{carManager.all}" var="item"> <rich:column> <f:facet name="header">name</f:facet> <h:outputText value="#{item.name}" /> </rich:column> <rich:column> <f:facet name="header">action</f:facet> <a4j:commandLink reRender="dataTable" value="Delete" action="#{carForm.delete}"> <f:setPropertyActionListener value="#{item.id}" target="#{carForm.id}" /> <f:param name="from" value="list" /> </a4j:commandLink> </rich:column> </rich:dataTable> The exmaple obove works fine so far. But when I add a rich:subTable to the table, reRendering fails... <rich:dataTable id="dataTable" value="#{garageManager.all}" var="garage"> <f:facet name="header"> <rich:columnGroup> <rich:column>name</rich:column> <rich:column>action</rich:column> </rich:columnGroup> </f:facet> <rich:column colspan="2"> <h:outputText value="#{garage.name}" /> </rich:column> <rich:subTable value="#{garage.cars}" var="car"> <rich:column><h:ouputText value="#{car.name}" /></rich:column> <rich:column> <a4j:commandLink reRender="dataTable" value="Delete" action="#{carForm.delete}"> <f:setPropertyActionListener value="#{item.id}" target="#{carForm.id}" /> <f:param name="from" value="list" /> </a4j:commandLink> </rich:column> </rich:column> </rich:dataTable> Now the rich:dataTable is not rerendered but the item gets deleted since the item does not show up after a complete page refresh. Does subTable support reRender the way i'd like to use it here? Tanks Tom

    Read the article

  • Does a nested subTable break reRender?

    - by Tom
    Here is a minimal rich:dataTable with an a4j:commandLink inside. When clicked it sends an AJAX request to my bean and reRenders the dataTable. <rich:dataTable id="dataTable" value="#{carManager.all}" var="item"> <rich:column> <f:facet name="header">name</f:facet> <h:outputText value="#{item.name}" /> </rich:column> <rich:column> <f:facet name="header">action</f:facet> <a4j:commandLink reRender="dataTable" value="Delete" action="#{carForm.delete}"> <f:setPropertyActionListener value="#{item.id}" target="#{carForm.id}" /> <f:param name="from" value="list" /> </a4j:commandLink> </rich:column> </rich:dataTable> The exmaple obove works fine so far. But when I add a rich:subTable to the table, reRendering fails... <rich:dataTable id="dataTable" value="#{garageManager.all}" var="garage"> <f:facet name="header"> <rich:columnGroup> <rich:column>name</rich:column> <rich:column>action</rich:column> </rich:columnGroup> </f:facet> <rich:column colspan="2"> <h:outputText value="#{garage.name}" /> </rich:column> <rich:subTable value="#{garage.cars}" var="car"> <rich:column><h:ouputText value="#{car.name}" /></rich:column> <rich:column> <a4j:commandLink reRender="dataTable" value="Delete" action="#{carForm.delete}"> <f:setPropertyActionListener value="#{item.id}" target="#{carForm.id}" /> <f:param name="from" value="list" /> </a4j:commandLink> </rich:column> </rich:column> </rich:dataTable> Now the rich:dataTable is not rerendered but the item gets deleted since the item does not show up after a complete page refresh. Why does subTable break support for reRender-ing the way i'd like to use it here? Tanks Tom

    Read the article

  • Absolute reRendering using RichFaces

    - by wheelie
    Hey there, I am implementing copy/paste functionality for a complex object tree, this means you can copy an object and paste it where the object type is the same. Therefore I need to reRender the <a4j:commandLink>-s which are performing the paste action (so it will show on the GUI or not). Simplified example: Problem is that copy links are deep in the tree. How is it possible to reRender on a higher level in the component tree? (very)Simplified example: ... <h:form id="form1"> ... <a4j:commandLink value="Copy" reRender=":paste1, :paste2, :paste3" /> <a4j:commandLink id="paste1" value="Paste" rendered="#{myBean.myHashMap.key}" /> <a4j:outputPanel> <a4j:region renderRegionOnly="true"> <a4j:commandLink value="Copy" reRender=":paste1, :paste2, :paste3" /> <a4j:commandLink id="paste2" value="Paste" rendered="#{myBean.myHashMap.key}" /> </a4j:region> <a4j:outputPanel> <a4j:region renderRegionOnly="true"> <a4j:commandLink value="Copy" reRender=":paste1, :paste2, :paste3" /> <a4j:commandLink id="paste3" value="Paste" rendered="#{myBean.myHashMap.key}" /> </a4j:region> </a4j:outputPanel> </a4j:outputPanel> ... </h:form> Something like that. In practise this differs in that a rich:tree is displayed. Also, there can be multiple instances of the same paste link: object:0::paste3, object:1::paste3. private final String pasteIDs = ":xxPaste, ... , :xyPaste"; According to the RichFaces reference, putting the separator to the beginning of the ID means it is an "absolute" search expression, however this way i get the same result: only the 'local' paste link gets rerendered, the others not. Every copy-paste link pair is encapsulated in <a4j:region renderRegionOnly="true">, because it is necessary for other components to restrict the reRender to that region. Could this be blocking the reRender I want to make? Also I want to rerender exactly those paste links, so no other rerender action is triggered. Hope it is clear what i want to achieve. Any help would be appreciated! Daniel

    Read the article

  • Reference the oncomplete event by an external java script function

    - by user339637
    Hi , I want to do some logic at the oncomplete attribute of the a4j:commandButton ,but my logic is too complicated , can I reference the code using a java script functions located in a external java-script file to have a better maintenance ? I found it has error because the JavaScript file cannot understand the EL expression . For example , originally I have , <a4j:commandButton id="btn1" action="#{MBena1.action1}" oncomplete="if( {MBena1.variable1}){Richfaces.showModalPanel('modelPanel1');};if (......) then "> I want to do something like this: <a4j:commandButton action="#{MBena1.action1}" oncomplete="Btn1OnComplete();"> the code is put inside the java script function Btn1OnComplete() which is located in a external java-script file. Thanks

    Read the article

  • how to ignore the event onchange of a4j:support when clicking button

    - by bakkujp
    Hi All, I have a textbox like below <h:inputText value="#{bean.strQuantite}"> <a4j:support actionListener="#{tabacListCommandeAltadisDetailBean.actionListenerQuantity}" event="onchange" /> </h:inputText> I input some value into the textbox above and don't click outside the textbox yet. After that, I click a other button, then click event of button is not trigger. Instead of this, the event onchange of the inputtext above is trigger. I want to when clicking the button, the click event is trigged before. Can anyone help me to solve this problem ?

    Read the article

  • a4j:commandButton causes full page reload on IE7

    - by Greg Charles
    Our process allows users to activate their account, and then configure e-mail preferences. We're using the tag: <a4j:commandButton id="activate" action="#{controller.agreeAction}" image="/img/ok.png" styleClass="activate-button" reRender="mainContent, sideBar" oncomplete="showEmailDialog();" /> This works fine on Firefox, but on IE, the showEmaiDialog() fires off to display the new dialog, and then the full page reloads, which instantly hides it again. I put in numerous alert() calls to make sure of what was happening. I see the e-mail dialog until I clear the final alert box in in the showEmailDialog() script, and then I see the alerts that I put into jQuery(document).ready(). Why does IE do a full page reload instead of just refreshing the requested sections?

    Read the article

  • richfaces progressBar polling

    - by John
    Hi, I've got a progressBar component defined as the following on my webpage: <rich:modalPanel id="pb1Panel"> <rich:progressBar id="pb1" oncomplete="javascript:#{myBean.handleProgressEvent()} closeProgressModalPanel()" value="#{pb1Listener.percentageComplete}" label="#{pb1Listener.percentageComplete} %" minValue="1" maxValue="100" limitToList="true" timeout="3200" interval="1400" enabled="false"/> </rich:modalPanel> and a button: <a4j:commandButton id="actButton" value="action" action="#{myBean.performAction}" immediate="true" ajaxSingle="true" onclick="javascript:Richfaces.showModalPanel('pb1Panel');" reRender="pb1Panel"> <a4j:support event="onClick" value="#{rich:component('pb1')}.enable()" reRender="pb1" /> </a4j:commandButton> which doesn't work. However if I take out the .... enabled="false"/> .... from the progress bar, and the element from the button, everything seems to work just fine. Any suggestion why it's not working? I'm setting enabled="false" initially because I do not want the polling to start unless the button was clicked (to reduce unnecessary polling). The system is building on richfaces/seam. Thanks!

    Read the article

1 2 3 4  | Next Page >