Kevin Weisser

Greenhorn
+ Follow
since Aug 24, 2007
Merit badge: grant badges
For More
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kevin Weisser

I'm currently looking at creating some components to replace common patterns within my application (name, phone number, ssn, address, etc.), so that a developer need only add one tag to the their JSP instead of dragging several components onto the screen.

I've looked at creating the components in a standard way (obtaining the ResposeWriter and then creating the markup), but cannot seem to figure out how that decode() method would work. In my case, I'm not just trying to run setSubmittedValue() once. I'd need to do that for every input declared within my new component.

I've also looked into using existing components (HtmlInputText) and adding them to a PanelGroup as children, and using the default rendering for a Panel. In this case, getClientId is returning a different value when the constructor runs and when decode() runs.

In both cases, I'm able to get my component to render to the screen. I'm just not able to sucessfully decode the component and set the submitted value.

Has anyone done anything similar to this that would be able to provide me with an example?
16 years ago
JSF
I've seen a few examples out showing how to either integrate AJAX using a PhaseListener approach, and also how to integrate AJAX using IBM/JSF implementation that allows you specify panels to be updatable via AJAX.

The example I'm trying to work through is where a user enters some key piece of information into a form, and that data is then used to query the database and populate other fields on the form.

The PhaseListener approach doesn't seem to make easy use of the Java bean, and it's functionality. However, it does give the user a single point of entry to get all of the data and return it as a JSON object at which point the HTML can be updated.

The second approach doesn't seem doesn't seem to allow the individual components on the form to be tied to the Java bean, because any values which may be prepopulated have to be individual function calls. This would be a ton of overhead if you had to make 10 calls to get the values for 10 compenents. However this approach does keep everything within JSF, and allows for minimal java scripting.

Does anyone have any additional suggestions/recommendations on performing an autofill type feature within JSF?

Regards,

Kevin
16 years ago
JSF