Recently I got this error when trying to share a folder from within my Home folder in Ubuntu 9.10 (Karmic Koala) :
Failed to execute child process "testparm" (No such file or directory)
The fix was extremely simple – just install ’samba-common-bin’ with the command.
$ sudo apt-get install samba-common-bin
Then, there you are done.
No reboot is needed, just go back to your folder and share it again.
Wednesday, January 6, 2010
Sunday, January 3, 2010
passing parameter through h:commandButton in JSF
In JSF, <h:commandButton> doesnot support <f:param> so that we cannot use it to pass parameter. However, it is supported in <h:commandLink> . So, in order to pass parameter through , <h:commandButton> we can use <f:attribute> . An example is shown to demonstrate this:
<h:commandButton actionListener=#{bean.callAction}/>
<f:attribute name="parameterName" value="parameterValue"/>
</h:commandButton>
In backing bean,
public void callAction(ActionEvent ae){
String paramValue = (String) ae.getComponent().getAttributes().get("parameterName");
System.out.println("Parameter value is :: "+paramValue);
}
The output is -
Parameter value is :: parameterValue
which is in the value attribute of f:attribute tag.
<f:attribute name="parameterName" value="parameterValue"/>
</h:commandButton>
In backing bean,
public void callAction(ActionEvent ae){
String paramValue = (String) ae.getComponent().getAttributes().get("parameterName");
System.out.println("Parameter value is :: "+paramValue);
}
The output is -
Parameter value is :: parameterValue
which is in the value attribute of f:attribute tag.
Subscribe to:
Posts (Atom)