Curtis Vasbinder

Greenhorn
+ Follow
since Mar 26, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Curtis Vasbinder

Our application utilizes several web services and we use wsdl2java to generate the java beans. We have one web service that we do not want apache axis to deserialize the response into java beans. We only need the raw xml soapBody. How can I do this?
14 years ago
we are using message resource bundle and it is called by ResourceBundle bundle = bundleManager.getBundle(basename, context.getViewRoot().getLocale(),Util.getCurrentLoader(this));

The properties files are located outside the jar and to get them loaded, we put the path to them in the classpath property of the Websphere server.

Everything is fine and working, however we no longer are able to put the path to the properties file in the classpath property fo the webspher server.

Is there a way I can pass the location to the loader in my java code?
16 years ago
The reason why I am trying this is for field level security. Based on the user and or group we will need to hide/show, disable/enable, for almost all the fields on the page. This was just one idea to stream line the process so we did not fill our backing beans with all this code. The idea was to loop thru the components on the page, call a database (would be cached for session) and set the appropriate attribute for all the necessary fields.

Just an idea and I saw that based on several web pages that this can be done, but apparently it cannot be.
16 years ago
JSF
OK, here is my code in the phase listener. In the Before phase there is no children to the UIViewRoot. The children components are not available until the LifeCycleImpl, so I tried this in the AfterPhase. The components are found but nothing happens. It seems the components are already rendered, and the response is complete so I cannot change them. What am I missing. by the way I took this code from another post on this site.

public class LifeCycleListener implements PhaseListener
{
public void beforePhase(PhaseEvent event)
{

System.out.println("Before " + event.getPhaseId());
if (event.getPhaseId() == this.getPhaseId())
{
FacesContext context = event.getFacesContext();

if (context != null && context.getViewRoot() != null)
{
setInputReadOnly(context.getViewRoot().getChildren());
}
}
}
public void afterPhase(PhaseEvent event)
{
System.out.println("After " + event.getPhaseId());
if (event.getPhaseId() == this.getPhaseId())
{
FacesContext context = event.getFacesContext();

if (context != null && context.getViewRoot() != null)
{
setInputReadOnly(context.getViewRoot().getChildren());
}
}
}
public PhaseId getPhaseId()
{
return PhaseId.RENDER_RESPONSE;
}
private void setInputReadOnly(List children)
{
for (Iterator child = children.iterator(); child.hasNext();)
{
UIComponent component = (UIComponent) child.next();
if (component == null)
{
continue;
}
System.out.println(component.getId());
if (component instanceof HtmlInputText)
{
((HtmlInputText) component).setReadonly(true);
}
if (component instanceof HtmlInputTextarea)
{

((HtmlInputTextarea) component).setReadonly(true);
}
if (component.getChildCount() > 0)
{
// Component has more children?
setInputReadOnly(component.getChildren());
// Loop through it's children.
}
}
}
}
16 years ago
JSF
My project requirement is to modify the background color on some JSF components depending on the user logged on.

I was trying to do this in a phase listener in the Render_Response phase. Loop thru the UIComponents and

UIViewRoot root = e.getFacesContext().getViewRoot();
UIComponent comp = root.getComponent("testform:inputfield");
comp.getAttributes().put("style","display:none");

Can something like this be done? If I click on the submit button on the page, when it renders again it works but not on the first time.
16 years ago
JSF
We are using the java.util.ResouceBundle. I would like to be able to have a common resouce properties file (common_en.properties) and have customer specific resource properties files (customer1_en.properties). If a user for customer1 is logged on I would set the resource to be customer1. I would like my message lookup to first look in customer1_en.properties and if found, use it, else look for it in common_en.properties.

Currently, I copy common_en.properties to customer1_en.properties and then make the necessary changes to those messages that need to be different. With this we are maintaining two files where most of the information is duplicated.
16 years ago