Migrated selected beans to Request Scope.
This commit is contained in:
		
							parent
							
								
									fa16c0bf9a
								
							
						
					
					
						commit
						a792f5d2b7
					
				| 
						 | 
				
			
			@ -2,35 +2,37 @@ package com.mousetech.gourmetj;
 | 
			
		|||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.io.UnsupportedEncodingException;
 | 
			
		||||
 | 
			
		||||
import jakarta.annotation.PostConstruct;
 | 
			
		||||
import jakarta.faces.event.AjaxBehaviorEvent;
 | 
			
		||||
import jakarta.faces.model.DataModel;
 | 
			
		||||
import jakarta.faces.model.ListDataModel;
 | 
			
		||||
import jakarta.faces.view.ViewScoped;
 | 
			
		||||
import jakarta.inject.Inject;
 | 
			
		||||
import jakarta.inject.Named;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import com.mousetech.gourmetj.persistence.model.Recipe;
 | 
			
		||||
import com.mousetech.gourmetj.persistence.service.RecipeService;
 | 
			
		||||
 | 
			
		||||
import jakarta.annotation.PostConstruct;
 | 
			
		||||
import jakarta.enterprise.context.RequestScoped;
 | 
			
		||||
import jakarta.faces.event.AjaxBehaviorEvent;
 | 
			
		||||
import jakarta.faces.model.DataModel;
 | 
			
		||||
import jakarta.faces.model.ListDataModel;
 | 
			
		||||
import jakarta.inject.Inject;
 | 
			
		||||
import jakarta.inject.Named;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Main control panel backing bean.
 | 
			
		||||
 * 
 | 
			
		||||
 * The rare and fabled RequestScope, which is otherwise
 | 
			
		||||
 * useless 90% of the time. Here we maintain no session
 | 
			
		||||
 * state. so we can better support the session timeout
 | 
			
		||||
 * for editing functions.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author timh
 | 
			
		||||
 * @since Jun 28, 2012
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Named
 | 
			
		||||
@ViewScoped
 | 
			
		||||
@RequestScoped
 | 
			
		||||
public class AdminMainBean implements Serializable {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,17 +17,17 @@ import org.slf4j.Logger;
 | 
			
		|||
import org.slf4j.LoggerFactory;
 | 
			
		||||
 | 
			
		||||
import jakarta.annotation.PostConstruct;
 | 
			
		||||
import jakarta.faces.view.ViewScoped;
 | 
			
		||||
import jakarta.enterprise.context.RequestScoped;
 | 
			
		||||
import jakarta.inject.Named;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Caching object for cookie data persistence.
 | 
			
		||||
 * Request caching object for cookie data persistence.
 | 
			
		||||
 * 
 | 
			
		||||
 * @author timh
 | 
			
		||||
 * @since Jan 31, 2024
 | 
			
		||||
 */
 | 
			
		||||
@Named
 | 
			
		||||
@ViewScoped
 | 
			
		||||
@RequestScoped
 | 
			
		||||
public class CookieBean {
 | 
			
		||||
 | 
			
		||||
	private static final String KEY_DISPLAY_ROWS = "displayRows";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user