Search Results

Search found 1116 results on 45 pages for 'jsf 2'.

Page 29/45 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • PPR in tr:selectOneChoice does not work

    - by Nhut Le
    Hi, I have a simple testing page that test my PPR on a selectOneChoice component. when select a value from selectOnechoice 1, the selected value will display on a output label and also reset the selected value and the other selectOneChoice. However, it prints the selected values to the label correctly but it can't set the selected value for the other selectOneChoice. and Here are my page and my value change event method. <tr:form id="nhutForm"> <tr:selectOneChoice id="one" value="#{nhutTestBean.one}" autoSubmit="true" immediate="true" valueChangeListener="#{nhutTestBean.onMyValueChanged}"> <tr:selectItem label="0" value="0"/> <tr:selectItem label="1" value="1"/> <tr:selectItem label="2" value="2"/> <tr:selectItem label="3" value="3"/> </tr:selectOneChoice> <tr:selectOneChoice id="two" value="#{nhutTestBean.two}" partialTriggers="one"> <f:selectItems value="#{nhutTestBean.myList}"/> </tr:selectOneChoice> <tr:outputText id="nhutTextBox" value="hello: #{nhutTestBean.output}" partialTriggers="one"/></tr:form> and my valueChangeEvent method: public void onMyValueChanged(ValueChangeEvent event) { this.setOutput((String)event.getNewValue()); this.setTwo((String)event.getNewValue()); } One thing I realize is that it calls my setTwo twice, the first the set the correct values, but the second time set it to null so that nothing would be selected for the two drop down box. please help. thank you so much.

    Read the article

  • creating dynamic rich:dropdownmenu

    - by santhana sankar
    MethodExpression methodExpression = application.getExpressionFactory().createMethodExpression( FacesContext.getCurrentInstance().getELContext(), "#{PrismBacking.onItemClick}", null, new Class[] { ActionEvent.class }); menuItem.setActionExpression(methodExpression); I created a dynamic drop down as above my creating action listener but the listener was not called. I included the method inside the getter of dropdown in backing bean. Do I have to configure the action listener in any of the config files. kindly help.

    Read the article

  • javascript function is not getting called onclick of hx:commant button

    - by Sunny Mate
    hi i have method called test() when iu click on the commandButton the method should get called but the method is not getting called my code is as follows method **function test() { alert('ss'); return "true"; }** and method calling is <hx:commandExButton type="submit" value="Search" styleClass="action2" id="searchButton" **onclick="return test();"** action="#{pc_WorkInProgressUserGrid.doSearchButtonAction}" immediate="true </hx:commandExButton> any suggestion would be helpful

    Read the article

  • rich:editor ruins html?

    - by Ben
    Hi, Strange behaviour. I use rich:editor with these attributes: (Irrelevant data removed) HtmlEditor editor = new HtmlEditor(); editor.setValueExpression("value", ve); editor.setTheme("advanced"); editor.setValueExpression("viewMode", viewModeValueExpression); panel.getChildren().add(editor); Now my problem is that whenever I load a ready-made html text such as this (In source mode): <html lang="en" xml:lang="en"> <head> <title>Done</title> </head> <body style="direction: ltr; font-size: medium; color: #0000FF;"> <p>When the menu loads, navigate to and open Image Editor.</p> </body> </html> Change to VisualMode and then back to SourceMode, I see that the editor removed all of my html data and now the source mode is this: <p>When the menu loads, navigate to and open Chul Muzal.</p> Anyone knows why this happens? Thanks!!

    Read the article

  • Can my Facelets converter depend on a `ui:repeat` loop var?

    - by harto
    The following doesn't work as I'd hoped: <ul> <ui:repeat var="i" value="#{fn:split('1,2,3,4', ',')}"> <li> <h:outputText value="1.2345"> <f:convertNumber minFractionDigits="#{i}" maxFractionDigits="#{i}" /> </h:outputText> </li> </ui:repeat> </ul> I was hoping to see: 1.2 1.23 1.234 1.2345 Instead I see: 1 1 1 1 What am I missing? My real use-case involves a RichFaces rich:dataTable component instead of a ui:repeat, but the gist is the same.

    Read the article

  • After rich:extendedDataTable sortby,otheractions are not getting executed

    - by kksachin
    My requirement is I have several tabs and one of the tabs uses rich:extendedDataTable. If sortby is clicked in the page where table is used and if I navigate to another page, it looks for the bean of the old page and throws an error saying that sortyBy of the column is undefined. For eg if iused sortBy on userId in tab1( where the table column must have had sortBy=#{data.userId}) and then i click on tab2 , it looks for the data.userId and thorws an error. I am using richfaces 3.2.2SR1 version. can you help me on this.

    Read the article

  • Hierarchical data table for JSF2 and RichFaces

    - by Iravanchi
    I'm using RichFaces on my JSF2 application, and I need a way to have something like a tree-column or tree-table. As far as I know, there's no support for such thing in RichFaces. Something's mentioned for RichFaces 4.0, but the priority of this in their plan isn't promising at all, and I don't think that it's going to be included in 4.0. I know there's a tree table available in IceFaces, but I'd rather not add another library to avoid conflicts and learning curve and ... So, I'm looking for the simplest way that I can achieve the same results with minimum efforts, maybe using sub-tables in RichFaces? Any ideas would be appreciated.

    Read the article

  • What is PrimeFaces p:editor based on?

    - by AlanObject
    I want to add some client-side functionality to the PrimeFaces p:editor, but for some reason I am not able to uncover what JavaScript client side code they used to build the component. Could anyone point me to that? P.S. two things I want to do is make the component resizable (PrimeFaces doesn't support that) and I want to add shortcut buttons to insert pre-programmed text. Any hints about how this will done will be appreciated.

    Read the article

  • How to access string[] in xhtml page

    - by Kalpana
    I am having a simple string array in my bean as public String[] colors = new String[]{"red", "blue", "green"}; and trying to display these colors from my xhtml as but I am getting a java.lang.NumberFormatException: For input string: "colors" java.lang.NumberFormatException: For input string: "colors" at java.lang.NumberFormatException.forInputString(NumberFormatException. java:48) at java.lang.Integer.parseInt(Integer.java:447) at java.lang.Integer.parseInt(Integer.java:497) at javax.el.ListELResolver.coerce(ListELResolver.java:166) at javax.el.ListELResolver.getValue(ListELResolver.java:51) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)

    Read the article

  • SelectOneMenu keeps resetting

    - by DD
    When I press refresh the selectOneMenu resets to the first item in the list even after I have selected the secondItem. This doesnt seem consistent with SelectOneRadio which maintains the selected item after I refresh. <ice:selectOneMenu id="test" > <f:selectItem itemLabel="test"/> <f:selectItem itemLabel="test2"/> </ice:selectOneMenu> Is there a way to keep the selected value after a refresh?

    Read the article

  • richfaces keepAlive not working

    - by Jurgen H
    I have a mediaOutput tag which, in its createContent attribute, requires the backing bean to be in a certain state. A list of values, which is filled in an init method, must be available. I therefore added a keepAlive tag for the whole backing bean. I now indeed see the backingBean in stead of some (richfaces) proxy bean, but the filled list is null again. How to make this possible? I checked that the init method was called and that the list is filled in in the init method. <a4j:keepAlive beanName="myBean" /> <a4j:mediaOutput createContent="#{myBean.writeChart}" ... /> The backing bean public class MyBean implements Serializable { public List list; public void init(ActionEvent event) { // call some resource to fill the list list = service.getItems(); } public void writeChart(final OutputStream out, final Object data) throws IOException { // list is null } // getters & setters }

    Read the article

  • Problem with richfaces ajax datatable + buttons

    - by Schyzotrop
    Hello i have another problem with RichFaces this is my application and it shows how i want it to work : http://www.screencast.com/users/Schyzotrop/folders/Jing/media/a299dc1e-7a10-440e-8c39-96b1ec6e85a4 this is video of some glitch that i can't solve http://screencast.com/t/MDFiMGMzY the problem is that when i am trying to press any buttons on others than 1st category it won't do anything IF 1st category has less rows than the one i am calling it from from 1st category it works always i am using follwoing code in jsp for collumns : <h:form id="categoryAttributeList"> <rich:panel> <f:facet name="header"> <h:outputText value="Category Attribute List" /> </f:facet> <rich:dataTable id="table" value="#{categoryAttributeBean.allCategoryAttribute}" var="cat" width="100%" rows="10" columnClasses="col1,col2,col2,col3"> <f:facet name="header"> <rich:columnGroup> <h:column>Name</h:column> <h:column>Description</h:column> <h:column>Category</h:column> <h:column>Actions</h:column> </rich:columnGroup> </f:facet> <rich:column filterMethod="#{categoryAttributeFilteringBean.filterNames}"> <f:facet name="header"> <h:inputText value="#{categoryAttributeFilteringBean.filterNameValue}" id="input"> <a4j:support event="onkeyup" reRender="table , ds" ignoreDupResponses="true" requestDelay="700" oncomplete="setCaretToEnd(event);" /> </h:inputText> </f:facet> <h:outputText value="#{cat.name}" /> </rich:column> <rich:column filterMethod="#{categoryAttributeFilteringBean.filterDescriptions}"> <f:facet name="header"> <h:inputText value="#{categoryAttributeFilteringBean.filterDescriptionValue}" id="input2"> <a4j:support event="onkeyup" reRender="table , ds" ignoreDupResponses="true" requestDelay="700" oncomplete="setCaretToEnd(event);" /> </h:inputText> </f:facet> <h:outputText value="#{cat.description}" /> </rich:column> <rich:column filterMethod="#{categoryAttributeFilteringBean.filterCategories}"> <f:facet name="header"> <h:selectOneMenu value="#{categoryAttributeFilteringBean.filterCategoryValue}"> <f:selectItems value="#{categoryAttributeFilteringBean.categories}" /> <a4j:support event="onchange" reRender="table, ds" /> </h:selectOneMenu> </f:facet> <h:outputText value="#{cat.categoryID.name}" /> </rich:column> <h:column> <a4j:commandButton value="Edit" reRender="pnl" action="#{categoryAttributeBean.editCategoryAttributeSetup}"> <a4j:actionparam name="categoryAttributeID" value="#{cat.categoryAttributeID}" assignTo="#{categoryAttributeBean.id}" /> <a4j:actionparam name="state" value="edit" /> <a4j:actionparam name="editId" value="#{cat.categoryAttributeID}" /> </a4j:commandButton> <a4j:commandButton reRender="categoryAttributeList" value="Delete" action="#{categoryAttributeBean.deleteCategoryAttribute}"> <a4j:actionparam name="categoryAttributeID" value="#{cat.categoryAttributeID}" assignTo="#{categoryAttributeBean.id}" /> </a4j:commandButton> </h:column> <f:facet name="footer"> <rich:datascroller id="ds" renderIfSinglePage="false"></rich:datascroller> </f:facet> </rich:dataTable> <rich:panel id="msg"> <h:messages errorStyle="color:red" infoStyle="color:green"></h:messages> </rich:panel> </rich:panel> </h:form> and here is code of my backing bean @EJB private CategoryBeanLocal categoryBean; private CategoryAttribute categoryAttribute = new CategoryAttribute(); private ArrayList<SelectItem> categories = new ArrayList<SelectItem>(); private int id; private int categoryid; // Actions public void newCategoryAttribute() { categoryAttribute.setCategoryID(categoryBean.findCategoryByID(categoryid)); categoryBean.addCategoryAttribute(categoryAttribute); FacesContext.getCurrentInstance().addMessage("newCategoryAttribute", new FacesMessage("CategoryAttribute " + categoryAttribute.getName() + " created.")); this.categoryAttribute = new CategoryAttribute(); } public void editCategoryAttributeSetup() { categoryAttribute = categoryBean.findCategoryAttributeByID(id); } public void editCategoryAttribute() { categoryAttribute.setCategoryID(categoryBean.findCategoryByID(categoryid)); categoryBean.updateCategoryAttribute(categoryAttribute); FacesContext.getCurrentInstance().addMessage("newCategoryAttribute", new FacesMessage("CategoryAttribute " + categoryAttribute.getName() + " edited.")); this.categoryAttribute = new CategoryAttribute(); } public void deleteCategoryAttribute() { categoryAttribute = categoryBean.findCategoryAttributeByID(id); categoryBean.removeCategoryAttribute(categoryAttribute); FacesContext.getCurrentInstance().addMessage("categoryAttributeList", new FacesMessage("CategoryAttribute " + categoryAttribute.getName() + " deleted.")); this.categoryAttribute = new CategoryAttribute(); } // Getters public CategoryAttribute getCategoryAttribute() { return categoryAttribute; } public List<CategoryAttribute> getAllCategoryAttribute() { return categoryBean.findAllCategoryAttributes(); } public ArrayList<SelectItem> getCategories() { categories.clear(); List<Category> allCategory = categoryBean.findAllCategory(); Iterator it = allCategory.iterator(); while (it.hasNext()) { Category cat = (Category) it.next(); SelectItem select = new SelectItem(); select.setLabel(cat.getName()); select.setValue(cat.getCategoryID()); categories.add(select); } return categories; } public int getId() { return id; } public int getCategoryid() { return categoryid; } // Setters public void setCategoryAttribute(CategoryAttribute categoryAttribute) { this.categoryAttribute = categoryAttribute; } public void setId(int id) { this.id = id; } public void setCategoryid(int categoryid) { this.categoryid = categoryid; } and here is filtering bean : @EJB private CategoryBeanLocal categoryBean; private String filterNameValue = ""; private String filterDescriptionValue = ""; private int filterCategoryValue = 0; private ArrayList<SelectItem> categories = new ArrayList<SelectItem>(); public boolean filterNames(Object current) { CategoryAttribute currentName = (CategoryAttribute) current; if (filterNameValue.length() == 0) { return true; } if (currentName.getName().toLowerCase().contains(filterNameValue.toLowerCase())) { return true; } else { System.out.println("name"); return false; } } public boolean filterDescriptions(Object current) { CategoryAttribute currentDescription = (CategoryAttribute) current; if (filterDescriptionValue.length() == 0) { return true; } if (currentDescription.getDescription().toLowerCase().contains(filterDescriptionValue.toLowerCase())) { return true; } else { System.out.println("desc"); return false; } } public boolean filterCategories(Object current) { if (filterCategoryValue == 0) { getCategories(); filterCategoryValue = new Integer(categories.get(0).getValue().toString()); } CategoryAttribute currentCategory = (CategoryAttribute) current; if (currentCategory.getCategoryID().getCategoryID() == filterCategoryValue) { return true; } else { System.out.println(currentCategory.getCategoryID().getCategoryID() + "cate" + filterCategoryValue); return false; } } public ArrayList<SelectItem> getCategories() { categories.clear(); List<Category> allCategory = categoryBean.findAllCategory(); Iterator it = allCategory.iterator(); while (it.hasNext()) { Category cat = (Category) it.next(); SelectItem select = new SelectItem(); select.setLabel(cat.getName()); select.setValue(cat.getCategoryID()); categories.add(select); } return categories; } public String getFilterDescriptionValue() { return filterDescriptionValue; } public String getFilterNameValue() { return filterNameValue; } public int getFilterCategoryValue() { return filterCategoryValue; } public void setFilterDescriptionValue(String filterDescriptionValue) { this.filterDescriptionValue = filterDescriptionValue; } public void setFilterNameValue(String filterNameValue) { this.filterNameValue = filterNameValue; } public void setFilterCategoryValue(int filterCategoryValue) { this.filterCategoryValue = filterCategoryValue; } unfortunetly i can't even imagine what could cause this problem that's why i even made videos to help u understand my problem thanks for help!

    Read the article

  • richfaces 3.3.3 problem with ie6

    - by Omar K
    Hi everyone, I am working using richfaces 3.3.3 , tomcat 6. when i try to access my application using IE6 and the windows language is set to arabic, i get the following exception: IllegalArgumentException: Parameter "size" for convert from HTML to java can not be decoded: [1px], reason: Unparseable number: "1px". when i change the windows language back to english, restart the server and try to log in again everything works fine.. Can anybody please help me with this issue

    Read the article

  • Before the lablel for each of the menu item, there is space with the some color, i want to remove th

    - by anandhinaveen
    Hello, I am using richfaces dropDownMenu component which contains a set of rich menuItems. When the menu items are displayed, a extra space is displayed before the lablel for each of the menu item. But I have a requirement of not displaying the space before the labels and to change the color. I used the css to reduce the space: .rich-menu-item-icon img { width: 0px; } .rich-menu-group-icon img { width: 0px; } but, i need to change the color in that place.

    Read the article

  • page redirection problem via Bean in Js1.1

    - by johnbritto
    I have a requested scoped managed bean, called AuthenticationBean. I am developing a smal application with a login module, user activation and deactivation. When I click on the activate or deactivate link, then the action is processed in AuthenticationBean. I want thereafter redirect to some page depending on the activate or deactivate link. I have tried the following in the bean constructor: FacesContext.getCurrentInstance().getExternalContext().redirect("/user/activate.jsp"); But this code is not working. Please help me.

    Read the article

  • Update database settings in properties file in Spring

    - by mvg
    Hi all, I am trying to create a Database Manager page which shows the database details on page load and updates the database settings when the user press submit I followed this tutorial and set the database settings in properties file. I managed to update the database settings in properties file programmatically. When I retrieved the database settings using the following code DriverManagerDataSource databaseSource = (DriverManagerDataSource)context.getBean("dataSource"); databaseSource.getUsername(); I managed to get the old value and unable to get the new value This is the mapping in applicationContext.xml file <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location"> <value>classpath:/bundle/database.properties</value> </property> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> </bean> I checked the properties file and found it to be updated with the latest input. What am I missing? Thanks in advance P.S I am using JSF1.2 with Spring 3 Update Just making my requirement simple. I am creating a setparate dbsettings page, so that when user wishes to connect to different database he/she can just enter the details in dbsettings page and connect

    Read the article

  • Code picks up value from selectOneMenu and selectBooleanCheckbox, even though it is not rendered

    - by hpe
    I've got code the following code in my .xhtml <t:panelGroup rendered="false"> <t:selectOneMenu id="id" value="#{row.someValue}" displayValueOnly="#{form.readState}"> <f:selectItems value="#{row.listOfValues}"/> </t:selectOneMenu> </t:panelGroup> The listOfValues is set in a form populator, and is thus present in the form object. Also, as expected, the portion outlined above is not rendered in the output HTML. But, when clicking the save button in the page the following code tries to get the value from the XHTML, even though it is not rendered. It will thus not copy the value present in the form, but set it to null (as it is not set in the XHTML). object1.setSomeValue(form.getSomeValue()); As far as I can see this only happens with selectBooleanCheckbox and selectOneMenu. E.g. inputText works fine. Any idea on how to fix it?

    Read the article

  • Clicking on MenuItem without clicking on the text

    - by pringlesinn
    I've got a Menu, and I want to click on the menu, but not on the text if you guys know what i mean. The MenuItem has a border, or something like this, but when I click on it it won't redirect to the page I want unless I click on text. Is it possible to click on the whole "Button" and redirect or do what is need to do? My menu is like this: <rich:dropDownMenu showDelay="250" hideDelay="0" submitMode="none"> <f:facet name="label">Tools</f:facet> <rich:menuItem> <s:link view="/pages/tools/ppaParameters/PpaParametersEdit.xhtml" value="Parameters" id="PpaParametersId" includePageParams="false" propagation="none"/> </rich:menuItem> <rich:menuGroup value="Security"> <rich:menuItem> <s:link view="/pages/tools/security/ppaModule/PpaModuleEdit.xhtml" value="Module" id="PpaModuleId" includePageParams="false" propagation="none" /> </rich:menuItem> </rich:menuGroup> </rich:dropDownMenu> There's an example. I need to click on text to make it work out.

    Read the article

  • transfer parameter to next request

    - by user234194
    I have a situation where clicking a link in one column on the datatable opens A update FORM in the same page. The problem is when I hit the submit button for update, the render is set to false again of that update panel which was previously set true by parameter passed clicking the link. I tried htmlhiddenInput and did setValue and getvalue but the value is lost. Is there any way I can save that parameter send from link, when clicked, even after submitting the form. I achieved it doing session but I dont wanna use session. Any help is appreciated, thanks.

    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

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >