This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

chetan padhye

Greenhorn
+ Follow
since Apr 17, 2008
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 chetan padhye

HI ,

I have requirement of opening new window /tab for page flow which fits for seam conversational scope

below is code of same .. i m not sure what i am doing wrong in it. To open window ui have normal wndow.open js call. object to be shared between multiple tab is kept in conversation scope . The action before starting new tab is annotated with @Begin ... Please suggest any idea

Action class



User object which is put in conversation scope



Registration Page



New tab/Window opens up with following page


Hi ,

How can we represent a matrix like structure in jsf.

It will have x number of rows and y number of columns. Both x and y are dynamic.

so it should be some thing like below .

-------------A B C D . . .

X------------ o o o o . . .

Y------------ o o o o . . .

Z------------ o o o o . . .

.------------ . . . . . . .

.------------ . . . . . . .



1) Using data table we can have columns oriented structure , i mean we can have iterate over any number of rows rendering respective data

but in this case we do not have number of column fixed rather they are dynamic .

Is there any possible solution in jsf for this

This is how we can have iterate over column


<h:column>
<h:dataTable border="1" value="#{nested}" var="item">
<h:column>
<hutputText value="#{nested.rowIndex}" />
</h:column>
<h:column>
<hutputText value="#{item}" />
</h:column>
</h:dataTable>
</h:column>


Thanks in advance
9 years ago
JSF


...... I got it Was because the web service was configured some way that it was not allowed to be called ...but wsdl file was visible ....

SOAP fault 11 i guess deals with the ssl and other authentication errors

Thanks
9 years ago
Hi ,


I made like this check box and below that the list checkbox select event changes the list of cars ...it works .
But now on select of car from list it calls changeCurrentProfile ( ) , valueChangeListener
but for the other list which comes after selecting check box on its select it is Not working ...

I have observed this IF i populate the SelectItem list in bean constructor then only for those items it work if dynamically added some select item on select of check box
these item value should be one value list have in constructor ...for other values added it gives validation error ...i dont have any validation on form


<h:selectBooleanCheckbox id="adminCheckBox" valueChangeListener="#{carProfileAction.changeCarListByType}"> Show Old
<a4j:support event="onclick" reRender="carProfileAction" ></a4j:support>
</h:selectBooleanCheckbox>


<h:selectOneListbox id="carProfileAction" valueChangeListener="#{carProfileAction.changeCurrentProfile}" >
<f:selectItems value="#{adminProfileAction.managersList}"/>
<a4j:support event="onchange" reRender="addNewCarGrid"></a4j:support>
</h:selectOneListbox>





public BeanConstructor()
{
managersList = new ArrayList<SelectItem>();
managersList.add(new SelectItem("car1"));
managersList.add(new SelectItem("Car2"));
managersList.add(new SelectItem("Hi"));
}

public void changeCarListByType(ValueChangeEvent e)
{

if(FALSE.equalsIgnoreCase(e.getNewValue().toString()))
{managersList = new ArrayList<SelectItem>();
managersList.add(new SelectItem("car1"));
managersList.add(new SelectItem("Car2"));
setmanagersList(managersList);
}else{
managersList = new ArrayList<SelectItem>();
managersList.add(new SelectItem("Hi"));
managersList.add(new SelectItem("bye"));
setmanagersList(managersList);
}
}


public void changeCurrentProfile (ValueChangeEvent e)
{

System.out.println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$:- Select value is :--- "+ e.getNewValue().toString());
}


In this case for onchange event changeCurrentProfile () receives value for car1, car2 and Hi ....... for select of 'bye' it gives validation error .... and no value in changeCurrentProfile (ValueChangeEvent e)

Please can anyone have any input on this issue ?

Thanks ...
9 years ago
JSF
1) what is binding in following respect

<h:selectManyListbox id="list" value="#{optionBean.optionSelected}" >
<f:selectItems value="#{optionBean.optionList}"></f:selectItem>
</h:selectManyListbox>

If getOptionlist returns the ArrayList of SelectItems then optionSelected should get SelectItem object whichever is selected this object will have value and label both fields...
But it returns null ....rather if the optionSelected is made String type it returns ....

What is binding attribute of these tags ..it is present for almost all tags ....how it works

