|
|
@ -649,6 +649,13 @@ public class RecipeDetailBean implements Serializable { |
|
|
|
log.info("Ingredient line: \"" + ingredientText + "\""); |
|
|
|
log.info("Ingredient line: \"" + ingredientText + "\""); |
|
|
|
Ingredient ing = |
|
|
|
Ingredient ing = |
|
|
|
IngredientDigester.digest(ingredientText); |
|
|
|
IngredientDigester.digest(ingredientText); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String ingkey = ing.getIngkey(); |
|
|
|
|
|
|
|
if (!StringUtils.isEmpty(ingkey)) { |
|
|
|
|
|
|
|
Shopcat scat = this.recipeService |
|
|
|
|
|
|
|
.findShopcatForIngredientKey(ingkey); |
|
|
|
|
|
|
|
ing.setShopCat(scat); |
|
|
|
|
|
|
|
} |
|
|
|
// get ing list size, set ing position, append
|
|
|
|
// get ing list size, set ing position, append
|
|
|
|
List<IngredientUI> ingredients = getWrappedIngredients(); |
|
|
|
List<IngredientUI> ingredients = getWrappedIngredients(); |
|
|
|
int lsize = ingredients.size(); |
|
|
|
int lsize = ingredients.size(); |
|
|
@ -970,25 +977,26 @@ public class RecipeDetailBean implements Serializable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ***
|
|
|
|
// ***
|
|
|
|
|
|
|
|
// Editor pages are secured (redirect=true)
|
|
|
|
|
|
|
|
|
|
|
|
public String editDescription() { |
|
|
|
public String editDescription() { |
|
|
|
this.setDetailTab(0); |
|
|
|
this.setDetailTab(0); |
|
|
|
return "detailEdit"; |
|
|
|
return "detailEdit?faces-redirect=true"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String editIngredients() { |
|
|
|
public String editIngredients() { |
|
|
|
this.setDetailTab(1); |
|
|
|
this.setDetailTab(1); |
|
|
|
return "detailEdit"; |
|
|
|
return "detailEdit?faces-redirect=true"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String editInstructions() { |
|
|
|
public String editInstructions() { |
|
|
|
this.setDetailTab(2); |
|
|
|
this.setDetailTab(2); |
|
|
|
return "detailEdit"; |
|
|
|
return "detailEdit?faces-redirect=true"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String editNotes() { |
|
|
|
public String editNotes() { |
|
|
|
this.setDetailTab(3); |
|
|
|
this.setDetailTab(3); |
|
|
|
return "detailEdit"; |
|
|
|
return "detailEdit?faces-redirect=true"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void setDetailTab(int i) { |
|
|
|
private void setDetailTab(int i) { |
|
|
|