Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!

mye kency

Greenhorn
+ Follow
since May 09, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mye kency

Hello All!
i wonder how to draw sequence diagram with EJB3? it have EntityManager and interactive with Database but in EJB2 entities bean interactive with Database?
How can i do it?
Thank you Tim and Lincoln , i'm student, i try to learn JSF and Pretty faces, sorry if my question is stupid think, i not have exp in web application before, but now i try to learn it
Thank for your advice !
10 years ago
JSF
try <br/> for it, in database text contain \n and display on xhtml, they ignore it try use HTML tag for this
Good luck
10 years ago
JSF

I have had similar sounding problems in the past which were
resolved by placing the dataTable in a surrounding p:outputPanel, so
this might be worth a try.



i found anwser from Primefaces Forum
10 years ago
JSF
can you post your code ?
10 years ago
JSF
Hello Everybody!
i found PrettyFaces on google and choose it for my project
i want have dynamic page in one main page
it means

Page1 ==> include Header and Footer is static (include into Page1) , addition it have content, content will be dynamic with others page such as Register Page, Login Page, Item Page ...
Before i use JSF , i was use JSP and url when i get param such as
http://localhost/index.jsp?page=register.
http://localhost/index.jsp?page=login

and in index.jsp i can use if,else statement to choice page will be display inside index.jsp such as:




but now i use JSF and use Prettyfaces for Pretty URL how can i do dynamic content in one page like JSP?
Thank You
Best Regards
10 years ago
JSF

Greg Charles wrote:OK, that makes some sense. However, I don't think it's really necessary hit the server until the user saves the change to the category name. I'd just use client-side code like jQuery or just plain JavaScript to fill in the dialog. There must be a function to pop up the dialog or make it visible anyway. Why not just pass a parameter into that?

If you're determined to hit the server and update the dialog with a session variable, then Ajax with a reRender is the right thing to do. I haven't worked with PrimeFaces either, but I know I sometimes have a terrible time getting my re-rendered sections to actually re-render. There must be a trouble-shooting guide somewhere, but some of the things I've found is the section must be in an Ajax compatible form like <h:form> or <a4j:form> and there are some limits on what kind of sections can be re-rendered. For example <div> probably wouldn't work, but say, <a4j:outputPanel> would. Actually, the last time I used <a4j:outputPanel>, I had to add the attribute ajaxRendered="true" before it worked. I'm still not sure why.

Good luck! Chúc may mắn! And if you don't mind the suggestion, we really encourage using real names on JavaRanch.



Thank you for your support i was solve my problem with http://www.primefaces.org/showcase/ui/datatableRowSelectionByColumn.jsf many thank you
10 years ago
JSF

Greg Charles wrote:So "danh muc san pham" means category, and "Sua" means fix (or edit). You want to be able to click on the icon next to a category and see a dialog pop up with the name of the category, which you can then change and save. Instead, the first time you click on a category icon you see a dialog with an empty category name, and the second category icon you click creates a dialog with the name of the first category. Is that the problem you're having?


it also similar your describe, firs time i click Edit Books to edit name of Category books, it return empty , if i want display Name is Books in dialog pop-up i must refresh page (f5) because session scoped pass id from page A to page B and page B get this id and display details of Category for id from page A pass to B, but i want handle on 1 page
10 years ago
JSF

Vadim Baranenko wrote:Sorry, but I don't know how it works in primefaces.



Hi Vadim i will explain my problem again

as you see 2 picture
i have data list with data table show all list of category , it's ok?
and when i click details one of them it will display dialog 2 show details of category such as category id (was hidden) category name (books)
normally i must have 2 page , 1 page is ListofCategory.jsf and second page is CategoryDetails.jsf
1 page will display list with datatable show all list of Category and i click Edit Category with id #1 , category name is Books it will pass id from ListCategory.jsf to CategoryDetails.jsf
url such as http://localhost:8080/ListofCategory.jsf pass to http://localhost:8080/CategoryDetails?id=1

but in case i have 2 form in one page , it mean data table and details of Category in one page and inside two dialog
i can get value from dialog to dialog two but you can see on 2 picture, i click on id #1 it display null i must refresh page and click other id, and it display details Category Name with id = 1
do you understand?
10 years ago
JSF

Vadim Baranenko wrote:Oh, I see. I didn't get it. I assuming that small window is a modal panel? than gust try to rerender only part of the page. Use something like that :

<a4j:commandButton type="button" action="#{somsBean.save}" reRender="idThatYouNeed" immediate="true" value="#{messages.button_Save}"/>



Hi Vadim thank you for your support but i use primefaces and reRender attribute is update attribute of primeface, i tried it bot not work, it open dialog and close in 2 second
10 years ago
JSF

Vadim Baranenko wrote:So why don't you use one bean for this actions?


Hi Vadim i use one bean for this action
i do not want refresh page, but can get value from dialog 1 to dialog 2
10 years ago
JSF

Tim Holloway wrote:Patience, grasshopper. We don't get paid to do this.

I can't understand your question. Can you have someone who has good English skills help you make it plainer?



ok i will describe my problem with image you can see below:






As you can see when i login into admincp and click icon Category
dialog one display, next i continue click on edit icon of Category Name Books
dialog 2 display null




in picture 2, i was refresh page and click on edit icon of category Magazine, dialog two display Category Name is Books

my question is how can i don't refresh page but it also display value such as Books , magazine in dialog 2?
10 years ago
JSF
no anyone in there?
10 years ago
JSF
Hello All i have problem with Session Scoped
i have 2 dialog in the same page
dialog 1 display list of category show by datatable
dialog 2 display detail of category when user click edit on dialog 1.
i can get id and data between 2 dialog but i must refresh page to load data from dialog 1 to dialog 2 it mean
when i click edit category with id #1 dialog 2 display null and i must refresh page and then click on category with id #3 it display id #1
please help me! how can i solve this problem
i use session scoped for jsf managed bean
i try use viewscoped for manage bean but it can not get data between 2 dialog just session scoped or application scoped can do it
please !! help me !! thank you
10 years ago
JSF