Thanks
9 years ago
JSF
Thanks for reply

Ajax4jsf sounds best option here ....do you have any example ....

Thanks ...
9 years ago
JSF
Hi

My select list is like below .... and on selection of any of option on it i want to display a profile of the car on the same page .....what can be possible options and the best option ?


<h:selectOneListbox id="pickCar"
value="#{carBean.currentCar}">
<f:selectItems
value="#{carBean.carList}" />
</h:selectOneListbox>

Please tell me , how do i change the values of existing components on the screen on some valueChangeEvent ?

Thanks in advance
9 years ago
JSF


I have generated the jax-ws artifact normally i did ...and 4 lines of code to call service with soap bindings and this error pops
why it may be happening any clue ?

Thanks
9 years ago
Hi

What can be the source of following error ...


Exception in thread "main" javax.xml.ws.soap.SOAPFaultException
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:188)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
at $Proxy30.getAllCountries(Unknown Source)
at com.org.ws.test.main(test.java:33)

Thanks in advance
Chetan
9 years ago
Thanks for reply ,

You mean in application business logic, when ever need WS I should create new W service instance and get port then create service request object and call it ....
No any pattern needed ...this is going to incise ws and port objects as for i my app i dont have database ....every data will come and go via web service ...


Your second part of http persistance connections aren't heavy ..I guess i dont get ...can you please elaborate on it ?


Thanks
Chetan

9 years ago
Hey thanks ,

What pattern can be proper in order to call ws in my application with soap bindings .


if i return port object from some class WebServicePort.getTestWsPort(); will that do or if i implement singleton pattern for giving port object will cause some concurrency issue in case multiple classes are using same port.....

basically i m looking for some pattern my web application should have in order to have ws calls.

Thanks
Chetan ...

public class WebServicePort {

private static TestWsService tws;

static {

tws = new TestWsService();
}

public static TestWs getTestWsPort() {

return tws.getTestWsPort();
}

}

9 years ago
Hey


Thank you very much dear it works (with soap binding )!

.... what is difference between these hhtp ( get / post ) and soap bindings ... ?

Which one should be used while writing ws client with pure jax-ws 2.0 only ... ?

Thanks again ....


9 years ago
Hi

I have generated following classes with jax-ws . How to call web service ... the way i found on some tutorial is not working ...

following classes i have ....

wsimport http://www.webservicex.net/geoipservice.asmx?wsdl

GeoIP.java
GeoIPService.java
GeoIPServiceSoap.java
GetGeoIP.java
GetGeoIPContext.java
GetGeoIPContextResponse.java
GetGeoIPResponse.java
ObjectFactory.java
package-info.java


Thanks in advance


9 years ago
Hi


I want Tomcat authentication like company id / username / Password so it looks i should go for Form based authentication ....


1) I wrote login.jsp and error.jsp ;

2)web.xml


<login-config>

<auth-method>FORM</auth-method>

<realm-name>MyFirst Protected Area</realm-name>

<form-login-config>

<form-login-page>/login.jsp<;/form-login-page>

<form-error-page>/error.jsp<;/form-error-page>

</form-login-config>

</login-config>


3 )configured Realm in server.xml of tomcat className="org.apache.catalina.realm.DataSourceRealm";


Now issue is tomcat handles this j_security_check action and i want the j_companyid field in my application ... so how can i get it ....


Can we write an class that will process this authentication and pass insted of let tomcat handel it ?


OR


any configuration that can handel this j_companyid and pass on to application....?


Should we need to write our own Realm if so ....then how to ?


Thanks

Chetan


Login.jsp

*********************************************

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Login Page</title>

</head>

<body>

<h1>Login to MyFirst</h1>

<p>

If you have been issued a username and password, key them in here now!

</p>

<form method="POST" action="j_security_check">

CompanyID : <input type="text" size="15" maxlength="25" name="j_companyid"><br><br>

Username : <input type="text" size="15" maxlength="25" name="j_username"><br><br>

Password : <input type="password" size="15" maxlength="25" name="j_password"><br><br>

<input value="Login" type="submit"> <input value="Clear" type="reset">

</form>

</body>

</html>

****************************************************
10 years ago