I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component public class AllViewComponent : ViewComponent { private readonly UserManager<ApplicationUser> _userManager; public AllViewComponent(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public async Task<IViewComponentResult> InvokeAsync() { List<StudentViewModel> allUsers = new List<StudentViewModel>(); var items = await _userManager.Users.ToListAsync(); foreach (var item in items) { allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email }); }
In the previous article, we have already learn about basic concept of java bean, today i am talking about java beans forms.
Java Beans can appear in two forms:
Java Beans can also be non visual yet still be customizable using a builder-tool. They do not have to be derived from a specific class or interface, it is recommended that they implement the Serializable interface. In respect of the source code there is no real difference noticeable between a Java Bean and a “normal” Java class. Basically what differs the source code of a “normal” class from a Java Bean is that the latter adheres to the Java Beans API specification in terms of how it is developed. Only the strict adherence to this specification ensures that builder tools can assist a developer to work with Java Beans. For many solutions you can either develop a conventional Java class where you have to write your own code for setting its properties or you can build a Java Bean which allows you To set the properties through the builder tool. Eventually both methods result in code just that in the latter case the builder tool creates the code automatically in the background according to your selection.
Java Beans can appear in two forms:
- Visual
- Non visual.
Java Beans can also be non visual yet still be customizable using a builder-tool. They do not have to be derived from a specific class or interface, it is recommended that they implement the Serializable interface. In respect of the source code there is no real difference noticeable between a Java Bean and a “normal” Java class. Basically what differs the source code of a “normal” class from a Java Bean is that the latter adheres to the Java Beans API specification in terms of how it is developed. Only the strict adherence to this specification ensures that builder tools can assist a developer to work with Java Beans. For many solutions you can either develop a conventional Java class where you have to write your own code for setting its properties or you can build a Java Bean which allows you To set the properties through the builder tool. Eventually both methods result in code just that in the latter case the builder tool creates the code automatically in the background according to your selection.
Comments
Post a Comment