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
My ipod 5th gen says it is connected to the internet and i can go on apps that require an internet connection but whe i try to use the weather or another app that uses your current location it cant find me???If you open the Maps app where does that s [More]
Hi, I've a strong problem to run Flash Builder 4 on a Mac OS X 10.5.7 Install works perfectly, in all cases. with Eclipse plug-ins version, Eclipse starts. But when I try to open any Flash perspective in Eclipse I got the message : Erros opening pers [More]
Hello all,    From last two week I facing this problem.When I try to open the document  its redirect to file conversion or text   encodeing tab. and letter are not in human readable format,all are messed up.           Please help me.How do I get my m [More]
Hi I am new to creative cloud and downloaded the flash professional cc for a trail. it was successful but everytime I touch a tool to use like the pencil or paintbrush it crashes. Can anyone advise me on how to solve this problem?reset your preferenc [More]
Dear all, I am experiencing a problem with "Windows Server 2008 R2", using Windows Server Backup. Here's my setup: Server: RAID 5 Disk setup Backup: By using Windows Server Backup (within Windows Server 2008 R2), C: and D: were fully backed up, [More]
Hello, We are developing a DashBoard On Bi Aging report. Data is matching with BI aging report, so no data issue. In Bi Query we have used Suppress Zero Records but In Dashboard all material are passed i.e Suppress Zero records is not working while d [More]
Hi All, Can any body tell  what are the differences between MDM 3.0 and MDM 5.5? Regards, NikhilMDM 3.0 Strengths • Supply chain expertise • Global metadata synchronization expertise &#150; especially important to Consumer Packaged Goods and Retail i [More]
Hello guys and gals. I have a mac pro with Tiger installed. My issue is I intermittently get a prohibitted error on bootup. The error looks like a no smoking sign without the cigerett. I have to re boot and sometimes the os boots right up othertimes [More]
Rather than type again. I'm gonna copy and paste. I was in the wrong place. Thanks for the help, BDAqua. I am late doing my updates. I have a friend who has broadband. I usually go to his place to do it. I'm on dialup. So I waited and waited. But it [More]
I have Adobe Acrobat 8.3 and having been fighting with it to Bates numbering some documents which must be attached to an EMAIL tomorrow. I follow the instructions but after I finish I print one page in the set and NEVER has the BATES number. It did s [More]