Sitemap

Amicuk Programming Answers

EL expression in JSF with a4j:commandLink

-0001-11-30   Views:0

Advertisement

hallo: I have a very strange problem with a el-expression. i need your help, thanks. i develop a project with JSF-RI, <rich:datascroller align="left" for="ein_post" page="#{alMessageHandler.scrollerPage}"                  

hallo:
I have a very strange problem with a el-expression. i need your help, thanks.
i develop a project with JSF-RI,
<rich:datascroller align="left" for="ein_post" page="#{alMessageHandler.scrollerPage}"
                    renderIfSinglePage="false" reRender="sc2" id="sc1" />
<rich:dataTable width="985" headerClass="form_background peTable"
                         sortMode="single" id="ein_post" rows="#{alMessageHandler.pageSize}"
                         value="#{alMessageHandler.pagedListDataModel}" var="recivedMsg"
                         rowKeyVar="index">
<rich:column width="75px" id="outbox6">
    <a4j:commandLink action="#{alMessageHandler.writeReplyMsg}"
     actionListener="#{alMessageHandler.catchMessageIdForReplay}"
     rendered="#{alMessageHandler.senders[index-(alMessageHandler.scrollerPage-1)*alMessageHandler.pageSize].activated}">
       reply
     <f:param value="#{receivedMsg.message.id}" id="receivedMessageIdForReplay"  name="receivedMessageIdForReplay"/>                              
    </a4j:commandLink>
</rich:column>
</rich:dataTable>i use a PagedListDataModel, which extends DataModel. in each message i have a link 'reply'.
On the first page(the first page of rich:datascroller) i click reply link, then call the methode "catchMessageIdForReplay" then "writeReplyMsg", well done.
but after i click the seconde page then cklick "reply" link. it would not work. it can not call method "catchMessageIdForReplay" then "writeReplyMsg".
it returned to the first page. that is to say, it is only useful on the first page.
watching: if i write the code like this "rendered="true". then no problem
that's mean el-expression "rendered="#{alMessageHandler.senders[index-(alMessageHandler.scrollerPage-1)*alMessageHandler.pageSize].activated}"" on the seconde page can not working.
Strange: i can dispaly the value of #{alMessageHandler.senders[index-(alMessageHandler.scrollerPage-1)*alMessageHandler.pageSize].activated}", the value is 'true'. but 'render' did not know the el-expression on the seconde page
anybody can tell me why, and how to solve the problem ? thanks.
Edited by: zlzc2000 on Oct 27, 2009 4:09 AM

The replay answer
Advertisement
I am not very sure about your problem, but it might be releated to the bean state if your bean is in request scope. Trying using a4j:keepAlive in your jsp and see if it works. These type of problems happen sometimes with rendered and disbled attributes.
regards,
nirvan.

Go to See the other 2 answers

EL expression in JSF with a4j:commandLink

Category:DefaultRelease time:-0001-11-30Views:130

hallo: I have a very strange problem with a el-expression. i need your help, thanks. i develop a project with JSF-RI, <rich:datascroller align="left" for="ein_post" page="#{alMessageHandler.scrollerPage}"                  [More]

AJAX: Datatable sorting using a4j:commandLink

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have been using h:commandLink to sort data-table and display UP or DOWN arrow in JSF. But, when i moved to ajax-based, a4j:commandLink to sort by data-table, sort is not happening at all. I am attaching code for a single <h:column> <h:colum[More]

JSP ${} expressions in JSF tag attributes

Category:DefaultRelease time:2015-10-11Views:130

Does anyone know why the expert group decided not to allow ${} style expressions within JSF tag attributes? I understand that a different syntax is needed to implement the 'late binding' #{} expressions used to link input controls to form beans, but[More]

Using expressions in jsf tags

Category:DefaultRelease time:-0001-11-30Views:130

