1

<ui:composition..>コードブロック内では、<h:outputText ..>タグを使用してレンダリングしようとするものはすべて、次のように定義されたクラスに準拠していません<h:outputStylesheet library="css" name="imagens/index.css">

これが私のコードです:

<ui:composition ...>
    <ui:define name="conteudoRodape">
       <h:outputStylesheet  library="css" name="imagens/index.css">
           <h:outputText styleClass="centro" value="Acessando como: Filial:" />
       </h:outputStylesheet>
       ...
    </ui:define>
</ui:composition>

これはどのように発生し、どうすれば解決できますか?


POPENを呼び出すと、スレッド内でハングが発生します

私のコードはこのpopen呼び出しでハングしているようです

command = "ls"
commandList = shlex.split(command)
print("Executing " + command +"\n")
print(commandList)
output = "#" * 10 + "\n" + server.name + "\n\n"
process = subprocess.Popen(
    command,
    shell=True,
    stdin=subprocess.PIPE, 
    stdout=subprocess.PIPE)
output = process.communicate()[0]
#scriptRunner.threadComplete(output)
return output

コードはのexecuteScriptOverSSHメソッドにありますSshWorker

class WorkerThread(threading.Thread):
    def __init__(self, pathToScript, server, runner):
        super(WorkerThread, self).__init__()
        self.scriptRunner = runner
        self.server = server
        self.pathToScript = pathToScript
        self.sshWorker = SshWorker.SshWorker()

    def run(self):
        print('Thread Starting')
        output = self.sshWorker.executeScriptOverSSH(
            self.server, 
            self.pathToScript)
        print('Thread Finishing!')
        self.scriptRunner.threadComplete(output)`

スレッドはへの呼び出しを通過することはありませんPopen-そこでprintステートメントを使用してチェックしました。何か案は?

4

1 に答える 1

0

あなたの問題は、 h:outputStylesheet 内に h:outputText タグをネストし、 name 属性でライブラリ名を使用していることだと思います。変更してみてください:

<h:outputStylesheet  library="css" name="imagens/index.css">
<h:outputText styleClass="centro" value="Acessando como: Filial:" />
</h:outputStylesheet>

に:

<h:outputStylesheet library="css/imagens" name="index.css" />
于 2012-10-02T22:28:04.767 に答える