blob: 554beee5757a199b939f8956c51160cd7ce9adf1 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.javaloader.test;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.RequestScoped;
@ManagedBean(name = "javatestbean4xxx")
@RequestScoped
public class TestBean3 {
String sayHello = "hello world";
String hello2 = "hello from added attribute";
String hello3 = "hello from added attribute 2";
private String myText() {
return "Hello World from bean3 xxx";
}
public String getSayHello() {
return myText();
}
public String getSayHello2() {
return hello2;
}
public void setSayHello(String hello) {
this.sayHello = hello;
System.out.println("hello world");
}
public void setResource(String param) {
}
public String getResource() {
/* ResourceHandler handler = FacesContext.getCurrentInstance().getApplication().getResourceHandler();
Resource resource = handler.createResource("testResource");
InputStream istr = resource.getInputStream();
BufferedReader rdr = new BufferedReader(new InputStreamReader(istr));
StringBuilder strBuf = new StringBuilder();
String line = null;
try {
while ((line = rdr.readLine()) != null) {
strBuf.append(line);
}
} catch (IOException ex) {
};
return strBuf.toString();
*/
return "hello world";
}
}