• الإعلانات

    • فيصل الحربي

      تسجيل عضوية جديدة في المنتدى   01/31/2016

      السلام عليكم ورحمة الله وبركاته  عزيزي العضو الجديد :  حاليا رسالة الإيميل لتأكيد صحة إيميلكم تذهب للبريد العشوائي ( جاري حل المشكلة )  فإذا لم تجد رسالة التحقق من إيميلكم في صندوق الوارد لديكم إتجه للبريد العشوائي ( JUNK)  وقم بتفعيل إشتراككم من هناك   

البحث في المنتدى

Showing results for tags 'primefaces'.

  • البحث بالتاقات

    اكتب الكلمات المفتاحيه بينها علامه الفاصله
  • البحث بكاتب الموضوع

تم إيجاد 5 نتيجة

  1. السلام عليكم ورحمة الله وبركاته   كنت بجرب examble بسيط بال jsf وكان يعمل من قبل بدون اى مشاكل   المشكلة التى تقابلنى هى ان action داخل p:commandButton لا تعمل ومبتدخلش على الميثود   ودى ال page اللى فيها الكلام ده ال action لا يعمل فى  p:commandButton value="add" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <h:body> <p:dialog widgetVar="uniCreateDialogWidget" id="uniCreateDialogId" height="100" width="300" modal="true" appendToBody="true" resizable="false" header="Add New University"> <h:form id="uniCreateDialogForm"> <p:messages autoUpdate="true" /> <h:panelGrid columns="2" id="dialogPanal"> <h:outputText value="University Name:*" /> <p:inputText value="#{facultyMB.university.name}" required="true" label="University Name"> <f:validateLength minimum="2" /> </p:inputText> </h:panelGrid> <p:commandButton value="add" icon="ui-icon-plus" action="#{facultyMB.addUniversity()}" update=":univerityForm" oncomplete="uniCreateDialogWidget.hide();" > </p:commandButton> <p:commandButton value="cancel" icon="ui-icon-cancel" actionListener="#{facultyMB.resetUniversity()}" onclick="uniCreateDialogWidget.hide();"/> </h:form> </p:dialog> </h:body></html>ودى ال bean class package beans;import converter.FacConverter;import dao.AdminDAO;import dao.UserRegister;import java.io.Serializable;import java.util.ArrayList;import java.util.List;import javax.annotation.PostConstruct;import javax.faces.bean.ManagedBean;import javax.faces.bean.SessionScoped;import javax.faces.context.FacesContext;import javax.faces.event.ValueChangeEvent;import javax.faces.model.SelectItem;/** * * @author shokry */@[email protected] class FacultyMB implements Serializable { //variables.................................................. private static final long serialVersionUID = 1L; University university; Faculty faculty; public AdminDAO adminDAO; public ArrayList<SelectItem> universities; public List<Faculty> uniFaculties; public int universityId; public String facultyName; //getters and setters........................................... public University getUniversity() { return university; } public void setUniversity(University university) { this.university = university; } public Faculty getFaculty() { return faculty; } public void setFaculty(Faculty faculty) { this.faculty = faculty; } public ArrayList<SelectItem> getUniversities() { return universities; } public void setUniversities(ArrayList<SelectItem> universities) { this.universities = universities; } public List<Faculty> getUniFaculties() { return uniFaculties; } public void setUniFaculties(List<Faculty> uniFaculties) { this.uniFaculties = uniFaculties; } public int getUniversityId() { return universityId; } public void setUniversityId(int universityId) { this.universityId = universityId; } public String getFacultyName() { return facultyName; } public void setFacultyName(String facultyName) { this.facultyName = facultyName; } //Get All Lists Methods............................................... public List<SelectItem> getAllUniversities() { ArrayList<University> lst = UserRegister.getUniversities(); ArrayList<SelectItem> items = new ArrayList<SelectItem>(); for (University t : lst) { items.add(new SelectItem(t.getUniversityId(), t.getName())); } return items; } public List<Faculty> getAllFaculties() { if (universityId == 0) { List<Faculty> lst = UserRegister.getUniFaculties(3); List<Faculty> items = new ArrayList<Faculty>(); for (Faculty t : lst) { items.add(new Faculty(t.getFacultyId(), t.getName(), t.getUniversityId())); } return items; } else { return uniFaculties; } } public void findAllUniFaculties() { List<Faculty> lst = UserRegister.getUniFaculties(universityId); List<Faculty> items = new ArrayList<Faculty>(); for (Faculty t : lst) { items.add(new Faculty(t.getFacultyId(), t.getName(), t.getUniversityId())); } setUniFaculties(items); } public List<Faculty> getFacultiesAll() { List<Faculty> lst = UserRegister.getFaculties(); List<Faculty> items = new ArrayList<Faculty>(); for (Faculty t : lst) { items.add(new Faculty(t.getFacultyId(), t.getName(), t.getUniversityId())); } return items; } //DAO Methods.............................................................. public void addUniversity() { System.out.println("addUniversity() hererererererereer --> university is : " + university.getName()); adminDAO = new AdminDAO(); adminDAO.addUniversity(university.getName()); } public void editUniversity() { System.out.println("university is : " + university.getName() + ""); adminDAO = new AdminDAO(); adminDAO.editUniversity(university.getUniversityId(), university.getName()); } public void deleteUniversity() { adminDAO = new AdminDAO(); adminDAO.deleteUniversity(university.getUniversityId()); } public void addFaculty() { adminDAO = new AdminDAO(); adminDAO.addFaculty(facultyName, universityId); findAllUniFaculties(); } public void deleteFaculty() { adminDAO = new AdminDAO(); adminDAO.deleteFaculty(faculty.getFacultyId()); } public void editFaculty() { adminDAO = new AdminDAO(); adminDAO.editFaculty(faculty.getFacultyId(), faculty.getName()); } public void universityChange(ValueChangeEvent e) { university = (University) e.getNewValue(); FacesContext.getCurrentInstance().renderResponse(); } public University getuUniversityById(int universityId) { adminDAO = new AdminDAO(); university = adminDAO.getuUniversity(universityId); return university; } public Faculty getFacultyById(int facultyId) { adminDAO = new AdminDAO(); faculty = adminDAO.getfFaculty(facultyId); return faculty; } //init methods................................................ @PostConstruct public void init() { uniFaculties = FacConverter.facultyDB; } //reset objects public void resetUniversity() { System.out.println("resetUniversity() hererere --->"); university = new University(); } public void resetFaculty() { faculty = new Faculty(); facultyName = ""; }}فاريد المساعدة فانا مش عارف المشكلة منين!!!!   شكرا
  2. السلام عليكم و رحمة الله تعالى وبركاته     موضوع اليوم حول كيفية إنشاء المبيانات باستعمال تقنياتPrimefaces+hibernate+Spring هذا الفديو يوضح دور كل منMethods   المستعملة و ستجدون روابط تحميل source code  في الوصف   https://www.youtube.com/watch?v=rdLb7rz8FYw
  3. السلام عليكم و رحمة الله تعالى وبركاته   لكي لا يطيل عليكم هذا مشروع من إنجازي  " إدارة المكتبة "   وصف   Three-layer web application (presentation, business, data access) platform with JEE (Java Enterprise Edition) I built with the following technologies: JavaServer Faces 2 (JSF2) and Primefaces: for web interfaces Java Beans: for the business layer  Hibernate, Spring: for the data access layer Spring Security: For security (authentication + management roles)IDE: Netbeansdatabase: mysql (using transact SQL for creating triggersمن أجل رؤية بعض واجهات المشروع و التحميل ايضا  
  4. السلام عليكم و رحمة الله تعالى وبركاته    هذه اول مشاركة  لي في المنتدى اتمنى ان تروق لكم فيديو اليوم يبين إنشاء تطبيق إرسال الإميلات  بإستعمال J2EE-javamail-JSF2-primefaces هذا رابط الفيديو application javamail+JSF2(primefaces)       وشكرا
  5. السلام عليكم ورحمة الله وبركاته   انا عندى مشكله فى استخدام ال p:selectOneMenu وهى ان ال value الموجوده فى ال selectOneMenu لا تظهر فى ال inputtext موجود فى p:dialog والذى يظهر عندما اضغط على p:commandputton   هذه هى ال managebean /* * To change this template, choose Tools | Templates * and open the template in the editor. */package beans;import dao.AdminDAO;import dao.UserRegister;import java.util.ArrayList;import javax.faces.bean.ManagedBean;import javax.faces.bean.ViewScoped;import javax.faces.context.FacesContext;import javax.faces.event.ValueChangeEvent;import javax.faces.model.SelectItem;/** * * @author shokry */@[email protected]()public class FacultyMB { University university; Faculty faculty; public AdminDAO adminDAO; public University getUniversity() { if (university == null) { university = new University(); } return university; } public void setUniversity(University university) { this.university = university; } public Faculty getFaculty() { if (faculty == null) { faculty = new Faculty(); } return faculty; } public void setFaculty(Faculty faculty) { this.faculty = faculty; } public ArrayList<SelectItem> getUniversities() { ArrayList<University> lst = UserRegister.getUniversities(); ArrayList<SelectItem> items = new ArrayList<SelectItem>(); for (University t : lst) { items.add(new SelectItem(t.getUniversityId(), t.getName())); } return items; } public ArrayList<SelectItem> getUniFaculties() { ArrayList<Faculty> lst = UserRegister.getUniFaculties(university.getUniversityId()); ArrayList<SelectItem> items = new ArrayList<SelectItem>(); for (Faculty t : lst) { items.add(new SelectItem(t.getFacultyId(), t.getName())); } return items; } public void addUniversity() { adminDAO = new AdminDAO(); adminDAO.addUniversity(university.getName()); } public void editUniversity() { System.out.println("university is : " + university.getName() + ""); adminDAO = new AdminDAO(); adminDAO.editUniversity(university.getUniversityId(), university.getName()); } public void deleteUniversity() { adminDAO = new AdminDAO(); adminDAO.deleteUniversity(university.getUniversityId()); } public void addFaculty() { System.out.println("university is : " + university.getUniversityId() + " universityid is : " + university.getUniversityId()); adminDAO = new AdminDAO(); adminDAO.addFaculty(faculty.getName(), 3); } public void deleteFaculty() { adminDAO = new AdminDAO(); adminDAO.deleteFaculty(faculty.getFacultyId()); } public void editFaculty() { adminDAO = new AdminDAO(); adminDAO.editFaculty(faculty.getFacultyId(), faculty.getName()); } public void getinfo() { System.out.println("university is : " + university.getName() + " universityid is : " + university.getUniversityId()); } public void universityChange(ValueChangeEvent e) { university = (University) e.getNewValue(); FacesContext.getCurrentInstance().renderResponse(); }}والكود الآتى هو مابه المشكله حيث ان Faculty.university و Faculty.university.name و Faculty.university.universityId دائما ب null ولا استطيع ان استخمها او اراها داخل اى dialogمع العلم ان   name,  universityId هى ال properties  للكلاس university   <h:form id="univerityForm"> <h:panelGrid columns="2" cellspacing="6" cellpadding="6"> <h:outputText value="Select University " style="size: 3; font-weight: bold;"/> <p:selectOneMenu id="university" value="#{facultyMB.university}"> <f:selectItems value="#{facultyMB.universities}" var="university" itemLabel="#{facultyMB.university.name}" /> <f:ajax listener="#{facultyMB.universityChange}"/> </p:selectOneMenu> </h:panelGrid> </h:form> <h:panelGrid columns="2" cellspacing="6" cellpadding="6"> <p:commandButton value="add" icon="ui-icon-plus" onclick="uniCreateDialogWidget.show();" style="font-size: .6em; font-style: italic; width: 40px; hight: .3px"> </p:commandButton> <p:commandButton value="edit" icon="ui-icon-plus" onclick="uniEditDialogWidget.show();" style="font-size: .6em; font-style: italic; width: 40px; hight: .3px"> <f:setPropertyActionListener target="#{facultyMB.university}" value="#{university}" /> </p:commandButton> </h:panelGrid>وهذا هو dialog page وهنا ال vlaue facultyMB.university.nameلا ترجع بشئ ودائما تاتى معى ب null   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <h:body> <p:dialog widgetVar="uniEditDialogWidget" id="uniEditDialogId" height="150" width="500" modal="true" closable="true" draggable="false" resizable="false"> <h:form id="uniEditDialogForm" prependId="false"> <h:panelGrid columns="2"> <h:outputText value="University Name" /> <h:inputText value="#{facultyMB.university.name}" required="true" label="University Name"> <f:validateLength minimum="4" /> </h:inputText> <p:commandButton value="edit" icon="ui-icon-plus" action="#{facultyMB.editUniversity()}" oncomplete="closeDialogIfSucess(xhr, status, args, uniEditDialogWidget, 'uniEditDialogId')" /> <p:commandButton value="delete" action="#{facultyMB.deleteUniversity()}" oncomplete="closeDialogIfSucess(xhr, status, args, uniEditDialogWidget, 'uniEditDialogId')" /> <p:commandButton value="cancel" icon="ui-icon-cancel" onclick="uniEditDialogWidget.hide();" type="button" /> </h:panelGrid> </h:form> </p:dialog> </h:body></html>  ارجو المساعده   وشكرا للجروب الجميل