Search Results

Search found 3678 results on 148 pages for 'jsf jsp el'.

Page 27/148 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • JSF Managed Property question

    - by kidvid
    I have a search page that I'll called "Parent." The search page references a country lookup page that I'll call "Child." When the user selects a country on Child's page and clicks on OK, I set the country back into the parent page. I do this by calling a method on the Parent page called "UpdateCountryCodeWithLookupValue(Child child)" When the user clicks on OK on the Child page, that method gets called in the parent, wherein it'll get the selected country code out of the Child page and set it into a text entry field. My question has to do with the proper way to set up this relationship in the faces config file. The way I have it now is that the child has a managed property for the parent. I.e., in my Child page I defined a method called "SetParent(Parent parent)". Is there any drawback to doing it this way? Would it be preferable to set the managed property so that the Child page class is a property of the parent instead of vice-versa? Let's say that I could have two Parent (search) pages open at the same time, and each of these was able to open the Child page (country code lookup). What would be the ramification for that circumstance in terms of the managed property in the faces config file? Thanks, Adrian

    Read the article

  • JSF single select box with customizable look-and-feel

    - by Greg Charles
    I'm looking for a control that allows me to choose a single option from a list of choices via a dropdown box. The h:singleSelectMenu or h:singleSelectListBox worked well, but now I have a requirement to customize the glyph that triggers the dropdown. I've looked at the RichFaces components, but I don't see anything like a single select box.

    Read the article

  • Skip some row in jsf dataTable

    - by Marc
    How to skip some rows to be displayed using dataTable: <h:dataTable cellspacing="0" id="dogs" value="#{dogBean.dogs}" var="dog" rendered="#{dogBeans.dogs != null}"> <h:column id="nameColumn"> <h:outputText value="#{dog.name}"/> </h:column> <h:column id="breedColumn"> <h:outputText value="#{dog.breed}"/> </h:column> </h:dataTable> I want to display all dogs, but those how have an age greater than 10. dog.age 10. I'm using Seam.

    Read the article

  • jsf immediate="true" question regarding binding to session bean

    - by jamiebarrow
    Hi, I have a listing page that goes to an add page. The add page has a name textbox whose value is bound to a session scoped bean. The listing page has an add button that goes via an action method to the add page. This action method clears the object that the name textbox is bound to. I also have a cancel button on the add page, which is bound to an action method that again clears the value that the name textbox is bound to. If nothing is set to immediate, this all works fine. However, if I set the cancel button to immediate, if I enter values in the name field, and then click cancel, the action method is fired and clears the object in the backing bean and goes to the listing page. If I then click add, the action method clears the object again (ignore if it's best method or not) and then goes to the add page. I would now expect the add page's name textbox to be empty, but it's not?! Surely, since the add button is not immediate, the values should be re-bound and empty? Below is the relevant XHTML for the add button on the listing page <h:commandButton id="addButton" value="Add" action="#{myBean.gotoAdd}"/> Below is the relevant XHTML for the input box on the add page (myBean is session scoped), followed by that of the cancel button on the add page.: <h:inputText id="newName" value="#{myBean.newObject.name}" binding="#{myBean.newNameInput}" styleClass="name" /> <h:commandButton id="cancelButton" value="Cancel" immediate="true" action="#{myBean.cancelAdd}" onclick="return confirm('You sure?');"/>

    Read the article

  • JSF Render response programatically

    - by Shamik
    I have one parent page with a parentManagedBean (attached to Session Scope). On click of a button on this parent page, one popup comes which has a childManagedBean (attached to Request scope). Now ChildManagedBedan holds a reference to parentManaged bean thru JSFs managed Property feature. On this popup window, user selects some option which populates a large value object class. I use the managed property of childMnaagedBean to set the values from this large object to that of parentmanagedbean. Problem is - The parent page shows a link, on click of which a popup comes, on selection of the popup, the popup disappears and set the values to the parentManaged bean.So far so good, but the newly set values need to appear on the parent page. This is where I am stuck. How to programatically render the master page/render page when I am at the child managed bean... is there a way I can get handle of the parent page and refresh it ?

    Read the article

  • Problems with deploying JSF project from Netbeans to Tomcat

    - by Yurish
    Hi! Googled everything, but can't find solution for my problem. When i'm trying to deploy my project to Tomcat, i have such errors in Tomcat log: SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener I tried to deploy it from fresh Netbeans 6.8 to fresh Tomcat 6.0.26, but the problem is still there. Servlet-api.jar is in the tomcat/lib folder. Tried to replace it with the newest, but problem is still there. No compilation errors. Everything is correct. Problem started suddenly. No code changes, no new jars added. Help? UPD: contents of WEB-INF/lib: hibernate3.jar hibernate-testing.jar quartz-1.7.2.jar quartz-all-1.7.2 servlet-api-2.5-20081211

    Read the article

  • How does 'binding' in JSF work?

    - by Roman
    I've created custom component which shows chart. Now I need to make binding support for this component i.e. generated chart-image should be available (as array of bytes) to backing bean via binding mechanism. I'd like to know some general info about binding implementation techniques. Any links and examples are welcome as well. Thanks in advance!

    Read the article

  • JSF: how to update the list after delete an item of that list

    - by Harry Pham
    It will take a moment for me to explain this, so please stay with me. I have table COMMENT that has OneToMany relationship with itself. @Entity public class Comment(){ ... @ManyToOne(optional=true, fetch=FetchType.LAZY) @JoinColumn(name="REPLYTO_ID") private Comment replyTo; @OneToMany(mappedBy="replyTo", cascade=CascadeType.ALL) private List<Comment> replies = new ArrayList<Comment>(); public void addReply(NewsFeed reply){ replies.add(reply); reply.setReplyTo(this); } public void removeReply(NewsFeed reply){ replies.remove(reply); } } So you can think like this. Each comment can have a List of replies which are also type Comment. Now it is very easy for me to delete the original comment and get the updated list back. All I need to do after delete is this. allComments = myEJB.getAllComments(); //This will query the db and return updated list But I am having problem when trying to delete replies and getting the updated list back. So here is how I delete the replies. Inside my managed bean I have //Before invoke this method, I have the value of originalFeed, and deletedFeed set. //These original comments are display inside a p:dataTable X, and the replies are //displayed inside p:dataTable Y which is inside X. So when I click the delete button //I know which comment I want to delete, and if it is the replies, I will know //which one is its original post public void deleteFeed(){ if(this.deletedFeed != null){ scholarEJB.deleteFeeds(this.deletedFeed); if(this.originalFeed != null){ //Since the originalFeed is not null, this is the `replies` //that I want to delete scholarEJB.removeReply(this.originalFeed, this.deletedFeed); } feeds = scholarEJB.findAllFeed(); } } Then inside my EJB scholarEJB, I have public void removeReply(NewsFeed comment, NewsFeed reply){ comment = em.merge(comment); comment.removeReply(reply); em.persist(comment); } public void deleteFeeds(NewsFeed e){ e = em.find(NewsFeed.class, e.getId()); em.remove(e); } When I get out, the entity (the reply) get correctly removed from the database, but inside the feeds List, reference of that reply still there. It only until I log out and log back in that the reply disappear. Please help

    Read the article

  • JSF - <h:outputText> making some of words Bold

    - by karansardana
    How can we go about making some of the words in a sentence appear in BOLD for example - I'm trying to put one of the words of a sentence in BOLD i.e. sentence is "please select the amount" amount should be in BOLD, and now, when I use message = "please select the amount " This doesn't work. It simply shows please select the amount . How can I get this to work?

    Read the article

  • one check box to select other check boxes in jsf

    - by mudassar
    I have two kind of check boxes. One is a simple check box e.g t:selectBooleanCheckbox and another list t:selectBooleanCheckbox dynamically generated. I want to control this list with the single check box. e.g. when it is selected or deselected, similar action should take place for the list as well. Help please :)

    Read the article

  • JSF + PrimeFaces: `update` attribute does not update component

    - by Harry Pham
    Here is my layout <div id="mainPanel"> <div id="padding"> <h:outputText id="text" value="Personal Feed" rendered="#{Profile.renderComment}"/> </div> <div id="right"> <h:form> <p:commandButton value="Update" actionListener="#{bean.toggleComment}" update="text" /> </h:form> </div> </div> When I click the link Update, which suppose to toggle the renderComment boolean on and off, but it does not toggle the display of the text Personal Feed. Now if I put a form around the h:outputText, and instead update the form instead, then it work. Why is that?

    Read the article

  • JSF - Prevent validationFailed when raising a WARN ValidatorException

    - by Sébastien Tromp
    Hello, I have a form which uses validators for its fields. These validators can send back either Severity.SEVERITY_ERROR or Severity.SEVERITY_WARN messages, as illustrated: if (!isInMainFamily) { FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, "You should make sure to tag your competency in at least one main category", null); throw new ValidatorException(message); } However, SEVERITY_WARN messages are not blocking for me. They are just a way to tell the user they should correct their input, but won't prevent them from submitting the form and saving their data. However, it seems that throwing any kind of ValidatorException flags the FacesContext as "validationFailed", which then prevents the submission of the form. Is there a way to get around this? Or am I misunderstanding something? Thanks a lot for your help, Sébastien

    Read the article

  • How to get url request parameter from inside LIferay/IceFaces/JSF portlet backing bean

    - by Negatizmo
    Is posible for a portlet to read a request parameter of its surrounding page? E.g. the URL of the page the portlet resides in is http://example.com/mygroup/mypage?foo=bar Is it possible to read the "foo" parameter from a portlet that is on that page? Portlet Container is Liferay 6.0.5. P.S. I have already tried: com.liferay.portal.util.PortalUtil.getOriginalServletRequest(com.liferay.portal.util.PortalUtil.getHttpServletRequest((javax.portlet.PortletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest())).getParameter("foo") but I always get null for productId Thanks!

    Read the article

  • JSF - Creating an overlay for popup panels.

    - by Ben
    Hi, I've created an overlay that will popup whenever someone wants to upload a file to the system. The Gui looks like this (when the overlay is up) I have two problems with this: I attached a a4j:support object that, onclick, makes the overlay disappear. The problem with this is that when I click the upload button on the upload component, support catches the click event and closes the overlay with the upload component before I have the chance to finish the operation. I chose two different style classes. One for the overlay and one for the upload panel. But the styling of the overlay takes over the upload component and it becomes transparent as well. The implementation looks something like this: <h:panelgroup layout="block" styleClass="overlayClass"> <rich:fileUpload styleClass="uploadStyleClass"... /> <a4j:support event="onclick" action="#{mrBean.switchOverlayState}" reRender="..."/> </h:panelGroup> The CSS: .overlayClass { Opacity: 0.5; position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: #000; } .uploadStyleClass { opacity: 1.0; ... } Thanks for the help!

    Read the article

  • JSF how to temporary disable validators to save draft

    - by Swiety
    I have a pretty complex form with lots of inputs and validators. For the user it takes pretty long time (even over an hour) to complete that, so they would like to be able to save the draft data, even if it violates rules like mandatory fields being not typed in. I believe this problem is common to many web applications, but can't find any well recognised pattern how this should be implemented. Can you please advise how to achieve that? For now I can see the following options: use of immediate=true on "Save draft" button doesn't work, as the UI data would not be stored on the bean, so I wouldn't be able to access it. Technically I could find the data in UI component tree, but traversing that doesn't seem to be a good idea. remove all the fields validation from the page and validate the data programmaticaly in the action listener defined for the form. Again, not a good idea, form is really complex, there are plenty of fields so validation implemented this way would be very messy. implement my own validators, that would be controlled by some request attribute, which would be set for standard form submission (with full validation expected) and would be unset for "save as draft" submission (when validation should be skipped). Again, not a good solution, I would need to provide my own wrappers for all validators I am using. But as you see no one is really reasonable. Is there really no simple solution to the problem?

    Read the article

  • dynamic JSF composite component styling/rendering

    - by Checkoff
    I've a little problem with a composite component. This component's implementation looks like: <composite:implementation> <h:outputStylesheet name="foo.css" library="bar"/> <div id="#{cc.clientId}"> <composite:insertChildren/> </div> </composite:implementation> It is included dynamically into a facelet page which include this component with JSTL core tags. The facelet page is similar to the following one. <h:panelGroup id="viewport" layout="block"> <c:if test="#{controller.object != null}"> <c:forEach items="#{controller.object.elements}" var="element"> <c:if test="#{element.type == 'type1'}"> <my:componentTypeOne id="#{element.id}"/> </c:if> <c:if test="#{element.type == 'type2'}"> <my:componentTypeTwo id="#{element.id}"/> </c:if> </c:forEach> </c:if> </h:panelGroup> So when I only render the viewport of the page the components are rendered but without the stylesheet defined within the composite component my:component. Is there any way to include the stylesheet on the fly without rendering the whole page? EDIT: extension of the example code..

    Read the article

  • JSF internationalization problem

    - by M3rlino
    Hi, i have this problem: I added to faces-config.xml in my webapp this line fr pt_BR but when i try to access to the page with my browser set to language french i get english validation errors what is wrong with my web-app? Did I miss something? Thank you in advance for your help!

    Read the article

  • JSF actionListener is called multiple times from within HtmlTable

    - by Rose
    I have a mix of columns in my htmltable: 1 column is an actionlistener, 2 columns are actions and other columns are simple output. <h:dataTable styleClass="table" id="orderTable" value="#{table.dataModel}" var="anOrder" binding="#{table.dataTable}" rows="#{table.rows}" <an:listenerColumn backingBean="${orderEntry}" entity="${anOrder}" actionListener="closeOrder"/ <an:column label="#{msg.hdr_orderStatus}" entity="#{anOrder}" propertyName="orderStatus" / <an:actionColumn backingBean="${orderEntry}" entity="${anOrder}" action="editOrder" / <an:actionColumn backingBean="${orderEntry}" entity="${anOrder}" action="viewOrder"/ .... I'm using custom tags, but it's the same behavior if I use the default column tags. I've noticed a very strange effect: when clicking the actionlistenercolumn, the actionevent is handled 3 times. If I remove the 2 action columns then the actionevent is handled only once. The managed bean has sessionscope, bean method: public void closeOrder(ActionEvent event) { OrdersDto order; if ((order = orderRow()) == null) { return; } System.out.println("closeOrder() 1 "); orderManager.closeOrder(); System.out.println("closeOrder() 2 "); } the console prints the'debug' text 3 times.

    Read the article

  • Request attributes in jsf / icefaces behaves strange (survive request end)

    - by hubertg
    I have the following code in a listener method: FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("time", new Date()); When a button is clicked the following code is executed System.out.println(FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("time")); One could except that "time" is null when the listener was not executed while processing the current request, but: it seems like the "time" object survives the request processing. So when "time" has been set sometimes in the past it stays there... can anybody explain this? Thanks.

    Read the article

  • JSF and Ajax4JSF on WebSphere 6.1 --> Problem with Form Submission

    - by Shamik
    Has anyone setup JSF1.1 with Ajax4JSF on websphere 6.1 ? I followed the instructions as mentioned in the developer guide . The problem that I am facing is that once I use a4j:support on any of my h:inputText item, the form values are not getting set in the backing bean on the submission of the form. I do have <h:messages> tag present just above the form so that all the problems should be reported there but I do not see any error message once I submit the form. But I do see that the values are not getting set. I need to find the solution as early as possible otherwise I probably have to throw the ajax4jsf framework and write javascripts instead :(

    Read the article

  • Horizontal placement of components in JSF.

    - by Ben
    Hi, Should be simple but I couldn't find the answer, I would like to place components horizontally instead of vertically. What I'm trying to achieve is a rich:toolbar with 2 or more rows. I've been trying to do that with a toolbar that has a panelgrid and two panelgroups like this: <rich:toolbar...> <f:panelgrid columns="1"...> <f:panelgroup id="row1" .../> <-- Should be horizontal placement <f:panelgroup id="row2" .../> <-- Should be horizontal placement <f:panelgrid/> <rich:toolbar/> So how do I make the panelgroup layout horizontal (Or should I use something else?) Thanks!

    Read the article

  • action method is not called in JSF

    - by gurupriyan.e
    This is my Phase Listener public class AdminPhaseListener implements PhaseListener { private static final long serialVersionUID = -1161541721597667238L; public void afterPhase(PhaseEvent e) { System.out.println("after Phase " + e.getPhaseId()); } public void beforePhase(PhaseEvent e) { System.out.println("before Phase " + e.getPhaseId()); if(e.getPhaseId()== PhaseId.RESTORE_VIEW) { } } public PhaseId getPhaseId() { return PhaseId.ANY_PHASE; }} On click of a Command Button in my page, i call an action method and do some processing but the action method is not called at all, but in the server log , i could see the messages printed by my PhaseListener for all the Phases. If my view was not changed, It would have stopped after the RESTORE_VIEW Phase right? any thoughts?

    Read the article

  • valuechangelistener in jsf

    - by chetan
    public void departmentChangeListener(ValueChangeEvent event){ Long id = (Long) event.getNewValue(); department = id; if(department == -1 || department == 0){ employee=0; displayEmployee = false; } else{ changeEmployee(); employee=0; displayEmployee = true; } } This is the method that call in valuechangeListener attribute of ice:selectOneMenu tag but here problem is value of employee set 0 when we second time change value from selectOneMenu's List.

    Read the article

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