I have a problem with using expressions in jsf tags! I know this topic was discussed before but it doesn`t work. I want to use the following jsf-code: <h:panel_data id="tab" var="vari" modelReference="Bean.varis"> <h[More]

Urgent -Help needed : a4j:CommandLink  'reRender ' not working.

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I am using <a4j:commandLink for my application to get the ajax functinality. Here i am rerendering a data table with the id -commentsId here is the Synatax, we dont have any clue to how do we progress on this. <a4j:commandLink value="submit[More]

Passing object as parameter in JSF using h:commandLink tag

Category:DefaultRelease time:2015-10-11Views:130

Hi , I have a scenario in which i need to pass objects from one jsp to another using h:commandLink. i read balusC article "Communication in JSF" and found a basic idea of achieving it. Thanks to BalusC for the wonderful article. But i am not ful[More]

Was changed app behavior for JSF 1.1 (commandLink action)

Category:DefaultRelease time:-0001-11-30Views:130

I use very simple navigation approach. Inside commandLink tag I have set action property (new_patient): <h:panelGrid id="ACTION" columns="6" styleClass="entity-action" columnClasses="entity-action-column"> <[More]

JSF 2.0 commandLink link, outputLink, etc

Category:DefaultRelease time:-0001-11-30Views:130

I have a paragraph like below Nowis the time for all good men to come to the aid of their country. If they don'e it could be the end of us I want to put a command link in this paragraph for say "good men" so it looks like this Nowis the time for[More]

JSTL expressions  inside JSF Component

Category:DefaultRelease time:-0001-11-30Views:130

Hello * I am experiencing c:if tag issues if embedded inside h:panel tags. Nesting a single c:if tag works fine, but nesting two breaks the app. Therefore I have to seprate out the JSTL tags into there own h:panel...bit messy. Anyone else experence s[More]

How to use Type Casting in JSF Expression Language

Category:DefaultRelease time:-0001-11-30Views:130

I have an attribute CategoryId in my VO of type oracle.jbo.domain.Number. I am trying to use the expression of Boolean item in JSF as #{row.CategoryId != 4} Here is the JSF code:                       <af:column id="s141NewItem3Col" noWrap=&q[More]

Use commandLink to forward non-jsf page cause other commandLink invalidate

Category:DefaultRelease time:-0001-11-30Views:130

Hi : I use commandLink to forward to non jsf page , after click the link , it worked , success to 1.jsp. Then I click another link , the other commandLink doesn't work. any one have the same problem ? JSF page: <h:commandLink action="#{MenuHandler[More]

Hot
I just got a new iPad, I typed in the wrong apple password. How to I change it back to the right onHow wrong, is that your email or someone else's? Yours - you may be able to fix it. Someone's - not likely.Read other 2 answers [More]
When tring to access icloud my id is Different. Can I change this id to be the same as my apple id? <Email Edited by Host>Apple ID's cannot be merged.Read other 2 answers [More]
Running Excel 2007 on XP Pro. When I make a pdf file from an existing Excel file in Excel 2007 (originally created in Excel 2000), a lot of the formatting changes. Cells that were aligned to the center are now aligned to the top or bottom with no rhy [More]
Got my iphone 3gs replaced under warranty, the new iphone will sync everything as normal, however it will not restore, also when i press check for software update i get this message: "the iphone software update server could not be contacted." &q [More]
Hi, I got a problem here. I am learning about repetitive manufacturing. At first we have 2 version of the material. we use prduction line at the first. and now i want to try about reporting point so i maintain the routing for the material version 1 a [More]
i live in a dorm and we have to use the 802.1x protocol to log on the network. so to play xbox live, i have a usb-ethernet adapter and i am sharing my network connection with the adapter which i then plug into my xbox. my ip address is lets say 123.4 [More]
Hi, We are using the following steps for back up for around 35 databases in version 7.1 1.     Login to server. 2.     Logout All users using LOGOUTALLUSERS command 3.     Disable Login for each individual Appname in sequential order- using DISABLELO [More]
I cancelled my services with Comcast and returned all equipment. I have a reciept for the returned equipment and Comcast owes me a credit of more than $100. Yet, every day, several times a day, including saturday and sunda I get a phone call from "Eq [More]
Hi, I am kinda new to DW.  I have a .jpg that is 1000pixels wide and 1100 pixies tall which I want to use as the background for my site.  I want that image to be centered (not justified left).  Next I want two tables on top of that image.  The first [More]
When I run [email protected] at 100%, my CPU heat shows between 88 and 92 degrees. I have read that the Core 2 Duo is OK up to 100 degrees C. But I don't think I've read of anyone reporting heat above 90 degrees like I'm getting. Am I risking damaging my Mac [More]