我需要在我的页面上创建一个命令按钮列表,但是我遇到了一些问题.我通过request.setAttribute从我的bean传递列表,它似乎在我一次获取一个值时工作,但是当我运行foreach循环时,它们似乎都是null(从而生成,并且具有默认值0,""等,据我所知).任何帮助将不胜感激!在添加的代码中,当我在foreach循环之外创建按钮时,我得到正确的值,但是当我运行循环本身时却没有.List是整数类型,稍后应该是一个java对象(遇到同样的问题).使用JSF 2.2版.logtest()和gotoprofile()都打印出兴趣指针.
我的豆子有:
@ManagedBean(name="MyProfile")
@RequestScoped
Run Code Online (Sandbox Code Playgroud)
我在我的bean中设置我的变量myInterestList:
HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
session.setAttribute("myInterestProfileName", profileName);
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ page import="java.util.List,com.jsflogin.stringWithPointer" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<f:view>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSF Successfull login</title>
</head>
<body>
<h:form id="forloop">
<c:set var ="myTempList" value="${myInterestListYay}" scope="session"/>
<c:out value="interest list"/><p>
<h:commandButton value="#{myInterestListYay[1]}" action="#{MyProfile.logTest}">
<f:setPropertyActionListener target ="#{MyProfile.interestPointer}" value = "#{myInterestListYay[1]}"/>
</h:commandButton><p>
<ui:repeat var="orly"value="${myInterestListYay}" varstatus="status">
<c:out value="${status.index}"/><h:commandButton value="#{orly}" …Run Code Online (Sandbox Code Playgroud) 我一直在寻找解决方案,但似乎找不到适合我的解决方案.我有一个内置按钮的自定义单元格.我的问题是如何将indexPath传递给action方法?
现在我正在做
[cell.showRewards addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
Run Code Online (Sandbox Code Playgroud)
在我的cellForRowAtIndexPath方法中,我的方法是:
-(IBAction)myAction:(id)sender{
NSIndexPath *indexPath = [self.tableView indexPathForCell:(MyCustomCell *)[sender superview]];
NSLog(@"Selected row is: %d",indexPath.row);
}
Run Code Online (Sandbox Code Playgroud)
有小费吗?谢谢.
我正在使用Xcode 4.2,其中我创建了各种类,它们显示各种符号,如?,A,M和类的名称.项目运行得非常好.我仍然很想知道这些符号的含义.具有问号符号的类是否会在将来产生错误或警告?
我使用v4 support lib的FragmentTabHost
要求是当我将标签切换到另一个和另一个标签时,即调用
每次onCreateView()和onActivityCreated().
这就是我的代码性能很慢的原因.
那么,还有其他解决方案吗 如何提高片段选项卡的性能?
关于iOS 7我有一些奇怪的麻烦UINavigationBar.我的应用程序中有一个适合iOS 6的应用程序.
- IOS 6 -

但是,当我尝试在iOS 7上运行它时,我的后退按钮消失了.它在那里,仍在工作,可点击但不可见;
- IOS 7 -

我该如何解决这个问题?
如何将图像添加到UIView?这是我到目前为止尝试的内容:
UIView *imageHolder = [[UIView alloc] initWithFrame:CGRectMake(40, 200, 280, 192)];
UIImage *image = [UIImage imageNamed:@"bloodymoon.jpg"];
[imageHolder addSubview:image]; // Error: Incompatible pointer types
[self.mainView addSubview:imageHolder];
Run Code Online (Sandbox Code Playgroud) 当我尝试创建一个新的多设备混合应用程序时,我收到一条错误消息.错误消息是,此模板尝试加载组件程序集
'Microsoft.VisualStudio.MultiDeviceHybridApps.VSTemplateWizard, Version=1.0.0.0, Culture=neutral'.
Run Code Online (Sandbox Code Playgroud)
我的输出错误信息是:
C:\Users\Rishi\Desktop\Winjs Files\WinJS ToDo Sample for Multi-Device Hybrid Apps\JavaScript\WinJSToDo\WinJSToDo.jsproj : error : The imported project "C:\Users\Rishi\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Users\Rishi\Desktop\Winjs Files\WinJS ToDo Sample for Multi-Device Hybrid Apps\JavaScript\WinJSToDo\WinJSToDo.jsproj
Run Code Online (Sandbox Code Playgroud) 我试图修改图层中文本的字体属性,但它不会发生.任何人都可以帮忙吗?请在下面找到代码:
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
// All HypnosisViews start with a clear background color
[self setBackgroundColor:[UIColor clearColor]];
[self setCircleColor:[UIColor lightGrayColor]];
// Create the new layer object
boxLayer = [[CATextLayer alloc] init];
// Give it a size
[boxLayer setBounds:CGRectMake(0.0, 0.0, 300.0, 85.0)];
// Give it a location
[boxLayer setPosition:CGPointMake(160.0, 350.0)];
// Make half-transparent red the background color for the layer
UIColor *reddish = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.75];
// Get CGColor object with the same …Run Code Online (Sandbox Code Playgroud) 几个月来,我一直在使用Pandas访问和分析我的Google分析数据,但是昨天我的代码失败了,我不知道为什么.即使使用最基本的示例(如文档中所示),ga.read_ga函数也会返回错误:
AttributeError Traceback (most recent call last)
/Library/Python/2.7/site-packages/ipython-0.13.1-py2.7.egg/IPython/utils/py3compat.pyc in execfile(fname, *where)
176 else:
177 filename = fname
--> 178 __builtin__.execfile(filename, *where)
/Users/danielcollins/Documents/GA Python/EngCompCombined.py in <module>()
161 # account_id=account_id,
162 max_results=max_results,
--> 163 chunksize=5000)
164
165 df1_conc = pd.concat([x for x in df1])
/Library/Python/2.7/site-packages/pandas/io/ga.py in read_ga(metrics, dimensions, start_date, **kwargs)
100 reader = GAnalytics(**reader_kwds)
101 return reader.get_data(metrics=metrics, start_date=start_date,
--> 102 dimensions=dimensions, **kwargs)
103
104
/Library/Python/2.7/site-packages/pandas/io/ga.py in get_data(self, metrics, start_date, end_date, dimensions, segment, filters, start_index, max_results, index_col, parse_dates, keep_date_col, date_parser, na_values, …Run Code Online (Sandbox Code Playgroud) 当我在vs2010中打开silverlight项目时,它会向我显示错误的对话框
" You need to install the latest silverlight developer runtime before opening silverlight project"
并提供我的链接"go.microsoft.com/fwlink/?LinkId=146060",而我已经安装了这个silverlight版本.
请帮我解决这个问题.
ios ×3
objective-c ×2
android ×1
asp.net ×1
cordova ×1
fonts ×1
foreach ×1
fragment ×1
google-api ×1
ios7 ×1
iphone ×1
java ×1
jsf ×1
jsp ×1
layer ×1
pandas ×1
python ×1
python-2.7 ×1
silverlight ×1
svn ×1
symbols ×1
text ×1
uibutton ×1
uiimage ×1
uitableview ×1
web-services ×1
xcode4.2 ×1